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
 

 

how to add leading zeroes?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    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

Frank Yaeger

DFSORT Moderator


Joined: 15 Feb 2005
Posts: 7130
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: 56

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: 217
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: 56

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: 217
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
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 Format record to remove Leading zeroes Learncoholic DFSORT/ICETOOL 14 Wed Apr 05, 2017 2:43 pm
No new posts Syncsort to remove the leading spaces V S Amarendra Reddy SYNCSORT 5 Fri Jan 08, 2016 9:47 pm
This topic is locked: you cannot edit posts or make replies. Mainframe Jobs in Leading Indian MNC aman2248 Mainframe Jobs 0 Mon Dec 21, 2015 3:25 pm
No new posts Add Trailing Zeroes depending upon th... Rohit Umarjikar DFSORT/ICETOOL 3 Fri Oct 23, 2015 1:47 am
No new posts Removing Leading Spaces and Removing ... rahulpala COBOL Programming 4 Fri Sep 04, 2015 4:58 am


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