have in 100 records in a flat file i want to move records
like 1,3,5,7,9,11,.. to Output file1 and
2,4,6,8,10,12,14 .. records moved to Output file2..Pls
Provide real time answer..
Answer Posted / harsha
For ODD records
//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,STARTREC=1,SAMPLE=2
/*
//
For EVEN records
OUTFIL FNAMES=OUT2,STARTREC=2,SAMPLE=2
| Is This Answer Correct ? | 2 Yes | 3 No |
Post New Answer View All Answers
HOw can I get the negative sign while deduct high value from low value
How many bytes S(8) comp field occupy and its maximum value?
How to print 10 to 1 if the input have only 10 digit number?
What are the various section in data division and briefly explain them.
how to convert the recors form vsam file to db2 table tru file aid
How to remove the spaces at the end of each record in the output file of variable length, via cobol program?
I have a File that has duplicate records. I need only those records that occur more than thrice.?
which is Best IBM Mainframe Training and Placement Institute in Ameerpet Hyderabad
can you please let me know if there is any walkins for COBOL/PLI/DB2/IMS/JCL in pune other than IBM and ITC infotech
What are various search techniques in cobol? Explain.
What is the local-storage section?
Why would you use find and get rather than to obtain?
Explain how will you differentiate between an internal and an external sort, the pros and cons, internal sort syntax etc
i want a program using by if, evaluate , string, unstring, perform, occurs?
Explain sorting techniques in cobol program? Provide the sort file definition, the sort statement, its syntax and meaning