View previous topic :: View next topic
|
Author |
Message |
avaneendra_linga
New User
Joined: 13 Dec 2006 Posts: 73 Location: Hyderabad
|
|
|
|
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 |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
avaneendra_linga
New User
Joined: 13 Dec 2006 Posts: 73 Location: Hyderabad
|
|
|
|
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 |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
|