View previous topic :: View next topic
|
Author |
Message |
Hima1985
New User
Joined: 17 Apr 2009 Posts: 70 Location: India
|
|
|
|
Hi ..
Could you please let me know how to insert value 500 (in a 4byte binary field) using SORT OUTREC.
Scenario -
Input file - FB/LRECL-30
Output File(FB/LRECL-45) format should be
1 30BYTESFROMINPUTFILE50011111111
Here the field where value 500 should be inserted is defined as binary with length 4 (S9(09) COMP.).
Please help. |
|
Back to top |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Is this your input?
Code: |
000000000111111111122222222223
123456789012345678901234567890
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
Where 'x' is some data.
And is this your expected output?
Code: |
000000000111111111122222222223333333333444444
123456789012345678901234567890123456789012345
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx9999bbbbbbbbbbb |
Where 9999 is a 4 byte binary field with a value of 500 and 'b' is blank/space filler. |
|
Back to top |
|
|
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
Hima1985,
Use the following control cards
Code: |
//SYSIN DD *
SORT FIELDS=COPY
OUTREC BUILD=(1,30,33:+500,TO=BI,LENGTH=4,45:X)
//* |
|
|
Back to top |
|
|
Hima1985
New User
Joined: 17 Apr 2009 Posts: 70 Location: India
|
|
|
|
Thanks a lottttt .. It worked |
|
Back to top |
|
|
|