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
 
SORT input file, only last 2 characters need in output file

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

New User


Joined: 27 Feb 2008
Posts: 82
Location: india

PostPosted: Mon May 02, 2011 5:20 pm    Post subject: SORT input file, only last 2 characters need in output file
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10327
Location: italy

PostPosted: Mon May 02, 2011 5:26 pm    Post subject: Reply to: SORT input file, only last 2 characters need in ou
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: 1522
Location: Chennai

PostPosted: Mon May 02, 2011 5:33 pm    Post subject:
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: 1522
Location: Chennai

PostPosted: Mon May 02, 2011 5:50 pm    Post subject:
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    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 line 52: Name or string > 250 char... Ashishpanpaliya CLIST & REXX 5 Sat Oct 14, 2017 2:29 am
No new posts Subtract the ZD fields to provide neg... Balaryan DFSORT/ICETOOL 4 Wed Oct 11, 2017 10:51 pm
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am

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