Start Journaling of PF.

215 pts.
Tags:
iSeries
Journaling (AS/400)
Physical File
STRJRNPF
How do I Start Journaling on 2200 Physical Files together instead of using STRJRNPF for every file.

Answer Wiki

Thanks. We'll let you know when a new response is added.

This would require a CL program

1. Create a file listing all files to be journalled
DSPFD FILE(LIB1/*ALL) TYPE(*BASATR) OUTPUT(*OUTFILE) FILEATR(*PF) OUTFILE(LIB1/PFLIST)

2. the CL
DCLF LIB1/PFLIST
loop: RCVF
monmsg cpf0000 then goto End
STRJRNPF FILE(&ATLIB/&ATFILE) JRN(MYLIB/MYJRN)
goto loop

End: endpgm

******************
Instead of monitoring for CPF0000, which is a global monitor for any error, it is much better to monitor for the specific end of file condition, which is message ID CPF0864. Otherwise, any error condition would be ignored, the program would end, and you’d not know whether all of the records were processed.

In my opinion, a global monitor should be used on a very limited basis. It can be acceptable in certain situations, but not for reading through a data file, unless the program also includes a way to communicate that error condition to the person running the job.

CWC

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following