I have two input SORTIN files and We need to create one
SORTOUT file which contains data of both input files. What
is the SortCard for this?. Suppose the length of the both
files are different, then How we do it? Please reply ASAP
Answers were Sorted based on User's Feedback
Answer / srk
//jobname job .......
//stepname1 exec pgm=sort
//sysprint dd sysout=*
//sortin01 dd dsn=file1,disp=shr
//sortin02 dd dsn=file2,disp=shr
//sortout dd dsn=mergefile,.......
//sysout dd sysout=*
//sysin dd *
merge fields=(starting field,length,merge-sequence,format)
/*
*above is the merge condition
//
Is This Answer Correct ? | 8 Yes | 0 No |
Answer / vikas pujar
1) Sortcard to merge two files will be
//Sysin dd *
Sort fields=copy
/*
2) When try two merge two files using sort, first thing to see is they are of same length. If they are not, change the length of one equal to other in one more step which come prior to sort step.
Is This Answer Correct ? | 2 Yes | 1 No |
Answer / vikas pujar
Continuation to last answer. If the input files are of VB, even if length vary, files will be merged. The file with Max
RECFM and BLKSIZE will be used for output. But for FB files RECFM should be same.
Is This Answer Correct ? | 2 Yes | 2 No |
a dd statement has 2 types of parameters. Name them?
What is DISP= (NEW,PASS,DELETE)?
how can we override data definitions in jcl. can any one give detailed example
In a JCL if previous steps return code is greater than 0 or 4 then the next step will not execute. But the job will be successfull with the maximum return code. How can we reset this maximum return code to '0' regardless of return codes of any steps?
What is the purpose of the dd keylen parameter?
How can we see data in TEMPARARY DATA SET in JCL ?
We have an output dataset in job with disp parameter as SHR. Can we write data in that file dataset?
What is the function of //jcllib statement?
is there any way to execute more than one proc in the same exec statement at the same time..?
what EXEC statement is and what is the syntax of EXEC statement used in JCL?
I HAVE A VB BLOCK WHICH IS USED AS INPUT IN COBOL CONATINING SOME RECORDS CAN I CHANGE THE FILE FROM VB TO FB?
If a jcl has just 1 step and the input file to this does not exist, then what will happen if we submit this job?