View previous topic :: View next topic
|
Author |
Message |
sumueng
New User
Joined: 27 Nov 2008 Posts: 37 Location: Cochin
|
|
|
|
Hi,
Below is one particular record in a Variable length (VB) file. All the values after C13900 are in packed format.
Code: |
00000111111111122222222223333333333444444444455555
56789012345678901234567890123456789012345678901234
HC13900......................&......¬.....p.......
CCFFFFF0000000000000000000000530000050010091001000
831390000000000000000000000090C00C01F01F007F010C9C
^^^^ |
From the above record, i need to change the value 1100 to 32000. Note that the starting position of this value is 45 (since it is a VB file, Starting position will be 49) and the field declaration for this value is a PIC 9(7) Comp-3
Is it doable using a single sort card.
Let me know |
|
Back to top |
|
|
Arun Raj
Moderator
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
|
|
|
|
Sumeendar,
Do you want to replace the value for all the records? Or is it only for a single record/a few records based on some condition ? say 5,7,CH,EQ,C'HC13900' |
|
Back to top |
|
|
sumueng
New User
Joined: 27 Nov 2008 Posts: 37 Location: Cochin
|
|
|
|
In fact there is only one record for the following condition 5,7,CH,EQ,C'HC13900' |
|
Back to top |
|
|
gcicchet
Senior Member
Joined: 28 Jul 2006 Posts: 1702 Location: Australia
|
|
|
|
Hi,
if understand it correctly, this should do it
Code: |
//STEP1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=INPUT-FILE
//SORTOUT DD DSN=OUTPUT-FILE
//SYSIN DD *
OPTION COPY
OUTREC IFTHEN=(WHEN=(5,7,CH,EQ,C'HC13900'),
OVERLAY=(49:X'0032000C'))
/* |
Gerry |
|
Back to top |
|
|
|