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
 

 

Best Method/Utility to modify HEX value within a dataset?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
MrExtraordinare

New User


Joined: 11 Feb 2010
Posts: 3
Location: USA

PostPosted: Mon Mar 09, 2015 10:09 pm    Post subject: Best Method/Utility to modify HEX value within a dataset?
Reply with quote

What is the best method or utility within a JCL that would allows me to submit the job that will modify the HEX value from X'00' to X'40' without regard to a particular position or byte?

I'm trying to do a simple "Change" type commands to modify the hex value to change from X'00' to X'40' value.

Here is my JCL:
Code:
//STEP01   EXEC PGM=IKJEFT01                             
//*                                                       
//SYSTSPRT DD SYSOUT=*                                   
//SYSTSIN  DD *                                           
EDIT 'HLQ1.HLQ2.TEST.DATA' TEXT NONUM
TOP                                                       
C X'00' X'40'
END SAVE                                                 
/*                                                       


In 3.4 in ISPF, after doing a HEX ON command, this is what the data looks like:

Code:

----+----1----+----2----+----3----+----4
ZZZ BSS 
EEE4CEE00FF00000000000000000F00000000000
999022200FFFF0F0FFFFFFFFFFF0FF0000000000



Here is my sysout telling me that 'TEXT NOT FOUND'
Code:
READY                                                     
EDIT 'HLQ1.HLQ2.TEST.DATA' TEXT NONUM
EDIT                                                     
TOP                                                       
C X'00' X'40'                                     
TEXT NOT FOUND                                           
END SAVE                                                 
READY                                                     
END                                                       


I'm open to ideas. I do not understand why the above is telling me that 'TEXT NOT FOUND' when I know I can execute the same command within ISPF in edit mode inside my dataset without issue.

Am I doing something wrong here or missed something?

If you have a better idea/suggestion as to use DFSORT or something else, I'm open to it.

I appreciate any assistance you can provide as I'm beyond frustration.
Back to top
View user's profile Send private message

rinsio

New User


Joined: 16 Feb 2015
Posts: 13
Location: Madrid, Spain

PostPosted: Mon Mar 09, 2015 10:35 pm    Post subject:
Reply with quote

Hello MrExtraordinare
In my opiniĆ³n you can use ALTSEQ command of DFSORT is very useful. But you need to indicate from/to yoy want the make the change.
Below an example:


//SORT02 EXEC PGM=SORT,COND=(0,NE)
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=
//SORTOUT DD DSN=
// DCB=(LRECL=1300,RECFM=FB,BLKSIZE=0,DSORG=PS),
// UNIT=SYSDA,DISP=(,CATLG,DELETE),
// SPACE=(TRK,(15,10),RLSE)
//SYSIN DD *
SORT FIELDS=COPY
ALTSEQ CODE=(0040) * SUST.
OUTREC FIELDS=(1,415,416,17,TRAN=ALTSEQ,433,868)


In this case, from 416, 17 position the DFSORT change the values x'00' found.

Regards
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Mon Mar 09, 2015 10:43 pm    Post subject: Reply to: Best Method/Utility to modify HEX value within a dataset?
Reply with quote

Because in ISPF you are not using the TSO editor. In your batch job you are.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Mon Mar 09, 2015 10:45 pm    Post subject: Reply to: Best Method/Utility to modify HEX value within a dataset?
Reply with quote

Rinsio,

It would seem that the example shown by TS/OP just intends to change the first X'00' to X'40'.
Back to top
View user's profile Send private message
MrExtraordinare

New User


Joined: 11 Feb 2010
Posts: 3
Location: USA

PostPosted: Mon Mar 09, 2015 10:59 pm    Post subject: Reply to: Best Method/Utility to modify HEX value within a dataset?
Reply with quote

My intention is to eventually do a CHANGE ALL to replace all instances of X'00' with X'40'.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Mon Mar 09, 2015 11:06 pm    Post subject: Reply to: Best Method/Utility to modify HEX value within a dataset?
Reply with quote

Well then, if you are looking for an alternative to using the TSO line-editor, in batch, then Rinsio's ALTSEQ is a very good suggestion :-)
Back to top
View user's profile Send private message
MrExtraordinare

New User


Joined: 11 Feb 2010
Posts: 3
Location: USA

PostPosted: Tue Mar 10, 2015 12:02 am    Post subject:
Reply with quote

Rinsio & Bill,

I appreciate your ALTSEQ suggestion which did work perfect. It replaced all instances of X'00' to X'40'.

I found this example which fit what I was looking for:
http://ibmmainframes.com/about31293.html

This is what I used:
Code:
//SYSIN    DD *                   
  SORT FIELDS=COPY                 
  ALTSEQ CODE=(0040)               
  INREC BUILD=(1,102,TRAN=ALTSEQ)
/*                                 




where:
(0040) where 00 is the value you want to replace with the new 40 value.
OUTREC's 1 is first position and 102 is the LRECL.

Hope this help others who may have same issue.

Thank you very much! I appreciate your help.

--MrE

De-OUTREC FIELDS'd
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 FTP - JCL failed while passing FTP co... Suneetha1612 JCL & VSAM 12 Wed Nov 16, 2016 7:33 pm
No new posts To trim spaces in a pipe delimited da... Nish84 COBOL Programming 16 Mon Oct 10, 2016 1:54 pm
No new posts Best IMS DB Unload Utility jjabez10 IMS DB/DC 12 Thu Sep 22, 2016 11:15 pm
No new posts Allocate dataset withour BLKSIZE Susanta CLIST & REXX 2 Thu Sep 22, 2016 11:51 am
No new posts Any docs / links for isub- cobol comp... SRICOBSAS COBOL Programming 4 Fri Aug 26, 2016 2:35 pm


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