a input file contains 1000 records, how to move the first
500 record into one out put file and how to move to second
500 records to anothere output file
Answer Posted / varsha
Using SPLITBY option, you can do it in one step only -
//JOBNAME
//STEP1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=INPUT DSN,DISP=SHR
//OUT1 DD DSN=OUTPUT DSN1,DISP=(NEW,CATLG),
// SPACE=(CYL,(5,5)),UNIT=SYSDA
//OUT2 DD DSN=OUTPUT DSN2,DISP=(NEW,CATLG),
// SPACE=(CYL,(5,5)),UNIT=SYSDA
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL FNAMES=(OUT1,OUT2),SPLITBY=500
/*
//
Please correct .. if I am wrong
| Is This Answer Correct ? | 5 Yes | 0 No |
Post New Answer View All Answers
Give the syntax of job specifying jcl statement.
I have many files which i am receiving from client everyday. I have one step for every file to check for empty or not. Here client gives 30 files i need to check for every file for empty or not and i need to perform 30 steps. Can I do it in single step. Dynamically i need to change the File name in my step.
How to compare two files in SYNCSORT and on the mismatch record should be deleted from second file.
when can a job time-out occur? How to overcome that?
How can the attributes of one sms dataset be copied to another dataset?
WORKING-STORAGE SECTION. 01 GROSS-PAY. 05 BASIC-PAY PIC 9(5). 05 ALLOWENCES PIC 9(3). PROCEDURE DIVISION. MOVE 1000 TO BASIC-PAY. MOVE 250 TO ALLOWENCES. DISPLAY GROSS-PAY. STOP RUN. 77 W-A PIC 9(3)V99 VALUE 23.75 77 W-B PIC ZZ9V99 VLAUE 123.45 after the statement MOVE W-A TO W-B what will be W-B's value? a.123.75 b.b23.75 (where b indicates space) c.023.75 d.invalid move
what is the use of IEBGENER utility?
How is the record format of an output dataset specified?
Step 1 RC 4 Step 2 Step 3 I want to know the COND parameter which can be coded in step 2 or 3. Step 2 should be executed based on Step 1 RC and Step 3 should not be executed based on step 1's RC
Explain about LMQUERY�give a dialog information about a data set
How can unused space allocation be returned to the system when a dataset is closed?
how can you check if a file is empty using jcl?
How to override loadlib?
how JCL works?
Explain how can an in-stream dataset be terminated?