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.....
Answers were Sorted based on User's Feedback
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 |
Answer / 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 |
Answer / aks
Use df sort utility and use infile and outfile for writing
the record into output file.
Is This Answer Correct ? | 1 Yes | 1 No |
Hi Guyz, My requirement is to empty out a PS file but not to delete. How would I do that. Is there any Utility. If any other way, plz answer. Thanks.
9 Answers iGate, Lehman Brothers,
how to run JCL thru COBOL.
can we write a proc with in a proc
What are the difference between jcl and jes?
In SPACE,what is directory,RLSE
What is the difference between joblib and jcllib statements
Explain the function of //jcllib statement?
What is the error/SOC code if dd names are not sysut1 and sysut2 in IEBGENER?
i have a jcl calling proc which has 10 steps, i want to execute from step5 to step10, where can i code RESTART and COND parameter?
What will happen if two JOB statements are mentioned in an JCL continuously.
I have 5 steps in my job. say s1, s2, s3, s4, s5 //s1 exec ............. //s2 exec ............ //s3 exec .......... //s4 exec ........ //s5 exec ............... my question is i want to exeute only s2 and s4 steps... please advice me how to do this:
TIME parameter in JOB statement or EXEC statement specifies What type of time (CPU time or execution time)?