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

SORT input file, only last 2 characters need in output file


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
maxsubrat

Active User


Joined: 27 Feb 2008
Posts: 110
Location: india

PostPosted: Mon May 02, 2011 5:20 pm
Reply with quote

I have 1 record in input file. I need only last 2 characters to place into the output file.
For exp:

Input file:

0102 rama 12/13/2011 xxxxxxx india

LRECL = 80, RECFormat = Fixed

MY output file should be like below.
ia

Can someone give some idea on it.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10874
Location: italy

PostPosted: Mon May 02, 2011 5:26 pm
Reply with quote

well.... all depends
is the record/data content fixed or variable ?
in other words will the wanted chars occupy always the same position or not ?
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Mon May 02, 2011 5:33 pm
Reply with quote

If records are fixed size then you could use, assuming FB and LRECL 80.
Code:
  INREC BUILD=(8,2,3:78X)


Hope it helps.
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Mon May 02, 2011 5:50 pm
Reply with quote

For variable length records, assuming FB LRECL 80, you could use
Code:
  INREC FIELDS=(1,80,JFY=(SHIFT=RIGHT))
  OUTREC FIELDS=(79,2,78X)       


Hope it helps.
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Binary File format getting change whi... All Other Mainframe Topics 7
No new posts How to turn off 'ACTION' SDSF output ... TSO/ISPF 2
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts TRIM everything from input, output co... DFSORT/ICETOOL 1
No new posts FTP VB File from Mainframe retaining ... JCL & VSAM 8
Search our Forums:

Back to Top