Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Read input & Append String

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Shaheen Kalokhe

New User


Joined: 21 Feb 2008
Posts: 21
Location: India

PostPosted: Mon Nov 09, 2009 5:39 pm    Post subject: Read input & Append String
Reply with quote

I have an FB dataset having the following data at column 21-32

110000000000
101000000000
001000010001

Each digit corresponds to a month. My requirement is that if
110000000000 is read from input file the ouputfile should have
Jan Feb

Similalrly for 101000000000 output should be
Jan Mar

Similalrly for 001000010001 output should be
Mar Aug Dec

Thanks
Shaheen
Back to top
View user's profile Send private message

Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Mon Nov 09, 2009 10:03 pm    Post subject: Reply to: Read input & Append String
Reply with quote

Shaheen Kalokhe,

The following DFSORT JCL will give you the desired results

Code:

//STEP0100 EXEC PGM=SORT                                 
//SYSOUT   DD SYSOUT=*                                   
//SORTIN   DD *                                         
----+----1----+----2----+----3----+----4----+----5----+--
                    110000000000                         
                    101000000000                         
                    001000010001                         
//SORTOUT  DD SYSOUT=*                                   
//SYSIN    DD *                                         
  SORT FIELDS=COPY                                       
  INREC IFTHEN=(WHEN=INIT,                               
  OVERLAY=(81:C'JANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC')),
  IFTHEN=(WHEN=(21,1,ZD,EQ,0),OVERLAY=(081:3X),HIT=NEXT),
  IFTHEN=(WHEN=(22,1,ZD,EQ,0),OVERLAY=(084:3X),HIT=NEXT),
  IFTHEN=(WHEN=(23,1,ZD,EQ,0),OVERLAY=(087:3X),HIT=NEXT),
  IFTHEN=(WHEN=(24,1,ZD,EQ,0),OVERLAY=(090:3X),HIT=NEXT),
  IFTHEN=(WHEN=(25,1,ZD,EQ,0),OVERLAY=(093:3X),HIT=NEXT),
  IFTHEN=(WHEN=(26,1,ZD,EQ,0),OVERLAY=(096:3X),HIT=NEXT),
  IFTHEN=(WHEN=(27,1,ZD,EQ,0),OVERLAY=(099:3X),HIT=NEXT),
  IFTHEN=(WHEN=(28,1,ZD,EQ,0),OVERLAY=(102:3X),HIT=NEXT),
  IFTHEN=(WHEN=(29,1,ZD,EQ,0),OVERLAY=(105:3X),HIT=NEXT),
  IFTHEN=(WHEN=(30,1,ZD,EQ,0),OVERLAY=(108:3X),HIT=NEXT),
  IFTHEN=(WHEN=(31,1,ZD,EQ,0),OVERLAY=(111:3X),HIT=NEXT),
  IFTHEN=(WHEN=(32,1,ZD,EQ,0),OVERLAY=(114:3X),HIT=NEXT)
  OUTREC IFOUTLEN=80,                                   
  IFTHEN=(WHEN=INIT,OVERLAY=(35:81,36,SQZ=(SHIFT=LEFT)))
/*   


the output from the above job is

Code:

                    110000000000  JANFEB   
                    101000000000  JANMAR   
                    001000010001  MARAUGDEC
Back to top
View user's profile Send private message
Shaheen Kalokhe

New User


Joined: 21 Feb 2008
Posts: 21
Location: India

PostPosted: Tue Nov 10, 2009 7:58 pm    Post subject: Reply to: Read input & Append String
Reply with quote

Skolusu

Thanks a ton,

It worked fine for us.

Have a good day

Thanks & Regards
Shaheen
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Performing arithmetic on input field zh_lad DFSORT/ICETOOL 31 Tue Dec 06, 2016 8:04 pm
No new posts High CPU consumption Job using IAM fi... aswinir JCL & VSAM 15 Thu Dec 01, 2016 8:28 pm
This topic is locked: you cannot edit posts or make replies. How to use 2 input files in control c... Gunapala CN DFSORT/ICETOOL 23 Thu Oct 13, 2016 3:42 pm
This topic is locked: you cannot edit posts or make replies. Checking wether a string starts from ... sundaram.naveen CLIST & REXX 9 Thu Oct 06, 2016 11:56 am
No new posts CICS VSAM RLS READ akodakka CICS 3 Tue Oct 04, 2016 3:09 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us