View previous topic :: View next topic
|
Author |
Message |
MrExtraordinare
New User
Joined: 11 Feb 2010 Posts: 4 Location: USA
|
|
|
|
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 |
|
|
rinsio
New User
Joined: 16 Feb 2015 Posts: 13 Location: Madrid, Spain
|
|
|
|
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 |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Because in ISPF you are not using the TSO editor. In your batch job you are. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
MrExtraordinare
New User
Joined: 11 Feb 2010 Posts: 4 Location: USA
|
|
|
|
My intention is to eventually do a CHANGE ALL to replace all instances of X'00' with X'40'. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
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 |
|
|
MrExtraordinare
New User
Joined: 11 Feb 2010 Posts: 4 Location: USA
|
|
|
|
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 |
|
|
|