Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Changing trailing spaces to leading zeros

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Suraj.Nair

New User


Joined: 07 Jun 2011
Posts: 17
Location: Canada

PostPosted: Fri Oct 14, 2011 12:44 am    Post subject: Changing trailing spaces to leading zeros
Reply with quote

Hi

I have got a sort card for the operation but I am unable to figure out what needs to be done to omit header and trailer. Header is identified by 1,4,CH,C'0000' and trailer is identified by 1,4,CH,C'9999'. Kindly help.

SORT CARD

Code:

  OPTION COPY                                               
  INREC IFTHEN=(WHEN=(1,4,CH,NE,C'0000',1,4,CH,NE,C'9999'),
   IFTHEN=(WHEN=INIT,                                       
      BUILD=(1,62,63,9,SQZ=(SHIFT=RIGHT),72,458)),             
  IFTHEN=(WHEN=INIT,                                       
     FINDREP=(STARTPOS=63,ENDPOS=71,IN=C' ',OUT=C'0')))
Back to top
View user's profile Send private message

Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Fri Oct 14, 2011 1:31 am    Post subject: Reply to: Changing trailing spaces to leading zeros
Reply with quote

surajnair,

if your intention is to pad zeroes for numeric values at pos 63 then you don't have to do all that SQZ and FINDREP operations

use this

Code:

  OUTREC IFTHEN=(WHEN=INIT,BUILD=(1,529)),
    IFTHEN=(WHEN=(1,4,SS,NE,C'0000,9999'),   
      OVERLAY=(63:63,9,UFF,M11,LENGTH=9))     
Back to top
View user's profile Send private message
Suraj.Nair

New User


Joined: 07 Jun 2011
Posts: 17
Location: Canada

PostPosted: Fri Oct 14, 2011 6:26 am    Post subject:
Reply with quote

Hi

My aim is to replace trailing spaces with leading zeros. And I dont want this to happen for header and trailer.

Regards Suraj
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Fri Oct 14, 2011 7:07 am    Post subject:
Reply with quote

Hi,

did you try the solution given by Kolusu ?


Gerry
Back to top
View user's profile Send private message
Suraj.Nair

New User


Joined: 07 Jun 2011
Posts: 17
Location: Canada

PostPosted: Tue Oct 18, 2011 7:07 pm    Post subject:
Reply with quote

I am getting the below error when i submit Kolusu's solution.

Code:

ICE802I 0 BLOCKSET     TECHNIQUE IN CONTROL                           
ICE000I 1 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R12 - 10:13
            OUTREC IFTHEN=(WHEN=INIT,BUILD=(1,529)),                 
            IFTHEN=(WHEN=(1,4,SS,NE,C'0000,9999'),                   
            OVERLAY=(63:63,9,UFF,M11,LENGTH=9))                       
ICE010A 0 NO SORT OR MERGE CONTROL STATEMENT                         
ICE751I 0 C5-K62149 C6-K90026 E7-K70685                               
ICE052I 3 END OF DFSORT
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Oct 18, 2011 7:25 pm    Post subject:
Reply with quote

Suraj.Nair

NO SORT OR MERGE CONTROL STATEMENT

i guess it is kolusu's fault, because he only provided you with OUTREC
statements to replace all that INREC stuff,

and did not tell you that you need the OPTION COPY card.

[Personal Opinion start]

you would fit right-in with the non-thinking types in my shop.
can't do anything on their own,
and don't allow anyone to make an assumption of their capabilities.
for every 2 or 3 people like you, we have 1 to do all the work.

so is it in socialism and unionized shops

But don't blame Kolusu alone,
anyone of us could have seen the glaring error he made
and could have warned you to
NOT FORGET THE OPTION card
[Personal Opinion end]
Back to top
View user's profile Send private message
Suraj.Nair

New User


Joined: 07 Jun 2011
Posts: 17
Location: Canada

PostPosted: Tue Oct 18, 2011 7:36 pm    Post subject:
Reply with quote

Hi Dick

Thats bad on my part as well should have verified the error report. Thanks a lot Kolusu and Dick and sorry for the inconvenience.

Regards Suraj
Back to top
View user's profile Send private message
Suraj.Nair

New User


Joined: 07 Jun 2011
Posts: 17
Location: Canada

PostPosted: Tue Oct 18, 2011 7:36 pm    Post subject:
Reply with quote

It worked. Thanks once again.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Oct 18, 2011 7:52 pm    Post subject:
Reply with quote

No problem, thx for getting back,
and in the future,
explain your problem, I imagine someone will help.

you have a good thick skin, look forward to your question (if any) and contributions in the future.
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 -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts To trim spaces in a pipe delimited da... Nish84 COBOL Programming 16 Mon Oct 10, 2016 1:54 pm
No new posts Removing Extra Spaces in a comma sepa... Puspojit DFSORT/ICETOOL 3 Tue Sep 13, 2016 7:46 am
No new posts changing z/os unicode conversion service meykh2014 All Other Mainframe Topics 0 Tue Jul 12, 2016 10:49 am
No new posts Join key - Populate Zeros when Unpair... rexx77 DFSORT/ICETOOL 6 Thu May 12, 2016 12:22 am
No new posts Problems in File-Aid / DB2 Spufi whil... amitc23 CLIST & REXX 6 Fri Feb 12, 2016 1:59 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us