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 print data of sequential file to Spool..?
In which table PLAN is registered in ?
how can u identify the db2 from jcl ?
What is the function of //cntl statement?
How do you restart a step in JCL?
What are the parameters that are used in creating a gdg?
01 GROUP-ITEM 05 AMOUNT-1 PIC 99V9 USAGE COMP VALUE 50 05 AMOUNT-2 PIC 9(4)V99 USAGE COMP MOVE ZERO TO GROUP-ITEM ADD 50 TO AMOUNT-1 what will be the content of AMOUNT-1? a.50 b.100 c.0 d.unpredictable
How would I code JCL to copy a gdg data set G001v00 and create a gdg Data set G001v01
i have a jcl in which 4 & 5 step creates a new generation. 4th step output is as input for the 6th step & 5th step output is used as input in the 7th step. How they are refered as in the 6th & 7th steps? If the job abends in 6th step then how the 5th step output is refered in 7th step?
What is GDG?
If i am going to change some variable in a copybook( size or variable type) ,what are the changes that need to be done in the corresponding JCL.
Name the system library from which modules are retrieved at execution