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

How to execute tso commands in rexx


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Ashok09

New User


Joined: 29 Mar 2009
Posts: 20
Location: Chennai

PostPosted: Thu Apr 30, 2009 6:00 pm
Reply with quote

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

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Thu Apr 30, 2009 6:06 pm
Reply with quote

Search the forum for ISPF edit macro, that is one of the most common ways of doing this.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Thu Apr 30, 2009 6:29 pm
Reply with quote

See my response to this topic.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Apr 30, 2009 7:01 pm
Reply with quote

Ashok09,

the change all command is an ISPF command.

on your command line type: tso help
that will list TSO commands.

refer to the op-sys that you run on to find ISPF manuals

this is a list of REXX manuals
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Thu Apr 30, 2009 9:04 pm
Reply with quote

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

Active User


Joined: 28 Nov 2006
Posts: 305
Location: Deerfield IL

PostPosted: Thu Apr 30, 2009 10:43 pm
Reply with quote

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

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Apr 30, 2009 10:54 pm
Reply with quote

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

New User


Joined: 29 Mar 2009
Posts: 20
Location: Chennai

PostPosted: Sun May 03, 2009 11:22 am
Reply with quote

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

New User


Joined: 29 Mar 2009
Posts: 20
Location: Chennai

PostPosted: Mon May 04, 2009 11:42 am
Reply with quote

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

Active User


Joined: 28 Nov 2006
Posts: 305
Location: Deerfield IL

PostPosted: Mon May 04, 2009 8:34 pm
Reply with quote

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

New User


Joined: 29 Mar 2009
Posts: 20
Location: Chennai

PostPosted: Tue May 05, 2009 11:28 am
Reply with quote

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

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue May 05, 2009 11:30 am
Reply with quote

Please cut and paste the rror messages complete with the error codes issued.
Back to top
View user's profile Send private message
Ashok09

New User


Joined: 29 Mar 2009
Posts: 20
Location: Chennai

PostPosted: Tue May 05, 2009 1:19 pm
Reply with quote

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

Senior Member


Joined: 08 May 2006
Posts: 1193
Location: Dublin, Ireland

PostPosted: Tue May 05, 2009 1:45 pm
Reply with quote

Are you really naming your dataset xxxx.xxxx.xxxx ?

Garry.
Back to top
View user's profile Send private message
PeD

Active User


Joined: 26 Nov 2005
Posts: 459
Location: Belgium

PostPosted: Tue May 05, 2009 1:54 pm
Reply with quote

specify data set name between quotes.
Back to top
View user's profile Send private message
Ashok09

New User


Joined: 29 Mar 2009
Posts: 20
Location: Chennai

PostPosted: Tue May 05, 2009 3:54 pm
Reply with quote

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

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue May 05, 2009 3:57 pm
Reply with quote

And what do the IKJ*** messages tell you from the manual ?
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Tue May 05, 2009 5:03 pm
Reply with quote

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

Active User


Joined: 28 Nov 2006
Posts: 305
Location: Deerfield IL

PostPosted: Tue May 05, 2009 8:41 pm
Reply with quote

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

New User


Joined: 29 Mar 2009
Posts: 20
Location: Chennai

PostPosted: Wed May 06, 2009 11:06 am
Reply with quote

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

Active User


Joined: 28 Nov 2006
Posts: 305
Location: Deerfield IL

PostPosted: Wed May 06, 2009 7:38 pm
Reply with quote

What did you change command look like? Was it like this?
Code:
QUEUE "C * 999999 /A/B/ ALL"
Back to top
View user's profile Send private message
Ashok09

New User


Joined: 29 Mar 2009
Posts: 20
Location: Chennai

PostPosted: Wed May 06, 2009 8:25 pm
Reply with quote

I changed it like this.
Quote:
Code:
QUEUE "C * 999999 /A/B/ ALL"


Now its working finely. Thanks douglas and all.
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 -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
No new posts run rexx code with jcl CLIST & REXX 15
No new posts Execute secondary panel of sdsf with ... CLIST & REXX 1
Search our Forums:

Back to Top