View previous topic :: View next topic
|
Author |
Message |
revdpoel
New User
Joined: 01 Nov 2006 Posts: 56
|
|
|
|
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 |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
revdpoel
New User
Joined: 01 Nov 2006 Posts: 56
|
|
|
|
working
thanks |
|
Back to top |
|
|
muthuvel
Active User
Joined: 29 Nov 2005 Posts: 217 Location: Canada
|
|
|
|
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 |
|
Back to top |
|
|
revdpoel
New User
Joined: 01 Nov 2006 Posts: 56
|
|
|
|
you are right
i can just use
OPTION COPY ? |
|
Back to top |
|
|
muthuvel
Active User
Joined: 29 Nov 2005 Posts: 217 Location: Canada
|
|
|
|
yes .it will work |
|
Back to top |
|
|
|
|