IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

c all command


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
NEW2MAIN

New User


Joined: 20 Apr 2023
Posts: 7
Location: United States

PostPosted: Tue Mar 11, 2025 10:25 pm
Reply with quote

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
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1381
Location: Bamberg, Germany

PostPosted: Wed Mar 12, 2025 12:22 am
Reply with quote

What tools you have at hand to do that?
Back to top
View user's profile Send private message
NEW2MAIN

New User


Joined: 20 Apr 2023
Posts: 7
Location: United States

PostPosted: Wed Mar 12, 2025 12:31 am
Reply with quote

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
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1381
Location: Bamberg, Germany

PostPosted: Wed Mar 12, 2025 12:48 am
Reply with quote

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
View user's profile Send private message
NEW2MAIN

New User


Joined: 20 Apr 2023
Posts: 7
Location: United States

PostPosted: Wed Mar 12, 2025 12:54 am
Reply with quote

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
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1381
Location: Bamberg, Germany

PostPosted: Wed Mar 12, 2025 10:59 am
Reply with quote

Remove one of the "ALL" parameters please.
Back to top
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2194
Location: USA

PostPosted: Wed Mar 12, 2025 4:50 pm
Reply with quote

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
View user's profile Send private message
NEW2MAIN

New User


Joined: 20 Apr 2023
Posts: 7
Location: United States

PostPosted: Wed Mar 12, 2025 6:01 pm
Reply with quote

Joerg.Findeisen wrote:
Remove one of the "ALL" parameters please.


Thank you!

That worked flawlessly!
Back to top
View user's profile Send private message
NEW2MAIN

New User


Joined: 20 Apr 2023
Posts: 7
Location: United States

PostPosted: Wed Mar 12, 2025 6:02 pm
Reply with quote

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
View user's profile Send private message
sergeyken

Senior Member


Joined: 29 Apr 2008
Posts: 2194
Location: USA

PostPosted: Wed Mar 12, 2025 7:23 pm
Reply with quote

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
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2609
Location: Silicon Valley

PostPosted: Thu Mar 13, 2025 7:06 am
Reply with quote

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
View user's profile Send private message
Joerg.Findeisen

Senior Member


Joined: 15 Aug 2015
Posts: 1381
Location: Bamberg, Germany

PostPosted: Thu Mar 13, 2025 10:05 am
Reply with quote

@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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts REXX/CMS How to place command console... CLIST & REXX 4
No new posts Help needed in automation cics transa... CLIST & REXX 1
No new posts How to Login in to cics region and is... CICS 9
No new posts Passing containers on START command CICS 4
No new posts RACF - Rebuild SETROPTS command which... All Other Mainframe Topics 3
Search our Forums:

Back to Top