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

Changing trailing spaces to leading zeros


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
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
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
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
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: 1702
Location: Australia

PostPosted: Fri Oct 14, 2011 7:07 am
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
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
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
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
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Keep leading zero(s) after convert fl... SYNCSORT 7
No new posts changing defaults in db2 admin - Unlo... DB2 0
No new posts Remove leading zeroes SYNCSORT 4
No new posts leading spaces can be removed in trai... DFSORT/ICETOOL 1
No new posts Cobol program with sequence number ra... COBOL Programming 5
Search our Forums:

Back to Top