|
Use CLOF command after reaching EOF. Alexei Pytel "Kerwin Crawford" <crawfork@toastmaster.com> on 12/30/99 02:31:13 PM Please respond to RPG400-L@midrange.com To: RPG400-L@midrange.com cc: Subject: Another CL Question - RCVF I know this is a RPG list but I don't know of a CLP list. I have a CLP that is basically the following. The main process is to read all of the files in a library do some things with it and then read all of the files from a related library and do some things. See example: DCLF FILE(QTEMP/FILE) DSPOBJD OBJ(LIB1/*ALL) OBJTYPE(*FILE) + OUTPUT(*OUTFILE) OUTFILE(QTEMP/FILE) + OUTMBR(*FIRST *REPLACE) LOOP1: RCVF DEV(*FILE) RCDFMT(*FILE) WAIT(*YES) MONMSG MSGID(CPF0864) EXEC(GOTO CMDLBL(EOF1)) /* Code... */ GOTO CMDLBL(LOOP1) EOF1: DLTF FILE(QTEMP/FILE) DSPOBJD OBJ(LIB2/*ALL) OBJTYPE(*FILE) + OUTPUT(*OUTFILE) OUTFILE(QTEMP/FILE) + OUTMBR(*FIRST *REPLACE) LOOP2: RCVF DEV(*FILE) RCDFMT(*FILE) WAIT(*YES) MONMSG MSGID(CPF0864) EXEC(GOTO CMDLBL(EOF2)) /* Code... */ GOTO CMDLBL(LOOP2) EOF2: DLTF FILE(QTEMP/FILE) My problem is that when it gets to the second rcvf it acts as if it has hit the EOF before processing the first record. I have tried putting in ovrdbf in several ways, but never got it to work. There has to be a way to reset the pointer or message to allow for the second rcvf. I ended up splitting this up into two CLP's and doing it that way. Any thoughts? Kerwin S. Crawford Toastmaster Inc. System Analyst
I know this is a RPG list but I
don't know of a CLP list.
I have a CLP that is basically the
following. The main process is to read all of the files in a library do
some things with it and then read all of the files from a related library and do
some things. See example:
DCLF FILE(QTEMP/FILE)
DSPOBJD OBJ(LIB1/*ALL) OBJTYPE(*FILE)
+
OUTPUT(*OUTFILE) OUTFILE(QTEMP/FILE) + OUTMBR(*FIRST *REPLACE) LOOP1:
RCVF DEV(*FILE) RCDFMT(*FILE)
WAIT(*YES)
MONMSG MSGID(CPF0864) EXEC(GOTO CMDLBL(EOF1)) /*
Code... */
GOTO CMDLBL(LOOP1)
EOF1:
DLTF FILE(QTEMP/FILE)
DSPOBJD OBJ(LIB2/*ALL) OBJTYPE(*FILE)
+
OUTPUT(*OUTFILE) OUTFILE(QTEMP/FILE) + OUTMBR(*FIRST *REPLACE) LOOP2:
RCVF DEV(*FILE) RCDFMT(*FILE)
WAIT(*YES)
MONMSG MSGID(CPF0864) EXEC(GOTO CMDLBL(EOF2)) /*
Code... */
GOTO CMDLBL(LOOP2)
EOF2:
DLTF FILE(QTEMP/FILE) My problem is that when it gets to
the second rcvf it acts as if it has hit the EOF before processing the first
record. I have tried putting in ovrdbf in several ways, but never got it
to work. There has to be a way to reset the pointer or message to allow
for the second rcvf.
I ended up splitting this up into two CLP's and
doing it that way.
Any thoughts?
Kerwin S. Crawford Toastmaster Inc. System Analyst |
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.