View previous topic :: View next topic
|
Author |
Message |
NEW2MAIN
New User

Joined: 20 Apr 2023 Posts: 7 Location: United States
|
|
|
|
to change one character to another character in a VSAM file in columns 50-54.
specifically, I have a VSAM file that has a small matrix. This matrix is made of letters A,B,C,D,E and F. I want to change all "A" values to "F" there are far too many to change manually. I know there is a way to change all instances of a single character, word, number, or symbol in a given column or column range.
I was hoping that someone might know what that command would look like.
Thank you. |
|
Back to top |
|
 |
Joerg.Findeisen
Senior Member

Joined: 15 Aug 2015 Posts: 1381 Location: Bamberg, Germany
|
|
|
|
What tools you have at hand to do that? |
|
Back to top |
|
 |
NEW2MAIN
New User

Joined: 20 Apr 2023 Posts: 7 Location: United States
|
|
|
|
5650-ZOS
I am not using any additional tools. I am just using what is included in the tool set available in the 5650 ZOS build. I hope this answers your question. This is a command line command.
c all p'-' 1 10 "0"
Change all non-numeric characters in columns 1 to 10 into the char "0".
this is an example I copied from IBM's site. |
|
Back to top |
|
 |
Joerg.Findeisen
Senior Member

Joined: 15 Aug 2015 Posts: 1381 Location: Bamberg, Germany
|
|
|
|
If you can edit your VSAM directly, you have the command already.
Code: |
C ALL 'A' 'F' 50 54 ALL |
If not, and no other tools like FileManager z/OS, or FileAid are at hand, you can Unload/Reload using IDCAMS REPRO and ISPF 3.4 to EDIT. Other methods could be using DFSORT and so on. |
|
Back to top |
|
 |
NEW2MAIN
New User

Joined: 20 Apr 2023 Posts: 7 Location: United States
|
|
|
|
thank you. I tried your command and got the following error:
Inconsistent parameters
any idea?
At this point, since there are only 5 columns of data, I can do one column at a time if that helps. |
|
Back to top |
|
 |
Joerg.Findeisen
Senior Member

Joined: 15 Aug 2015 Posts: 1381 Location: Bamberg, Germany
|
|
|
|
Remove one of the "ALL" parameters please. |
|
Back to top |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2194 Location: USA
|
|
|
|
NEW2MAIN wrote: |
I am not using any additional tools. I am just using what is included in the tool set available in the 5650 ZOS build. I hope this answers your question. This is a command line command.
c all p'-' 1 10 "0"
Change all non-numeric characters in columns 1 to 10 into the char "0".
this is an example I copied from IBM's site. |
The "tool" you've mentioned is called "ISPF text editor".
1. This tool has nothing to do neither with JCL language, nor with VSAM access method.
2. No VSAM file can be ever edited using ISPF editor. |
|
Back to top |
|
 |
NEW2MAIN
New User

Joined: 20 Apr 2023 Posts: 7 Location: United States
|
|
|
|
Joerg.Findeisen wrote: |
Remove one of the "ALL" parameters please. |
Thank you!
That worked flawlessly! |
|
Back to top |
|
 |
NEW2MAIN
New User

Joined: 20 Apr 2023 Posts: 7 Location: United States
|
|
|
|
sergeyken wrote: |
NEW2MAIN wrote: |
I am not using any additional tools. I am just using what is included in the tool set available in the 5650 ZOS build. I hope this answers your question. This is a command line command.
c all p'-' 1 10 "0"
Change all non-numeric characters in columns 1 to 10 into the char "0".
this is an example I copied from IBM's site. |
The "tool" you've mentioned is called "ISPF text editor".
1. This tool has nothing to do neither with JCL language, nor with VSAM access method.
2. No VSAM file can be ever edited using ISPF editor. |
Thank you for your input. |
|
Back to top |
|
 |
sergeyken
Senior Member

Joined: 29 Apr 2008 Posts: 2194 Location: USA
|
|
|
|
NEW2MAIN wrote: |
sergeyken wrote: |
NEW2MAIN wrote: |
I am not using any additional tools. I am just using what is included in the tool set available in the 5650 ZOS build. I hope this answers your question. This is a command line command.
c all p'-' 1 10 "0"
Change all non-numeric characters in columns 1 to 10 into the char "0".
this is an example I copied from IBM's site. |
The "tool" you've mentioned is called "ISPF text editor".
1. This tool has nothing to do neither with JCL language, nor with VSAM access method.
2. No VSAM file can be ever edited using ISPF editor. |
Thank you for your input. |
It's a pity one cannot see any difference between flat file, and VSAM file... |
|
Back to top |
|
 |
Pedro
Global Moderator

Joined: 01 Sep 2006 Posts: 2609 Location: Silicon Valley
|
|
|
|
re: I have a VSAM file that has a
I have been retired for several years and thought that somehow ISPF had been enhanced to support VSAM records but Sergeyken indicates that it has not. You probably do not have a VSAM file. |
|
Back to top |
|
 |
Joerg.Findeisen
Senior Member

Joined: 15 Aug 2015 Posts: 1381 Location: Bamberg, Germany
|
|
|
|
@Pedro: ISPF can be configured for dealing with VSAM. However this is then handled by external applications (for ex. FMNZ), if enabled.
Code: |
VSAM Support :
Enable VSAM Edit : NO Limit VSAM Edit :NO
Enable VSAM View : NO Limit VSAM View :NO
Enable VSAM Browse: NO Limit VSAM Browse :NO
VSAM commands :
Edit : FMNINV DSE /
View : FMNINV DSV /
Browse: FMNINV DSB / |
|
|
Back to top |
|
 |
|