View previous topic :: View next topic
|
Author |
Message |
maxsubrat
Active User
Joined: 27 Feb 2008 Posts: 110 Location: india
|
|
|
|
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 |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
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 |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
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 |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
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 |
|
|
|