Hi Guyz,
My requirement is to empty out a PS file but not to delete.
How would I do that. Is there any Utility. If any other
way, plz answer. Thanks.

Answers were Sorted based on User's Feedback



Hi Guyz, My requirement is to empty out a PS file but not to delete. How would I do that. Is ther..

Answer / mithun suresh

Pushpa, I created a PS with FBA and put some recs in and
ran the same above JCL. To me it worked. Have u checked
what error u r getting. Try the below stuff with SORT util.

//STEP01 EXEC PGM=SORT
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=USERID.DATASET,DISP=SHR
//SORTOUT DD DSN=USERID.DATASET,DISP=SHR
//SYSIN DD *
SORT FIELDS=COPY,STOPAFT=0

Is This Answer Correct ?    15 Yes 1 No

Hi Guyz, My requirement is to empty out a PS file but not to delete. How would I do that. Is ther..

Answer / bill cecchini

Use the dataset itself to get the required DCB attributes.

//STEP01 EXEC PGM=IEBGENER
//SYSUT1 DD DUMMY,DCB=USERID.DATASET
//SYSUT2 DD DSN=USERID.DATASET,DISP=SHR
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY

Is This Answer Correct ?    6 Yes 1 No

Hi Guyz, My requirement is to empty out a PS file but not to delete. How would I do that. Is ther..

Answer / mithun suresh

Hi, try this out

Option 1: Use IEBGENER Utility
//DELJOB JOB ..........
//STEP01 EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSIN DD DUMMY
//SYSUT1 DD *
//SYSUT2 DD DSN=USERID.DATASET,DISP=SHR

Is This Answer Correct ?    9 Yes 6 No

Hi Guyz, My requirement is to empty out a PS file but not to delete. How would I do that. Is ther..

Answer / ram g

it will work with iebgener also ..create a dummy file with
fba format and use in your utility jcl

Is This Answer Correct ?    1 Yes 0 No

Hi Guyz, My requirement is to empty out a PS file but not to delete. How would I do that. Is ther..

Answer / abhilash

Why are you wasting your time and CPU time ... just open
the file in edit mode and type D99999 before first
record ... it will empty the file.. Cheers..

Plz dont waste CPU time....

Is This Answer Correct ?    8 Yes 8 No

Hi Guyz, My requirement is to empty out a PS file but not to delete. How would I do that. Is ther..

Answer / anand

//NUAEA62T JOB ,'DAILY REPORTS',
// MSGLEVEL=(1,1),MSGCLASS=Q,
// CLASS=D,NOTIFY=&SYSUID
//STEP1 EXEC PGM=IEBGENER
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD *
//SYSUT2 DD DSN=Test,DISP=SHR
/*

Is This Answer Correct ?    0 Yes 1 No

Hi Guyz, My requirement is to empty out a PS file but not to delete. How would I do that. Is ther..

Answer / pushpa

Yes we can do it by using the IEBGENER utility.

I have a question here By using the IEBGENER Utility I was
able to do this only for PS with RECFM =VB , but its not
working for PS with RECFM = FBA.

Is there any specific reason for this.

Please Clarify.

Is This Answer Correct ?    0 Yes 2 No

Hi Guyz, My requirement is to empty out a PS file but not to delete. How would I do that. Is ther..

Answer / garry

Try This :

//JOBCARD
//STEP1 EXEC PGM=IEFRBR14
//DD1 DD DSN=FILE1,DISP=(MOD,DELETE,DELETE)
May need to code DCB and SPACE parameter.
//DD2 DD DSN=FILE1,DISP=(NEW,CATLG,CATLG)
MUST need to code DCB and SPACE parameter.
//

Ply respond with YES or NO.

Thanks

Garry

Is This Answer Correct ?    0 Yes 3 No

Hi Guyz, My requirement is to empty out a PS file but not to delete. How would I do that. Is ther..

Answer / sachin borase

//JOBNAME

//S1 EXEC PGM=IEFRBR14
//DD1 DD DSN=FILE1,DISP=(NEW,CATLG,DELETE)

//S2 EXEC PGM=SORT
//SORTIN DD DSN=FILE1
//SORTOUT DD DSN=FILE2,DISP=OLD
//SYSIN DD *
SORT FIELDS=COPY
/*

Is This Answer Correct ?    0 Yes 6 No

Post New Answer

More JCL Interview Questions

How to execute only th 15th step of JCL consisting of 50 steps?

12 Answers   Bank Of America,


why jobstep can't be more than 255 and for GDG has max limit 255 . Is there any relation between the two

1 Answers   IBM, Perot Systems,


in step1 of a jcl,disp=(mod,delete,delete) step02 exec pgm=ccc,cond=(0,le) will step02 be executed? i)never ii)always iii) iv)... i dont remember options

4 Answers   HSBC,


Can we change the LIMIT of GDG?

6 Answers   HCL,


There are two steps in a JCl, the first one generates a report while the second step send an email saying the report has been generated, but the second steps should only be executed when the report file is non-empty. How can it be acheived. We may include steps in between.

3 Answers   IBM,


As PARM can supply information to a program ? Can PARM be used to supply information to a cataloged or Inline Procedure also ?

2 Answers   IBM, RS Software,


How to resolve the error "WER488A JOIN CAPACITY EXCEEDED" I am using SYNCSORT with JOINKEYS to compare 2 files. I am Getting error - > WER488A JOIN CAPACITY EXCEEDED There are 2 files to be compared with about 2 million records each. LRECL is 3665. Can somebody give a pointer as to how to resolve this problem? I am using SYNCSORT with JOINKEYS to compare 2 files. I am Getting error - > WER488A JOIN CAPACITY EXCEEDED There are 2 files to be compared with about 2 million records each. LRECL is 3665. Can somebody give a pointer as to how to resolve this problem?

1 Answers  


what modification we need to do in jcl if we use sort in cobol? I mean whether we need to include temporary file used for sorting in assign statement?

1 Answers  


How jcl work to handle various input output file operations?

0 Answers  


What is the meaning of the following declaration : DCB=BLKSIZE=, What is the difference between above declaration & not specifying DCB at all for a output file?

1 Answers  


What is the difference between specifying DISP=OLD and DISP=SHR for a dataset?

2 Answers  


if we want to use a gdg which is already created by some job, then how to use the reference of the last generation in a jcl?

0 Answers   IBM,


Categories