View previous topic :: View next topic
|
Author |
Message |
balaji81_k
Active User
Joined: 29 Jun 2005 Posts: 155
|
|
|
|
Hi Team,
I am copying below input file data to output file by having filter '|' in between and sorting on first 4 bytes.
Problem is last field has alpha numeric date which has '.' in it . I am unable to copy the characters after period (i,e) '.' .
Input file:-
0111ABC888ABC.IUY
sort card used:-
Code: |
SORT FIELDS =(1,4,ZD,A)
OUTREC BUILD=(1:1,4,
5:C'|',
6:5,3,
9:C'|',
10:8,3,
13:11,7)
|
but output file is limited till ABC like below
Code: |
0111 | ABC | 888 | ABC
|
Can any one help me on how we can copy the complete string . |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2010 Location: USA
|
|
|
|
Add bounding characters around your suspicious field to verify what actually is printed, looking like blanks:
Code: |
OUTREC BUILD=(1:1,4,
5:C'|',
6:5,3,
9:C'|',
10:8,3,
13:C'>>>',11,7,C'<<<') |
|
|
Back to top |
|
|
balaji81_k
Active User
Joined: 29 Jun 2005 Posts: 155
|
|
|
|
Hi Sergeyken,
Its printed like >>> and then blanks . |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2010 Location: USA
|
|
|
|
balaji81_k wrote: |
Hi Sergeyken,
Its printed like >>> and then blanks . |
Check in hex if they are REAL blanks? You can also temporary convert your output field to hex, for debugging.
If they are, verify carefully your data, and all offsets/lengths.
Definitely you have some stupid typo somewhere.
There are no such things as miracles. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3048 Location: NYC,USA
|
|
|
|
With your SORT CARD , you should get below output.
Code: |
0111|ABC|888ABC.IUY |
So you are not telling us everything accurate, please double check what you are doing. |
|
Back to top |
|
|
balaji81_k
Active User
Joined: 29 Jun 2005 Posts: 155
|
|
|
|
Hi Sergeyken,
Yes i did a small logic issue in my sort . Now i corrected it and it is working fine.
Thanks |
|
Back to top |
|
|
balaji81_k
Active User
Joined: 29 Jun 2005 Posts: 155
|
|
|
|
Rohit Umarjikar wrote: |
With your SORT CARD , you should get below output.
Code: |
0111|ABC|888ABC.IUY |
So you are not telling us everything accurate, please double check what you are doing. |
Hi Rohit,
Sorry , Yes you are correct about the output . I do have one more BI field in between where the length is not correctly specified in my sort(which i have modified now) . Apologize for the wrong output posted |
|
Back to top |
|
|
|