Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
Including condtion in Outrec

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL
Author Message
khamarutheen

Senior Member


Joined: 23 Aug 2005
Posts: 678
Location: chennai

PostPosted: Fri May 30, 2008 8:43 pm    Post subject: Including condtion in Outrec
Reply with quote

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
View user's profile Send private message
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

PostPosted: Fri May 30, 2008 8:56 pm    Post subject:
Reply with quote

OUTFIL OMIT=ALL?
Back to top
View user's profile Send private message
khamarutheen

Senior Member


Joined: 23 Aug 2005
Posts: 678
Location: chennai

PostPosted: Sat May 31, 2008 10:38 am    Post subject: Reply to: Including condtion in Outrec
Reply with quote

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
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 3183
Location: italy

PostPosted: Sat May 31, 2008 12:12 pm    Post subject: Reply to: Including condtion in Outrec
Reply with quote

that' s the classic two file match problem

search the forums ( jcl or dfsort )
Back to top
View user's profile Send private message
arcvns

Senior Member


Joined: 17 Oct 2006
Posts: 790
Location: Chennai, India

PostPosted: Mon Jun 02, 2008 6:31 pm    Post subject:
Reply with quote

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
View user's profile Send private message
arcvns

Senior Member


Joined: 17 Oct 2006
Posts: 790
Location: Chennai, India

PostPosted: Mon Jun 02, 2008 6:41 pm    Post subject:
Reply with quote

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
Code:

B   
C   
F   


Thanks,
Arun
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL All times are GMT + 6 Hours
Page 1 of 1