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 / ranjith kumar

//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),SPLIT
/*
//

Is This Answer Correct ?    6 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is the use of outrecord?

1771


how do you reference the variable block file formats from cobol programs

686


What are all the divisions of a COBOL program?

663


explain sorting techniques in cobol program?

690


What are the access modes of START statement?

719






How to find out the closest prime number of an input number? I believe it has something to do with SEARCH and COBOL Linear Array.

3717


I have to write to a outfile where the number of records in that file should be the header of that file using IMS.. can anyone help me in this issue

1931


Is it possible that the redefines clause has different picture clauses compared to the one it redefined?

676


1.Is it possible to move the data from 99.99 to 99v99? 2.What is the CICS-vsam Compilation process? 3.In My GDG 5 generation will be there GDG3 got an abend what will happen? 4.In my GDG first generation is +1 And I want to add the new generation what will happen previous generation? 5.How can you give the PIC clause below conditions A). s9 (reddy), B). s9 (5) occurs 5 times? 6.How override the proc from a particular step? and what is symbolic and override Procs?

5377


What is the LINKAGE SECTION used in COBOL?

889


how to convert the recors form vsam file to db2 table tru file aid

2763


what happens if parmparameter passes zero bytes to the program

1667


For rewrite, why is it mandatory that file needs to be opened?

623


Difference between array and sub-script ?

1164


Give some examples of command terminators?

759