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: 2239
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 How to pick only YYMMDD from DATE1P (... atulbaviskar SYNCSORT 7 Wed Mar 22, 2017 11:39 am
No new posts Date and time format in CICS Chandru3183 CICS 2 Sat Mar 18, 2017 12:46 pm
No new posts Fail to change physical VSAM filename... jacobdng CICS 7 Fri Jan 20, 2017 12:36 pm
No new posts Match or compare two files in VB Format anatol DFSORT/ICETOOL 14 Thu Nov 03, 2016 7:41 pm
No new posts Low values Results from VARCHAR FORMAT balaji81_k DB2 10 Thu Oct 20, 2016 1:18 am


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