View previous topic :: View next topic
|
Author |
Message |
sakthisiga Warnings : 1 New User
Joined: 11 Jun 2009 Posts: 60 Location: Chennai
|
|
|
|
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 |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
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 |
|
|
sakthisiga Warnings : 1 New User
Joined: 11 Jun 2009 Posts: 60 Location: Chennai
|
|
|
|
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 |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
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 |
|
|
sakthisiga Warnings : 1 New User
Joined: 11 Jun 2009 Posts: 60 Location: Chennai
|
|
|
|
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 |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
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 |
|
|
sakthisiga Warnings : 1 New User
Joined: 11 Jun 2009 Posts: 60 Location: Chennai
|
|
|
|
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 |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1742 Location: Tirupur, India
|
|
|
|
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 |
|
|
|