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
 
Squeeze record left so that zeroes are removed

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> SYNCSORT
View previous topic :: :: View next topic  
Author Message
Vignesh Sid

New User


Joined: 04 Sep 2017
Posts: 22
Location: India

PostPosted: Fri Nov 10, 2017 1:40 pm    Post subject: Squeeze record left so that zeroes are removed
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: 1922
Location: UK

PostPosted: Fri Nov 10, 2017 3:15 pm    Post subject:
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

Senior Member


Joined: 21 Sep 2010
Posts: 1818
Location: NY,USA

PostPosted: Mon Nov 13, 2017 8:40 pm    Post subject:
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

Active User


Joined: 29 Apr 2008
Posts: 212
Location: Maryland

PostPosted: Mon Nov 13, 2017 11:34 pm    Post subject: Re: Squeeze record left so that zeroes are removed
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: 1922
Location: UK

PostPosted: Tue Nov 14, 2017 4:34 pm    Post subject:
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: 22
Location: India

PostPosted: Wed Nov 15, 2017 5:02 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> SYNCSORT All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Extract Record using range of Data scorp_rahul23 DFSORT/ICETOOL 3 Wed Nov 15, 2017 11:54 pm
No new posts Formatting multiple records to a sing... Vignesh Sid SYNCSORT 3 Tue Nov 07, 2017 12:22 pm
No new posts Format Last Record differently from r... Learncoholic DFSORT/ICETOOL 5 Tue Oct 24, 2017 12:01 pm
No new posts Copy 4 byte of data from the last rec... arunsoods DFSORT/ICETOOL 9 Fri Oct 06, 2017 12:15 pm
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm

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