IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Including condtion in Outrec


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
khamarutheen

Active Member


Joined: 23 Aug 2005
Posts: 677
Location: NJ

PostPosted: Fri May 30, 2008 8:43 pm
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
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

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

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

Active Member


Joined: 23 Aug 2005
Posts: 677
Location: NJ

PostPosted: Sat May 31, 2008 10:38 am
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

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Sat May 31, 2008 12:12 pm
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
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Mon Jun 02, 2008 6:31 pm
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
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Mon Jun 02, 2008 6:41 pm
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
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts question on Outrec and sort #Digvijay DFSORT/ICETOOL 20
No new posts Sort w/OUTREC Question DFSORT/ICETOOL 2
No new posts Getting OUTREC - SHORT REC error for ... DFSORT/ICETOOL 12
No new posts Issues with outrec overlay while extr... SYNCSORT 7
No new posts SEQNUM with TRA=ETOA in OUTREC SYNCSORT 5
Search our Forums:

Back to Top