Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
how to add leading zeroes?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
Author Message
revdpoel

New User


Joined: 01 Nov 2006
Posts: 32

PostPosted: Tue Oct 21, 2008 8:22 pm    Post subject: how to add leading zeroes?
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
References
Frank Yaeger

DFSORT Moderator


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

PostPosted: Tue Oct 21, 2008 9:07 pm    Post subject:
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: 32

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

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

Active User


Joined: 29 Nov 2005
Posts: 196
Location: Chennai

PostPosted: Wed Oct 22, 2008 6:50 pm    Post subject:
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: 32

PostPosted: Wed Oct 22, 2008 6:54 pm    Post subject:
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: 196
Location: Chennai

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

yes .it will work
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1