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: 1474
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: 1474
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: 1474
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: 1474
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 Unable to catalog a gdg dataset resid... Shovan JCL & VSAM 4 Fri Mar 24, 2017 2:24 pm
No new posts Want to pull the job log into a Mainf... Jishu Mukherjee Compuware & Other Tools 9 Tue Mar 21, 2017 4:48 pm
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am
No new posts Customizing the ISPF HILITE Command Pedro TSO/ISPF 3 Fri Mar 03, 2017 11:49 pm
No new posts JCL to get submitted once dataset has... vinu78 JCL & VSAM 17 Thu Feb 16, 2017 7:32 am


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