Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 Procopt G -concurrent Read balacsv2 IMS DB/DC 1 Mon Apr 23, 2018 5:03 pm
No new posts Find & Replace string in CA-SORT mrgnndhmk CA Products 1 Fri Mar 30, 2018 12:58 am
No new posts How to build one file from two input ... daniele DFSORT/ICETOOL 5 Tue Feb 27, 2018 6:45 pm
No new posts Find a string in PS file opened in br... mukkas CLIST & REXX 3 Sat Feb 24, 2018 2:15 pm
No new posts Append the milliseconds to the data s... girishb2 DFSORT/ICETOOL 1 Thu Dec 21, 2017 9:07 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us