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

To change the value that resides in Packed format (PD)


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sumueng

New User


Joined: 27 Nov 2008
Posts: 37
Location: Cochin

PostPosted: Sat Mar 14, 2009 3:34 pm
Reply with quote

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
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Sat Mar 14, 2009 4:39 pm
Reply with quote

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
View user's profile Send private message
sumueng

New User


Joined: 27 Nov 2008
Posts: 37
Location: Cochin

PostPosted: Sat Mar 14, 2009 7:42 pm
Reply with quote

In fact there is only one record for the following condition 5,7,CH,EQ,C'HC13900'
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Sun Mar 15, 2009 7:29 am
Reply with quote

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
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Populate last day of the Month in MMD... SYNCSORT 2
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Need to convert date format DFSORT/ICETOOL 20
No new posts PD not working for unsigned packed JO... DFSORT/ICETOOL 5
No new posts Def PD not working for unsigned packe... JCL & VSAM 3
Search our Forums:

Back to Top