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
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
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 |
with out sorting how to copy records from one file to another file using jcl.Mean I have one input file in which the record are like 1,6,5,4,2,3(for example) and i want to copy to output file from top to bottom(without sorting) like 3,2,4,5,6,1.so I want the JCL for this.cna any one can answers?
What are the 2 types of parameters in dd statement?
How To get the last record in VSAM file in cluster? and How can u get the ksds file records into ur cobol program ? Pls tell me about these two questions.
i have 1000 records in input file and i want to sort it and the first 200 records to be placed in output file. how to do that??
what is symbolic parameters in jcl, what is a temparary data set ? where do u use ?
What is catelog procedure and how many catelog procedure to use in one job?
can we give instream data in procedure
how you can access an uncataloged dataset in a JCL?
WORKING-STORAGE SECTION. 1 GROUP-ITEM. 05 AMOUNT-1 PIC 99V9 USAGE COMP VALUE 50. 05 AMOUNT-2 PIC 9(4)V99 USAGE COMP. PROCEDURE DIVISION. MOVE ZERO TO GROUP-ITEM. ADD 50 TO AMOUNT-1. DISPLAY AMOUNT-1. STOP RUN.
How can I override a dsn that is contained in a proc called by another proc? I need to do the override in the calling JCL.
WHAT IS DUMMY IN JCL? HOW TO USE IT? CAN ANYBODY SEND PROGRAM ON THIS?
What is one line to pass PARM from JCL to COBOL?