Jobs goes into Message Wait after reaching End Of File.
70 pts.
0
Q:
Jobs goes into Message Wait after reaching End Of File.
I am using the below programs to Delete Temporary Files from Specific Libraries on monthly basis after taking a Entire System Backup. [strong]The File and Library Names are stored in a Output File called MNTHDELE in QGPL and the Column Names are &ODLBNM for File Name and &ODOBNM for Library Name[/strong]. It is observed that the Job goes into Message Wait whenever End Of File is detected.

******************************* *************************

PGM

DCLF FILE(QGPL/MNTHDELE)

LOOP: RCVF

MONMSG MSGID(CPF0864) CMPDTA(THEN) EXEC(GOTO CMDLBL(END))

DLTF FILE(&ODLBNM/&ODOBNM)

GOTO CMDLBL(LOOP)

END: ENDPGM

*********************************************************

Please help since we are using the same program to Start Journaling and End Journaling on Multiple Files.



Software/Hardware used:
iSeries V5R4
ASKED: Aug 12 2009  10:11 AM GMT
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
0
24610 pts.
0
A:
 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0
  • AddThis Social Bookmark Button
Hi Haaiderali,

Can you be more specific on the MSGW you're getting?

If you display the message with F1 what does it say?

Do you have the option to respond e.g. (999999) in order to continue processing?

Regards,
Roy

---------------------
This looks wrong:
MONMSG MSGID(CPF0864) CMPDTA(THEN) EXEC(GOTO CMDLBL(END)

Should be:
MONMSG MSGID(CPF0864) EXEC(GOTO CMDLBL(END)

Phil
-------------------------------
CL programs don't typically write to files.
I would create a small RPG pgoram to write to the log file and call it from the CL passing it the necessary parameters.

Phil
Last Answered: Aug 18 2009  1:11 PM GMT by Philpl1jb   24610 pts.
Latest Contributors: 4819   235 pts.
0
0
Discuss This Answer:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _



_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Haaiderali   70 pts.  |   Aug 18 2009  6:05AM GMT

Thanks Phil, the above suggestion really worked. Also let me know if i include a log file in this program. Which means after deletion of each file, mentioned in QGPL/MNTHDELE, a record will be written to a log file mentioning the file name which was deleted along with a library name and the timestamp. This is required to keep a track on the Files Deleted using this program.

 
0