|
|
| Author |
Message |
khamarutheen
Senior Member
Joined: 23 Aug 2005 Posts: 678 Location: chennai
|
|
|
|
Hi all,
I have a 1000 records in a file, i need to write a jcl such that those 1000 records should be omitied in the output file. writing sort card with 1000 omit condition is really hectic. is there any alternate way to write those 1000 records in a seperate sort card? please instruct. Let me know if my requirements is not clear |
|
| Back to top |
|
 |
References
|
|
 |
Moved: Fri May 30, 2008 8:50 pm by superk From DFSORT/ICETOOL to JCL |
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 1199 Location: At my desk
|
|
| Back to top |
|
 |
khamarutheen
Senior Member
Joined: 23 Aug 2005 Posts: 678 Location: chennai
|
|
|
|
No buddy, i cant use omit. Let me explain my requirement in detail.
we have a input file with 5000 records. we need to omit 1000 records which customer says. the report should return only 4000 records. but the customer requirements differs. it may be 1000 or 30 or even 1. So if it's 10 or 20 it's easy to write sort card. if it goes 1000 or above, how do we repeat the omit statement for different account numbers??? |
|
| Back to top |
|
 |
enrico-sorichetti
Global Moderator
Joined: 14 Mar 2007 Posts: 3183 Location: italy
|
|
|
|
that' s the classic two file match problem
search the forums ( jcl or dfsort ) |
|
| Back to top |
|
 |
arcvns
Senior Member
Joined: 17 Oct 2006 Posts: 790 Location: Chennai, India
|
|
|
|
Hi khamaurutheen,
Which Sort product r u using?....
| Quote: |
| we have a input file with 5000 records. we need to omit 1000 records which customer says. |
The above requirement can be done using SYNCSORT join.
Can you provide us with a sample input?...
Thanks,
Arun |
|
| Back to top |
|
 |
arcvns
Senior Member
Joined: 17 Oct 2006 Posts: 790 Location: Chennai, India
|
|
|
|
Hi khamaurutheen,
If you have the accnt nos. to be omitted in another file, you can try out the below JCL after changing the file attributes as per your requirement.
| Code: |
///STEP00 EXEC PGM=SORT
//*
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SORTMSG DD SYSOUT=*
//*
//SORTJNF1 DD *
A
B
C
D
E
F
//*
//SORTJNF2 DD *
A
D
E
//*
//SORTOUT DD SYSOUT=*
//*
//SYSIN DD *
SORT FIELDS=COPY
JOIN UNPAIRED,F1,ONLY
JOINKEYS FILE=F1,FIELDS=(1,1,A)
JOINKEYS FILE=F2,FIELDS=(1,1,A)
/*
|
SORTOUT
Thanks,
Arun |
|
| Back to top |
|
 |
|
|