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

Displacement in DFSORT OUTREC Fields


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

New User


Joined: 13 Dec 2006
Posts: 73
Location: Hyderabad

PostPosted: Thu May 03, 2007 7:41 pm
Reply with quote

HI ,

I AM ADDING A SEQUENCE NUMBER TO INPUT FILE IN FIRST FIVE DIGITS
AND I AM FORMATING THE SEQUENCE NUMBER TO GET COMA SEPEARED VALUES AND WITH STRIPPED ZEROES.

THE BELOW ONE IS GIVING CORRECT RESULT BUT MY SEQUENCE NUMBER IS COMING STARTING AT '3 rd COLUMN ' .
CAN ANY BODY HELP ON THIS?

Code:

//SYSIN DD *
   INREC FIELDS=(SEQNUM,5,ZD,START=1,INCR=1,6,129) 
   OPTION COPY                                 
   OUTREC BUILD=(1:1,5,UFF,M12,6,129)
/*


Warning: All Caps
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: Thu May 03, 2007 9:56 pm
Reply with quote

You're using the M12 mask for a 5-byte UFF field. This gives an output value of 'SII,IIT'. So for sequence number 1, you would get 'bbbbbb1' (b for blank). For sequence number 12345, you would get 'b12,345'. You need to use the correct edit mask to get what you want, but since I don't actually know what you want, I can't tell you which edit mask to use.

What is it exactly that you want the output field to look like for the following sequence numbers

00001
00012
00150
01623
12345
Back to top
View user's profile Send private message
avaneendra_linga

New User


Joined: 13 Dec 2006
Posts: 73
Location: Hyderabad

PostPosted: Fri May 04, 2007 10:47 am
Reply with quote

hi frank ,
in the input file between 1 TO 5 i have some sequence numbers , now i want to reformat them (ie i want to give new sequence numbers startting from one and oytformat should be in UFF Format).

output:

8,003
8,004
8,005
8,006
8,007
8,008
and it should be between 1 and 5 positions only.
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: Fri May 04, 2007 8:20 pm
Reply with quote

For values like 8,003 you could use EDIT=(T,TTT) or EDIT=(I,IIT) as the edit mask instead of M12 depending on whether you want leading zeros shown or not.
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 Date format correction using dfsort DFSORT/ICETOOL 3
No new posts Pull data using date difference betwe... DB2 6
No new posts DFSORT GUID DFSORT/ICETOOL 5
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
Search our Forums:

Back to Top