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



I received the same error on V7R3 with the compare ds uncommented.

Are the fields in Compare a subject of what is in the file?

Do you have an index or logical file that contains the same fields as part of the key?
You could try using EXTNAME with the *KEY to get it defined.

DCL-DS COMPARE EXTNAME('QCLSRC':*KEY) End-ds;

This way the data structures gets defined and isn't used by the SQL preprocessor.


Chris Hiebert
Senior Programmer/Analyst
Disclaimer: Any views or opinions presented are solely those of the author and do not necessarily represent those of the company.


-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Dan
Sent: Tuesday, April 10, 2018 1:08 PM
To: RPG400-L@xxxxxxxxxxxx
Subject: Re: SQL0312 strangeness; compiler bug?

O.k. Per someone's offline request, I have recreated the problem program
using QCLSRC as the externally described file, and its fields. The code as
shown below will compile. If you uncomment the COMPARE data structure and
its subfields, you may or may not see the SQL preprocessor bomb with
SQL0312 on the three sv_ fields.

If you do test this, I would be interested in knowing your OS level and the
result you get when attempting to compile after uncommenting the COMPARE
data structure and its subfields. If you are on v7r1, I would be
interested in your system's cume level, found at WRKPTFGRP PTFGRP(SF99710)
PTFGRPLVL(*LATEST)

FQCLSRC IP E DISK RENAME(QCLSRC:SOURCEFILE)
d NegotiatedCount...
d s 9 0
*DCOMPARE DS
*D SrcSeq
*D SrcDat
*D SrcDta
DSAVE DS
D SV_SrcSeq LIKE(SrcSeq)
D SV_SrcDat LIKE(SrcDat)
D SV_SrcDta LIKE(SrcDta)

Exec SQL set :NegotiatedCount =
( select count(*) as aCount
from QCLSRC
where SrcSeq = :sv_SrcSeq
and SrcDat = :sv_SrcDat
and SrcDta = :sv_SrcDta );
*inLR = *on;

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.