View previous topic :: View next topic
|
Author |
Message |
ranjitbhingare
New User
Joined: 30 Nov 2005 Posts: 94 Location: PUNE
|
|
|
|
Hi,
1. There is a PGM "PGM1" which write to an output file "OUT.FILE".
2. How can I check using JCL whether the file "OUT.FILE" is empty or not before executing the program ?
Thanks & Regards,
Ranjit Bhingare |
|
Back to top |
|
|
harish_mf
New User
Joined: 31 Jul 2005 Posts: 18 Location: bangalore
|
|
|
|
hi,
by IEBCOMP, or give it for print it gives the return code=4. |
|
Back to top |
|
|
vicky10001 Warnings : 1 Active User
Joined: 13 Jul 2005 Posts: 136
|
|
|
|
Please use below JCL
//STEP01R EXEC PGM=IDCAMS
//SYSPRINT DD SYSOUT=*
//IN1 DD DSN=Give your input file,DISP=SHR
//OUT1 DD DUMMY,
// DCB=(RECFM=VB,LRECL=2356)
//SYSIN DD *
REPRO INFILE(IN1) OUTFILE(OUT1) COUNT(1)
/*
//* |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
What will you do if there IS data in the file? Should PGM1 perform differently based on whether the file has data or is empty?
Do you want to write over any data already in the file?
Do you want to append new data to data already in the file? |
|
Back to top |
|
|
|