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

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


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
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
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: 1742
Location: Tirupur, India

PostPosted: Wed Nov 03, 2010 11:24 am
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
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: 1742
Location: Tirupur, India

PostPosted: Wed Nov 03, 2010 12:02 pm
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
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: 1742
Location: Tirupur, India

PostPosted: Wed Nov 03, 2010 12:13 pm
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
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: 1742
Location: Tirupur, India

PostPosted: Wed Nov 03, 2010 12:36 pm
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,
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts RACF - Rebuild SETROPTS command which... All Other Mainframe Topics 3
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Routing command Address SDSF to other... TSO/ISPF 2
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts DTL - how to define key with stacked ... TSO/ISPF 3
Search our Forums:

Back to Top