Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: To change the value that resides in Packed format (PD)
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: 2284
Location: @my desk

PostPosted: Sat Mar 14, 2009 4:39 pm    Post subject:
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    Post subject: Reply to: To change the value that resides in Packed format
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: 1703
Location: Australia

PostPosted: Sun Mar 15, 2009 7:29 am    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Need to write record of PS File in ex... Chandan1993 JCL & VSAM 1 Wed Jun 07, 2017 1:35 am
No new posts How to change 'K' or 'M' use Sort vice_versa DFSORT/ICETOOL 5 Thu May 18, 2017 7:11 am
No new posts READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
No new posts Format record to remove Leading zeroes Learncoholic DFSORT/ICETOOL 14 Wed Apr 05, 2017 2:43 pm
No new posts How to pick only YYMMDD from DATE1P (... atulbaviskar SYNCSORT 7 Wed Mar 22, 2017 11:39 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us