Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to run a TSO command in JCL to be executed in a dataset.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
sakthisiga
Warnings : 1

New User


Joined: 11 Jun 2009
Posts: 60
Location: Chennai

PostPosted: Wed Nov 03, 2010 11:20 am    Post subject: How to run a TSO command in JCL to be executed in a dataset.
Reply with quote

Hi All,


How to run the sequence of TSO commands using JCL to be executed in a dataset?

Exmaple:

I have a dataset : xxx.yyy.zzz(mem)

If I run a JCL, it would execute "SAVE" command in the above mentioned JCL.


Could anyone please help me?
Back to top
View user's profile Send private message

vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1506
Location: Chennai

PostPosted: Wed Nov 03, 2010 11:24 am    Post subject:
Reply with quote

Hi,
Are you trying to run a set of commands that are placed inside a PDS mem?
or
Are you trying to run ISREDIT macros?
Some more info pls..
Back to top
View user's profile Send private message
sakthisiga
Warnings : 1

New User


Joined: 11 Jun 2009
Posts: 60
Location: Chennai

PostPosted: Wed Nov 03, 2010 11:39 am    Post subject:
Reply with quote

I would just like to give the TSO commands in JCL using SYSIN DD * (not sure, whether it would work).

I don't want to give input a dataset with TSO commands.
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1506
Location: Chennai

PostPosted: Wed Nov 03, 2010 12:02 pm    Post subject:
Reply with quote

TSO Command:
Code:
 TSO HLIST  LEVEL(A) MCDS  SELECT(ML2)


Equivalent JCL:

Code:
//PS010 EXEC PGM=IKJEFT01                               
//SYSTSPRT DD SYSOUT=*                                   
//SYSTSIN DD *                                           
 HLIST  LEVEL(A) MCDS  SELECT(ML2)
/*


What is the command you are trying to execute?
Back to top
View user's profile Send private message
sakthisiga
Warnings : 1

New User


Joined: 11 Jun 2009
Posts: 60
Location: Chennai

PostPosted: Wed Nov 03, 2010 12:08 pm    Post subject:
Reply with quote

Thanks for your reply and code.

I need to execute a command "SORT 17 19" in a dataset.

but I need to run it by using a JCL.

Sorry for the inconvenience, I have mentioned TSO command instead of "Command Line" commnad in the previous post.
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1506
Location: Chennai

PostPosted: Wed Nov 03, 2010 12:13 pm    Post subject:
Reply with quote

If you need to sort the contents of a dataset, then you would be required to use a SORT JCL. either DFSORT or SYNCSORT.

To make things clear, The commands you execute while editing a PS or PDS like SORT, SAVE,CANCEL,UNNUM,UNDO can be execute only via ISREDIT macros. They are not TSO commands.

TSO commands are executed by "TSO <command>"
example TSO HELP.
Back to top
View user's profile Send private message
sakthisiga
Warnings : 1

New User


Joined: 11 Jun 2009
Posts: 60
Location: Chennai

PostPosted: Wed Nov 03, 2010 12:21 pm    Post subject:
Reply with quote

Thanks for your help Vasanth.


Could you please give some links to learn the ISREDIT macro?

Also please give me a sample JCL for the same?
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1506
Location: Chennai

PostPosted: Wed Nov 03, 2010 12:36 pm    Post subject:
Reply with quote

For sorting you should definitely try out DFSORT or SYNCSORT in JCL which is easier and efficient.

If you would like to learn about ISREDIT Macros then
This link should be a good place to start,
http://theamericanprogrammer.com/programming/holymac.shtml

A crude ISREDIT example which performs C ALL 'A' 'B' 1

Code:
/*REXX*/                       
"ISREDIT MACRO (PARM)"         
"ISPEXEC CONTROL ERRORS RETURN"
"ISREDIT CAPS OFF"             
"ISREDIT CHANGE ALL 'A' 'B' 1"
"ISREDIT RESET"                 
EXIT 


Hope this helps.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Extra character appears in file when ... Balu5491 All Other Mainframe Topics 1 Wed Jul 26, 2017 2:39 pm
No new posts Browse dataset cvnlynn CLIST & REXX 4 Tue Jul 18, 2017 3:52 am
No new posts Fileaid 2 commands instream work. In ... descann Compuware & Other Tools 2 Tue May 16, 2017 3:31 pm
No new posts To find out size allocated to a seque... ashek15 JCL & VSAM 15 Thu Apr 27, 2017 9:42 am
No new posts LISTCAT on a dataset with symbolic pa... shreya19 JCL & VSAM 5 Fri Apr 07, 2017 5:43 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us