× 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.



Gina, that's it! Thanks. You know, I hadn't thought of it, but after I read your email, my memory said the opposite which is why I had started using /include (I believe). But I was wrong. Now I really don't know why I was using /include over /copy.

Cool.

Kurt

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Gina M Whitney
Sent: Wednesday, April 06, 2011 12:30 PM
To: rpg400-l@xxxxxxxxxxxx
Subject: RE: SQL pre-compiler & the new Template keyword


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
--
This is the RPG programming on the IBM i / System i (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

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.