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

Squeeze record left so that zeroes are removed


IBM Mainframe Forums -> SYNCSORT
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Vignesh Sid

New User


Joined: 04 Sep 2017
Posts: 43
Location: India

PostPosted: Fri Nov 10, 2017 1:40 pm
Reply with quote

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
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Fri Nov 10, 2017 3:15 pm
Reply with quote

Have you looked at the trailing . with HEX ON to determine its actual value?
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3048
Location: NYC,USA

PostPosted: Mon Nov 13, 2017 8:40 pm
Reply with quote

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
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2010
Location: USA

PostPosted: Mon Nov 13, 2017 11:34 pm
Reply with quote

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
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2455
Location: Hampshire, UK

PostPosted: Tue Nov 14, 2017 4:34 pm
Reply with quote

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
View user's profile Send private message
Vignesh Sid

New User


Joined: 04 Sep 2017
Posts: 43
Location: India

PostPosted: Wed Nov 15, 2017 5:02 pm
Reply with quote

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
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 -> SYNCSORT

 


Similar Topics
Topic Forum Replies
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts To find whether record count are true... DFSORT/ICETOOL 6
No new posts Validating record count of a file is ... DFSORT/ICETOOL 13
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
Search our Forums:

Back to Top