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 / muttaiah
Mallikarjuna,
If you give sort=copy in step3. the format of o/p file is
rec1 - File1
rec2 - File1
Rec1 - File2
rec2 - File2
change the sort as:
sort fields=(4,4,ZD,A)
outrec fields=(1:1,3)
rec1 - File1
Rec1 - File2
rec2 - File1
rec2 - File2
| Is This Answer Correct ? | 6 Yes | 0 No |
Post New Answer View All Answers
What is the use of disp parameter?
what EXEC statement is and what is the syntax of EXEC statement used in JCL?
What are the difference between jcl and jes?
how would you create a temporary dataset? And where will you use them?
1) SORT FIELDS=(20,4,CH,D,10,3,CH,D) OUTREC FIELDS=(7:20,4,C' FUTURE ',20,2,10,3,1Z,1,9,13,7, 24,57,TRAN=LTOU,6X'FF') This example illustrates how a fixed-length input data set can be sorted and reformatted for output. The SORTIN LRECL is 80 bytes. The reformatted output records are fixed length with a record size of 103 bytes. SOLRF (the IBM-supplied default) is in effect, so unless the SORTOUT LRECL is specified or available, it will automatically be set to the reformatted record length of 103. in the above example i have some doubts that a) sort fields=(20,4,CH,D,10,3,CH,D) -what exactly it does and this fields related to output record fields or input record fields b)outrec used to refprmat the records after sorting that means could please reply me as soon as possible Thanks. Venkat
What parameter of the job statement is used to limit the cpu time consumed by the job?
What are steplib and joblib?
Is acct parameter mandatory?
How to do automated restart when a job abend?
What are some jcl statements that are not allowed in procedures?
Explain dd statement in jcl?
what disp parameter we mention for creation of temporary dataset so that we can use it in later steps?
What are s0c1, s0c4, s0c5, s0c7 and socb?
How to execute 2nd and 4th steps among 5 steps in jcl proc?
Many jcl statements contain specific values designed to direct and control the execution of the statement. What are these fields called?