Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 2285
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 Partial color change of a field in CI... waseem0424 CICS 5 Fri Sep 29, 2017 7:56 pm
No new posts Fetch Previous month & year in MM... girishb2 DFSORT/ICETOOL 3 Thu Sep 21, 2017 9:54 pm
No new posts Convert rows and column into JSON for... Dinesh Manivannan DB2 2 Sun Sep 03, 2017 6:50 pm
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts How to change a string containing the... chong.zhou TSO/ISPF 6 Tue Aug 29, 2017 4:54 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us