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 

Help needed for Outrec

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


Joined: 12 Apr 2007
Posts: 76
Topics: 41

PostPosted: Fri May 16, 2008 12:19 pm    Post subject: Help needed for Outrec Reply with quote

Below is my requirment

In the input file first 3 byte having Entity values(like NIL,NFL,NMA,NTX).

Outputshould be first 2byte as Binary value of NIL, NFL,NMA,NTX.(i,e NFL numeric value is 0075, this 0075 values should written into outputfile with 2 byte binary(X'004B') format followd by all inputfile values).

Below is the enities numeric values.

NFL = 0075
NMA = 0045
NIL = 0088
NTX = 0099

Hope we can able do it via SORT JCL. Please help on this.


Code:
INPUT FILE
----+----1----+----2
NILPER00001544444444
NILPER00001577777777
NFLPER00001655555555
NFLPER00001533333333
NILPER00001599999999
NMAPER00001644444444
NILPER00001699999999
NILPER00001611111111
NTXPER00001788888888
NILPER00001622222222


OUTPUT FILE FORMAT
----+----1----+----2
  PER00001544444444
  PER00001577777777
  PER00001655555555
  PER00001533333333
  PER00001599999999
  PER00001644444444
  PER00001699999999
  PER00001611111111
  PER00001788888888
  PER00001622222222



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


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

PostPosted: Fri May 16, 2008 12:33 pm    Post subject: Reply with quote

nbdtrjk1,

The following DFSORT JCL will give you the desired results

Code:

//STEP0100 EXEC PGM=ICEMAN                 
//SYSOUT   DD SYSOUT=*                     
//SORTIN   DD *                             
NIL12345678901234567                       
NILPER00001544444444                       
NILPER00001577777777                       
NFLPER00001655555555                       
NFLPER00001533333333                       
NILPER00001599999999                       
NMAPER00001644444444                       
NILPER00001699999999                       
NILPER00001611111111                       
NTXPER00001788888888                       
NILPER00001622222222                       
//SORTOUT  DD SYSOUT=*                     
//SYSIN    DD *                             
  SORT FIELDS=COPY                         
  OUTREC IFTHEN=(WHEN=(1,3,CH,EQ,C'NMA'),   
          BUILD=(+45,TO=BI,LENGTH=2,4,17)),
         IFTHEN=(WHEN=(1,3,CH,EQ,C'NFL'),   
          BUILD=(+75,TO=BI,LENGTH=2,4,17)),
         IFTHEN=(WHEN=(1,3,CH,EQ,C'NIL'),   
          BUILD=(+88,TO=BI,LENGTH=2,4,17)),
         IFTHEN=(WHEN=(1,3,CH,EQ,C'NTX'),   
          BUILD=(+99,TO=BI,LENGTH=2,4,17)) 
/*


Hope this helps...

Cheers
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
nbdtrjk1
Beginner


Joined: 12 Apr 2007
Posts: 76
Topics: 41

PostPosted: Fri May 16, 2008 12:57 pm    Post subject: Reply with quote

That's kolusu

It's working fine


Thanks. Smile
Back to top
View user's profile Send private message
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