× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.




How are you bringing in the copybook? /INCLUDE is not opened by the
precompiler. The precompiler also doesn't open nested copybooks.
Try compiling with RPGPPOPT(*LVL2) on the CRTSQLRPGI command.


Thanks,
Gina


message: 5
date: Wed, 6 Apr 2011 11:28:24 -0500
from: Kurt Anderson <kurt.anderson@xxxxxxxxxxxxxx>
subject: RE: SQL pre-compiler & the new Template keyword

Alan, that's good to hear.
I guess my next step is to see if we can get the latest PTF cume (we are
never up to date on them). But even so, I found a handout by >Barbara
Morris stating that the SQL Precompiler, " Supports all the new features in
ILE RPG V6R1." Which means I either have a code >issue, or I need to open
a PMR.

I'll give some more detail (as it turns out the caveat I previously
mentioned wasn't exactly what's happening in my situation).

I have a copybook with the following D-spec.
// Shared Templates
D dsTmpl_CalTypTID...
D E DS Qualified Template
D ExtName( 'CALTYPTIDP' )

In the service program module, I have the following code, which does
compile:
D ds_CalTypTID E DS ExtName( CalTypTIDP ) Qualified
D Dim( MAX_BLOCK_READ )

However what I want is this, which does not compile (due to SQL below).
The Verifier says this is ok for the rest of the RPG code.
D ds_CalTypTID DS LikeDS( dsTmpl_CalTypTID )
D Dim( MAX_BLOCK_READ )

The SQL that uses this DS based on a Template that is failing in the
pre-compile is this:
Exec SQL
Fetch CalTypTIDPCursor FOR :epMaxRead ROWS into :ds_CalTypTID;

Precompiler listing:
DS_CALTYPTID 53
DS_CALTYPTID **** 1098

SQL5011 30 1098 Position 59 Host structure array DS_CALTYPTID not
defined or not usable.

Thanks,

Kurt Anderson
Sr. Programmer/Analyst
CustomCall Data Systems

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.