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



> From: Brian Piotrowski
> 
> My other fields are not defined other than in the SQL as well (I don't
> have specific D-specs for them).  I even tried adding the SSM01 table
to
> the F-specs.  This problem only appeared when I added the second table
> to the query (b.scsnm).

In order to use a field as a target for a FETCH operation (in fact,
anyplace where a field appears with a colon (:) in an SQL statement)
that field must be defined in the RPG program.

Fields can be defined explicitly by creating a D-spec, or can by defined
implicitly by including them via a file specification or, my favorite,
an externally described data structure.  You say you tried including an
F-spec for SSM01; this should have worked.

If you are still getting an error SQL0312 on the field name, then one of
two things are happening: the F-spec for SSM01 is incorrect or the field
SCCSM is not in SSM01.

If the F-spec is not working properly you should also be seeing an
SQL1001 earlier in the precompiler error list telling you it could not
open SSM01.  Otherwise, the field is not in the file.  Do a DSPFFD SSM01
from the exact same place you are doing the compile and make sure the
field named SCSNM is in the file.

HTH

Joe


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.