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

how to add leading zeroes?


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
revdpoel

New User


Joined: 01 Nov 2006
Posts: 56

PostPosted: Tue Oct 21, 2008 8:22 pm
Reply with quote

This is my input (FB 80)

Code:

---------+---------+---------+---------+---------+------
               KNT_NR
---------+---------+---------+---------+---------+------
2  0123456789   1040.  PGBCARDS44-             19226.
2  0123456789   1049.  PGBCARDS44-           1801179.
---------+---------+---------+--


this is my sortcard

Code:

//SYSIN     DD *                           
  INCLUDE COND=(1,1,CH,EQ,C'2')           
  SORT   FIELDS=(1,1,CH,A)                 
  OUTREC FIELDS=(1,1,10X,17,4,24,11,44,9) 
  END


This is the output (FB 80)

Code:

2          1040PGBCARDS44-    19226
2          1049PGBCARDS44-  1801179


But I would likt the ouput to be

Code:

2          1040PGBCARDS44-000019226
2          1049PGBCARDS44-001801179


So with leading zeroes before the two last numbers
How can I get that?
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Tue Oct 21, 2008 9:07 pm
Reply with quote

You can use this OUTREC statement:

Code:

  OUTREC BUILD=(1,1,10X,17,4,24,11,44,9,ZD,M11,LENGTH=9)
Back to top
View user's profile Send private message
revdpoel

New User


Joined: 01 Nov 2006
Posts: 56

PostPosted: Tue Oct 21, 2008 10:11 pm
Reply with quote

working
thanks
Back to top
View user's profile Send private message
muthuvel

Active User


Joined: 29 Nov 2005
Posts: 217
Location: Canada

PostPosted: Wed Oct 22, 2008 6:50 pm
Reply with quote

Just of my curiosity i am asking this ,your sort card has

Code:
//SYSIN     DD *                           
  INCLUDE COND=(1,1,CH,EQ,C'2')           
  SORT   FIELDS=(1,1,CH,A)                 
  OUTREC FIELDS=(1,1,10X,17,4,24,11,44,9) 
  END


you are extracting/including only records with '2' and any special reason for sorting it again icon_neutral.gif
Back to top
View user's profile Send private message
revdpoel

New User


Joined: 01 Nov 2006
Posts: 56

PostPosted: Wed Oct 22, 2008 6:54 pm
Reply with quote

you are right
i can just use
OPTION COPY ?
Back to top
View user's profile Send private message
muthuvel

Active User


Joined: 29 Nov 2005
Posts: 217
Location: Canada

PostPosted: Wed Oct 22, 2008 7:25 pm
Reply with quote

yes .it will work
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 Remove leading zeroes SYNCSORT 4
No new posts leading spaces can be removed in trai... DFSORT/ICETOOL 1
No new posts How to display the leading zeros of a... DB2 7
No new posts How to fill with zeroes pd intended s... DFSORT/ICETOOL 6
Search our Forums:

Back to Top