Hello,
I am trying to create an externally described file in QTEMP and read it within an RPGLE program.
Within a CL program;
I create a flat work file via CRTPF, specifying a record length of 198
I then use CPYSPLF to copy a spooled file into the flat file
I use SQL to remove the rows I don't care about
I then use SQL and SUBST to put the data into a file with columns, i.e;
I then reference it in my RPG program as;
But it fails to compile;
*RNF2120 40 4 000400 External descriptions for file AFILE not found;
However; if I do the exact same statement but instead place it in a non-QTEMP library, add the library to my library list and try again, it compiles??
What am I doing wrong? QTEMP is in my library and I can see in DSPFD the file has the specified record format.
Cheers,
Ryan
I am trying to create an externally described file in QTEMP and read it within an RPGLE program.
Within a CL program;
I create a flat work file via CRTPF, specifying a record length of 198
I then use CPYSPLF to copy a spooled file into the flat file
I use SQL to remove the rows I don't care about
I then use SQL and SUBST to put the data into a file with columns, i.e;
Code:
CREATE TABLE QTEMP/AFILE AS( SELECT SUBSTR(....) COLA, DEC(SUBSTR(....),6,0) COLB, SUBSTR(....) COLC FROM FLATFILE) WITH DATA RCDFMT AFILR
Code:
FFilename++IPEASF.....L.....A.Device+.Keywords FAFILE IF E Disk
*RNF2120 40 4 000400 External descriptions for file AFILE not found;
However; if I do the exact same statement but instead place it in a non-QTEMP library, add the library to my library list and try again, it compiles??
What am I doing wrong? QTEMP is in my library and I can see in DSPFD the file has the specified record format.
Cheers,
Ryan
Comment