View previous topic :: View next topic
|
Author |
Message |
Ashok09
New User
Joined: 29 Mar 2009 Posts: 20 Location: Chennai
|
|
|
|
Hi,
Can you tell me how to execute tso commands in rexx
I want to execute 'Change all' command via rexx
I tried the below code in rexx but not working.
address tso 'c all A B'
If you need more information let me know. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Search the forum for ISPF edit macro, that is one of the most common ways of doing this. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2593 Location: Silicon Valley
|
|
|
|
What you are describing is an ISPF editor macro. Study chapter 5 and chapter 6 of 'Edit and Edit macros' from the ISPF library. Some of the examples there are CLIST, but I recommend you concentrate on the rexx examples. |
|
Back to top |
|
|
Douglas Wilder
Active User
Joined: 28 Nov 2006 Posts: 305 Location: Deerfield IL
|
|
|
|
"Change all" may be done either in TSO Edit or ISPF Edit. If you would like to do it in TSO edit follow the link that Superk gave above. If you would like to use an ISPF edit macro there are many examples on this forum. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Douglas,
Change ALL is an ISPF command.
If you would like to see 'TSO EDIT',
exit from ispf and at the ready prompt of tso enter EDIT. |
|
Back to top |
|
|
Ashok09
New User
Joined: 29 Mar 2009 Posts: 20 Location: Chennai
|
|
|
|
All,
Any method it may like TSO Edit or ISPF Edit..i want to do 'CHANGE ALL' thru REXX....
I referred some of the manuals posted.I wil try superk posted example and let u know...
Thank u all for your kind reply |
|
Back to top |
|
|
Ashok09
New User
Joined: 29 Mar 2009 Posts: 20 Location: Chennai
|
|
|
|
superk,
I executed the code which u posted
Quote: |
See my response to this topic. |
/* REXX */
Queue "TOP"
Queue "A B /OLD/NEW/"
Queue "END SAVE"
"EDIT xxxx.xxxx CNTL NONUM OLD"
This is what it showing.
DATA SET xxxx.xxxx NOT IN CATALOG
COMMAND TOP NOT FOUND
Do i need to add anything more??? |
|
Back to top |
|
|
Douglas Wilder
Active User
Joined: 28 Nov 2006 Posts: 305 Location: Deerfield IL
|
|
|
|
Quote: |
DATA SET xxxx.xxxx NOT IN CATALOG |
Look at exactly what dataset the message said is not in the catalog.
This is the dataset you told it to edit and it is not there. Does it end in .CNTL?
When you get the dataset to edit fixed then fix your change all command
Code: |
QUEUE "C * 999999 /OLD/NEW/ ALL" |
The C is the "change" sub-command |
|
Back to top |
|
|
Ashok09
New User
Joined: 29 Mar 2009 Posts: 20 Location: Chennai
|
|
|
|
The dataset which i gave is in catalog.
/* REXX */
Queue "TOP"
Queue "C A B /OLD/NEW/"
Queue "END SAVE"
"EDIT xxxx.xxxx.xxxx CNTL NONUM OLD"
It showing again the same messages.
DATA SET xxxx.xxxx.xxxx NOT IN CATALOG
COMMAND TOP NOT FOUND
COMMAND C NOT FOUND |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Please cut and paste the rror messages complete with the error codes issued. |
|
Back to top |
|
|
Ashok09
New User
Joined: 29 Mar 2009 Posts: 20 Location: Chennai
|
|
|
|
Here it is
********************************* TOP OF DATA **********************************
IKJ52307I DATA SET xxxx.xxxx.xxxx NOT IN CATALOG
IKJ56500I COMMAND TOP NOT FOUND
IKJ56500I COMMAND C NOT FOUND
READY
END
******************************** BOTTOM OF DATA ******************************** |
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1205 Location: Dublin, Ireland
|
|
|
|
Are you really naming your dataset xxxx.xxxx.xxxx ?
Garry. |
|
Back to top |
|
|
PeD
Active User
Joined: 26 Nov 2005 Posts: 459 Location: Belgium
|
|
|
|
specify data set name between quotes. |
|
Back to top |
|
|
Ashok09
New User
Joined: 29 Mar 2009 Posts: 20 Location: Chennai
|
|
|
|
No.
Quote: |
Are you really naming your dataset xxxx.xxxx.xxxx ? |
I Used in single quotes. But different message.
Quote: |
specify data set name between quotes. |
********************************* TOP OF DATA **********************************
IKJ52336I 121 INVALID LINE VALUE FOR CNTL DATA SET
IKJ56500I COMMAND TOP NOT FOUND
IKJ56500I COMMAND C NOT FOUND
READY
END
******************************** BOTTOM OF DATA ********************************
For double quotes it showing the last posted messages. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
And what do the IKJ*** messages tell you from the manual ? |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
OK. I tested out the basic process and it works:
Code: |
/* REXX */
Queue "TOP"
Queue "C * 999999 /OLD/NEW/ ALL"
Queue "END SAVE"
"EDIT 'MYHLQ.PDS(TEST)' CNTL NONUM OLD"
Exit 0
|
where 'MYHLQ.PDS' is a PDS, RECFM=FB, LRECL=80. |
|
Back to top |
|
|
Douglas Wilder
Active User
Joined: 28 Nov 2006 Posts: 305 Location: Deerfield IL
|
|
|
|
Quote: |
IKJ52336I 121 INVALID LINE VALUE FOR CNTL DATA SET
|
Is your file JCL? If not remove the CNTL, if Yes then change the LRECL to a valid length like say 80. |
|
Back to top |
|
|
Ashok09
New User
Joined: 29 Mar 2009 Posts: 20 Location: Chennai
|
|
|
|
superk,
I used the code posted with RECFM=FB, LRECL=80 for input file.
Im changing A to B. Its showing text not found.
********************************* TOP OF DATA **********************************
IKJ52506I TEXT NOT FOUND
READY
END
******************************** BOTTOM OF DATA ********************************
Input Data
A
A
C
D |
|
Back to top |
|
|
Douglas Wilder
Active User
Joined: 28 Nov 2006 Posts: 305 Location: Deerfield IL
|
|
|
|
What did you change command look like? Was it like this?
Code: |
QUEUE "C * 999999 /A/B/ ALL" |
|
|
Back to top |
|
|
Ashok09
New User
Joined: 29 Mar 2009 Posts: 20 Location: Chennai
|
|
|
|
I changed it like this.
Quote: |
Code:
QUEUE "C * 999999 /A/B/ ALL"
|
Now its working finely. Thanks douglas and all. |
|
Back to top |
|
|
|