MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

compare with in records

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
subbuy2k
Beginner


Joined: 12 Aug 2004
Posts: 29
Topics: 18

PostPosted: Wed Feb 09, 2005 12:23 pm    Post subject: compare with in records Reply with quote

Hi,
i have a input file record of length 40. i want to generate two output files. first file should contain record whose first 4 bytes equal to the last four bytes and the next output file should contain records whose first four byte not equal to last four byte.
can you please help me in doing it. thanks

Regards
subbu
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Wed Feb 09, 2005 1:14 pm    Post subject: Reply with quote

subbu,

The following JCL will give you desired results assuming that your comparision fields are both of character format.

Code:

//STEP0100 EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//SORTIN   DD DSN=YOUR INPUT FILE,
//            DISP=SHR
//EQ       DD DSN=YOUR EQUAL FILE,
//            DISP=(NEW,CATLG,DELETE),
//            UNIT=SYSDA,
//            SPACE=(CYL,(X,Y),RLSE)
//NEQ      DD DSN=YOUR NOT EQUAL FILE,
//            DISP=(NEW,CATLG,DELETE),
//            UNIT=SYSDA,
//            SPACE=(CYL,(X,Y),RLSE)
//SYSIN    DD *
   SORT FIELDS=COPY
   OUTFIL FNAMES=EQ,INCLUDE=(1,4,CH,EQ,37,4,CH)
   OUTFIL FNAMES=NEQ,SAVE
/*


Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group