Good News Everybody!
The new search engine is LIVE!
Please report any problems to david (at) midrange.com.
|
[...]
The thing is... LIKEREC automatically qualifies the data structure. So
now your data structure field names are FileNameDS.CUSTNO,
FileNameDS.Name, FileNameDS.ADDR, etc --- and they no longer match the
file names that are CUSTNO, NAME, ADDR becaause they're qualified by a
data structure name.
There are many fixes to the problem, and none of them are difficult.
Here are the fixes that come to mind:
[...]
b) Continue using LIKEREC, but tell the RPG op-codes (READ, CHAIN,
WRITE, etc) to read into a data structure. For example:
chain key file01 FileNameDs;
The 4th parameter to the chain opcode (which is the result field in
fixed-format) contains the DS you want to read into.
c) Use a PREFIX on the F-spec to tell it to add the 'FileNameDs.' prefix
onto the input specs so you don't HAVE to read into the DS.
FPMYFILE UF A E K DISK RENAME(FMYFILE:FILE01)
F PREFIX('FILENAMEDS.')
In this case, it'll generate input specs that read directly into your
DS, since the input specs will read fields name FILENAMEDS.CUSTNO and
FILENAMEDS.NAME instead of simply CUSTNO and NAME. (For example, again)
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2026 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.