r_rakesh_r
New User
Joined: 10 Aug 2006 Posts: 5
|
|
|
|
Hi all,
Is there any way in DFSORT to create a "Subset file" of the Master file based on the records in another file (Condition).
For example,
Master File
100000A000000001
200000B000000002
300000C000000003
400000D000000004
500000E000000005
600000F000000006
Condition File (contains the list of values to be selected from master)
A
D
F
Expected Output
100000A000000001
400000D000000004
600000F000000006
Can anyone help me on this. Thanks a lot in advance.
Thanks & Regards,
Rakesh R |
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Here's a DFSORT/ICETOOL job that will do what you asked for:
Code: |
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//CONDFILE DD DSN=... Condition file
//T1 DD DSN=&&T1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(,PASS)
//CON DD DSN=... Master file
// DD DSN=*.T1,VOL=REF=*.T1,DISP=(OLD,PASS)
//OUT DD DSN=... output file
//TOOLIN DD *
COPY FROM(CONDFILE) TO(T1) USING(CTL1)
SELECT FROM(CON) TO(OUT) ON(7,1,CH) FIRSTDUP
/*
//CTL1CNTL DD *
INREC OVERLAY=(7:1,1)
/*
|
|
|