I have two files each contains 10 records. I would like to
copy both files into one output file but in alternate
sequence. for e.g. first record from file1 then record 2
from file2.....

Answer Posted / mallikharjuna

it will be processed in 3steps
if the data is AAA
AAA
BBB
CCC

FILE2
DDD
EEE
FFF
LIKE 10 RECS

step1:
srt fields=copy
outrec fields=(1:1,3,4:seqnum,4,ZD,START=1,INCR=2 )

STEP:2

step2:
srt fields=copy
outrec fields=(1:1,3,4:seqnum,4,ZD,START=2,INCR=2 )


STEP=3 SORT FIELDS = COPY
OUTREC FIELDS =(1:1,3)

Is This Answer Correct ?    9 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

When output dataset space is required, what quantity categories are used?

832


Differentiate between the joblib and the steplib statements?

859


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

854


What is the function of the dd dcb keyword?

828


How to override a dsn that is contained in a proc called by another proc? I need to do the override in the calling jcl?

718






Explain how can an in-stream dataset be terminated?

703


What parameter directs the output of the job log dataset?

766


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?

7606


What is the purpose of dd dummy statement?

944


What is one line to pass PARM from JCL to COBOL?

841


What is Cataloged Procedures?

715


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

800


Describe the various parameters utilized in the creation of a gdg?

684


how you can direct the data to spool using SYSOUT option?

930


How jcl work to handle various input output file operations?

659