View previous topic :: View next topic
|
Author |
Message |
Vignesh Sid
New User
Joined: 04 Sep 2017 Posts: 43 Location: India
|
|
|
|
Hi all,
I have an input file lrecl 850 and FB. syncsort product is used.
Code: |
"ENDOFDATA",ABC={ 2},DEF={ 5},GHI={ 8}; |
I need to squeeze this record left so that zeroes are removed.
Expected output: lrecl = 850 and FB.
Code: |
"ENDOFDATA",ABC={2},DEF={5},GHI={8}; |
I used the following card :
Code: |
//SYSIN DD *
SORT FIELDS=COPY
OUTREC IFTHEN=(WHEN=(2,3,CH,EQ,C'END'),
BUILD=(1,850,SQZ=(SHIFT=LEFT)))
/* |
I get the below output:
Code: |
"ENDOFDATA",ABC={2},DEF={5},GHI={8};. |
I am not sure why the trailing . is added.
Please let me know a solution for this.
Thanks! |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
Have you looked at the trailing . with HEX ON to determine its actual value? |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3048 Location: NYC,USA
|
|
|
|
Quote: |
I need to squeeze this record left so that zeroes are removed. |
Where are zeroes? they are called spaces.
Cetainly, "." is some data value which you overlooked from the input value. |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2010 Location: USA
|
|
|
|
Vignesh Sid wrote: |
I am not sure why the trailing . is added.
Please let me know a solution for this. |
1. Check the actual value of the suspicious byte in HEX viewing mode.
2. Verify carefully all 850 bytes of your input record. I bet there is the same byte somewhere close to its end. Most likely, it is UNIX-style "end-of-record" byte X'00' at position 850. In ISPF View, you can use FIND X'00' (or another value) to find it. Also you can use FIND p'.' command to find ANY non-printable character/byte. |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
Viky,
You have not come back with the requested information. Are we to assume that you have resolved the problem? If so, what was the solution?
This will help people looking at the topic in the future. |
|
Back to top |
|
|
Vignesh Sid
New User
Joined: 04 Sep 2017 Posts: 43 Location: India
|
|
|
|
Hi all,
As Rohit stated
"Cetainly, "." is some data value which you overlooked from the input value."
I took a look from where this . gets populated in input file and I got the positin where it is present.
This is solved now.
Thanks for all your replies! |
|
Back to top |
|
|
|