I have two input files
i/p1
name id-key flag date
i/p 2
name id-key date
if id-key matches in the both the files then it should
write the output file from i/p1 with flag 'Y'. It should be
done thru JCL sort card ,Please provide the info on this.
---Note : output file should have all records from i/p1
with proper Flag.
Answers were Sorted based on User's Feedback
Answer / muttaiah
Please give us a sample of both the I/P files and the data
you expect in O/P files so that it will be useful for us to
answer
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / vivek chandrasekaran
Give the two input files to be compared as
//SORTIN DD DSN=INPUT1,DISP=SHR
// DD DSN=INPUT2,DISP=SHR
//SORTOUT DD DSN=OUTPUT,DISP=...
//SORTXSUM DD DSN=MATCH,DISP=(NEW,CATLG,DELETE),..
//SYSIN DD *
SORT FIELDS=(11,5,CH,A),EQUALS
SUM FIELDS=NONE,XSUM
Considering name length 10 and key length 5 starting from
11 pos. XSUM will capture the duplicates. EQUALS will keep
the first duplicate record. To put 'Y' flag use OUTREC
FIELDS=(1:1,15,16:C'Y',17:17,8) considering date length 8
starting from 17 pos.
SUM FIELDS=NONE
| Is This Answer Correct ? | 0 Yes | 0 No |
How to get the last but one duplicate record of the file using Sort?
What are steplib and joblib?
hi,i have joined in mainframe course recently. ihave a doubt ragarding restart parameter.what is d use of it. and what is d syntax for it. any one give me d answer pls.
Mainframes gets a text file that contains the name of the file. Now using JCL i want to locate that file name in the mainframe system and perform further processing. Please tell how to proceed
What is 'mounting' of volumes ? Is there anything that a programmer can do in it ? How to find currently mounted volume ?
Given a input file with duplicates how to remove the duplicate records from the file using JCL?
6 Answers CDS, Convergys, TCS,
what is mainframe?
Why we us SYSTSIN DD with IKJEFT01 (TSO Utility) to execute a COBOL DB2 program? Why can't we use SYSIN DD?
how can we pass parameters from JCL to cobol subprogram...my requirement is i should not get data from mainprogram but i need it from JCL directly
1)what is compilation jcl for cobol program but it is calling another program 2)what is compilation jcl for cobol program but it is calling another program(in this, main program is pure cobol but sub program is cobol+db2 program.can anyone please answer me for above questions. it's very urgent
how do you code a null statement?
I HAVE A VB BLOCK WHICH IS USED AS INPUT IN COBOL CONATINING SOME RECORDS CAN I CHANGE THE FILE FROM VB TO FB?