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

Neede usage of TSO Commands


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Kisor Kumar S

New User


Joined: 23 Jul 2003
Posts: 2
Location: India

PostPosted: Wed Jul 23, 2003 2:59 pm
Reply with quote

Sir,

Can u let me know where we can get book or Site for TSO Commands Usage. Kindly help me since I am a beginner
Back to top
View user's profile Send private message
mcmillan

Site Admin


Joined: 18 May 2003
Posts: 1210
Location: India

PostPosted: Fri Jul 25, 2003 8:24 am
Reply with quote

Have you tried this?

www.theamericanprogrammer.com/programming/tsocmd.html
Back to top
View user's profile Send private message
Parameswaran

New User


Joined: 05 Jun 2003
Posts: 2
Location: Chennai, India

PostPosted: Fri Aug 01, 2003 9:16 am
Reply with quote

You can also try out this link..

www-1.ibm.com/servers/eserver/zseries/zos/bkserv/r2pdf/tsoe.html
Back to top
View user's profile Send private message
abdul

EXPERT


Joined: 28 Jul 2003
Posts: 23
Location: Bangalore,India

PostPosted: Thu Oct 30, 2003 9:16 am
Reply with quote

TSO Line Mode Commands

These are TSO line mode commands. There is generally no ISPF screen that will do the same thing. For help on the commands,
- on any ISPF screen, type TSO HELP;
choose a command, then type TSO HELP command-name.
or use Quick Reference by typing QW on any ISPF screen
then specify IBM as vendor
then search for TSO SYSHELP

There are 6 places you can execute TSO commands. Read the parts about continuing!
1. In a REXX program.
The command must be enclosed in quotes (") or apostrophes (').
Quotes are preferred, because they conflict less
with the apostrophes that some TSO commands require.

Example of an ALLOCATE command in a REXX program:
"ALLOC DDN(INFILE) SHR REUSE DSN(MY.DATA)"

When there is a variable in the command you want REXX to process the variable.
Quotes prevent REXX from processing the variable.
Remove the variable from the quotes.
Example of an ALLOCATE with the dataset name in a variable.
Dataset_Name = "MY.DATA"
"ALLOC DDN(INFILE) SHR REUSE DSN("Dataset_Name")"

Commands for ISPF are prefixed by ADDRESS ISPEXEC, for example:
ADDRESS ISPEXEC "SETMSG MSG(ISRZ001)"

Commands for ISPF editor are prefixed by ADDRESS ISREDIT, for example:
ADDRESS ISREDIT "CHANGE ALL DNS DSN"


Continuing. Break the command into two parts.
Enclose each part in quotes. End the first part with a comma.
EXAMPLE:
"ALLOC DDN(INFILE)SHR REUSE?,
?DSN(MY.DATA)"

2. In a CLIST.
The command is entered into the CLIST as shown in the examples.
Example of an ALLOCATE command in a CLIST:
ALLOC DDN(INFILE) SHR REUSE DSN(MY.DATA)

When there is a variable in the command, put the variable
in the command and be sure it is prefixed with an ampersand (&).

Example of ALLOCATE in a CLIST with the dataset name in a variable:
SET &DATASET_NAME = MY.DATA
ALLOC DDN(INFILE) SHR REUSE DSN(&DATASET_NAME)


Continuing. Break the command into two parts. End the first part with a hyphen or +. The + causes leading spaces on the next line to be deleted..
EXAMPLE:
ALLOC DDN(INFILE) SHR REUSE -
DSN(&DATASET_NAME)

3. In ISPF Option 6.
Enter the command as shown in the examples
Example of an ALLOC command in ISPF Option 6:
ALLOC DSN(MY.DATA) SHR REUSE DDN(INFILE)


Continuing. Just keep typing. There?s room..


4. On any ISPF screen except Option 6.
Enter the command as shown in the examples, prefixed with "TSO".
Example of an ALLOCATE command in ISPF Option 6:
TSO ALLOC DDN(INFILE) SHR REUSE DSN(MY.DATA)


Continuing. You are out of luck. There?s not much room.


5. In line mode TSO, known as "Ready mode". I.E., you are not in ISPF.
Enter the command as shown in the examples
Example of an ALLOCATE command in line mode TSO.
ALLOC DDN(INFILE) SHR REUSE DSN(MY.DATA)


Continuing. Just keep typing. There?s room..


6. In a batch job where the program IKJEFT01 is executed, known as TSO in batch.
Enter the command as shown in the examples
Example of an ALLOCATE command in a batch job.
ALLOC DDN(INFILE) SHR REUSE DSN(MY.DATA)

Example in context:
//STEP1 EXEC PGM=IKJEFT01,DYNAMNBR=200
//SYSPRINT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
ALLOC DDN(INFILE) SHR REUSE DSN(MY.DATA)
/*

Continuing. There are only about 67 positions available
Break the command into two parts. End the first part with a hyphen.
EXAMPLE:
ALLOC DDN(INFILE) SHR REUSE -
DSN(MY.DATA)








Interacting with files:

Create a catalogued disk file/dataset
ALLOCATE with the NEW keyword
ALLOC DSN(dataset-name) NEW (continued)
SPACE(10 5) TRACKS

Create a catalogued disk library/pds
ALLOCATE with the NEW keyword and the DIR keyword
ALLOC DSN(library name) NEW (continued)
SPACE(10 5) TRACKS DIR(10)

Connect a catalogued disk file/ dataset to a program for use as input or output
ALLOCATE with the SHR or OLD keyword and the DDN keyword
ALLOC DDN(ddname) SHR REUSE DSN(dataset-name)

Connect a catalogued library member/pds member to a program for use as input or output
ALLOCATE with the SHR or OLD keyword and the DDN keyword
ALLOC DDN(ddname) SHR REUSE (continued)
DSN(library-name(member-name))
Note that the library must exist.
The member must exist if it is input.
The member will be created or overwritten, if it is output.

Connect a catalogued disk file/ dataset to a program for use as output, lengthening (append) the file
ALLOCATE with the MOD keyword and the DDN keyword
ALLOC DDN(ddname) MOD REUSE DSN(dataset-name)

Create a catalogued disk file/dataset, or library/ pds that has the same attributes as another
ALLOCATE with the LIKE keyword
ALLOC DSN(dataset-name) LIKE(other-dataset-name)

Notes about ALLOCATE:
REUSE means that the DDN(ddname) should be released
from any previous use and used for this ALLOCATE
SPACE(10 5) means that the system should allocate
10 units of space immediately, 5 units later (up to 15 times as needed)
DIR(10) means that the system should reserve 10 blocks of
space for the directory that will keep track of the members.
1 directory block keeps track of 5 members.

Remove the connection between a file and a program that has been established with ALLOCATE and the DDN keyword

FREE DDN(ddname)

Copy a file to one that exists already, overlaying it.
(Allocate the output file first with ALLOC or ISPF 3.2)
REPRO INDATASET(?input dataset name?) (continued)
OUTDATASET(?output dataset name?)

Display the attributes of a file/dataset library/pds
LISTDS dataset-name or library

Display the attributes of a library/pds and list the member names
LISTDS library MEMBERS

Display the dataset names, library names, and DDNAMES currently in use in your TSO session.
LISTALC STATUS HISTORY SYSNAMES

Display catalog information about a specific dataset or library.
LISTCAT ENTRY(dataset name) ALL

List the names of datasets or libraries whose names begin with a specific high level qualifier.
LISTCAT LEVEL(high-level-qualifier)
Example:
LISTCAT LEVEL(USERID1)

Delete a dataset or library
DELETE dataset or library

Delete a library member (not the library)
DELETE library(member-name)

Rename a dataset or library
RENAME old-name new-name

Specify a REXX or CLIST library without having to do complicated allocations.
ALTLIB ACTIVATE APPLICATION(appl) DSN(appl-library)

Specify a REXX library
ALTLIB ACTIVATE APPLICATION(EXEC) DSN(rexx-library)

Specify a CLIST library
ALTLIB ACTIVATE APPLICATION(CLIST) DSN(clist-library)

Interacting with other users

Authorize access to your files with RACF.
PERMIT 'your-userid.**' ID(userid-to-authorize) ACCESS(READ)
or access(update)
userid-to-authorize may be * to mean all users

Transmit a message to a TSO user. Cancel the message if the user can?t receive messages or is logged off.
SEND 'the message' USER(the-userid)the-userid may be *, which means to yourself

Transmit a message to a TSO user. Wait until the user is able to receive the message.
SEND 'the message' USER(the-userid) WAIT
the-userid may be *, which means to yourself

Transmit a message to a TSO user. The message will be delivered at once if the user is logged on. It will be delivered when the user logs on, if the user is now logged off.
SEND 'the message' USER(the-userid) LOGON
the-userid may be *, which means to yourself

Transmit a message to the console operator
SEND 'the message'

Send a dataset to another user (TSO or CMS)
XMIT node.userid DSN(datasetname)

Send a library/pds member to another user (TSO or CMS)
XMIT node.userid DSN(libraryname(membername)) SEQ

Receive a dataset or library sent by another user with XMIT RECEIVE

Interacting with TSO

Display messages sent to you while you were logged off
LISTBC

Display the current time, CPU time used, service units used, and date
TIME

Turn off prompting - commands asking you for missing or invalid information
PROFILE NOPROMPT

Find out if TSO is prefixing your logon userid to dataset names specified without apostrophes.
PROFILE

Make TSO prefix your logon userid to dataset names specified without apostrophes.
PROFILE PREFIX(your-userid) The default

Stop TSO from prefixing your logon userid to dataset names specified without apostrophes.
PROFILE NOPREFIX Not Recommended

Execute a program when you know which library it is on
CALL ?library-name(program-name)?

Execute a program that is on an automatic search library (?the linklist?)
CALL *(program-name)
You may also be able to execute a program by simply putting its name in quotes:
?IEBGENER?
This is not allowed at all companies.

Execute a REXX program or CLIST found on a library assigned to SYSPROC or SYSEXEC
?program-name? ?parameters if any?

Execute a REXX program or CLIST that is not found on a library assigned to SYSEXEC
?EXEC ?libry-name(member-name)? ?parameters if any.? ? EXEC

Execute a CLIST that is not found on a library assigned to SYSPROC
?EXEC ?library-name(member-name)? ?parameters if any.? ?

Interacting with MVS Batch
Display current job status of jobs that you have submitted
STATUS

Cancel a job that you have submitted
CANCEL jobname(job-number)

Cancel a job that you have submitted and discard the printed output
CANCEL jobname(job-number) PURGE

Send JCL to MVS batch for processing I.E. spawn a detached process
SUBMIT dataset-name or library(member-name)

Interacting with the Hierachical Storage System (migrating)

Unmigrate a dataset or library that has been migrated
HRECALL dataset/library

Migrate a dataset or library I.E. send it to off-line storage, probably tape
and temporarily delete it from active disk storage
HMIGRATE dataset or library

Create a backup copy of a dataset or library (if installation authorizes)
HBACKDS dataset/library

Retrieve the most recent backup copy of a dataset or library that has been backed up
HRECOVER dataset-name

Retrieve the backup copy of a dataset or library that was created before the most recent one
HRECOVER dataset-name GENERATION(1)
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 -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts STEM usage in REXX CLIST & REXX 14
No new posts z/OS Modules Usage report using SMF 42 DFSORT/ICETOOL 2
No new posts Concatenate 2 fields (usage national)... COBOL Programming 2
No new posts Console Commands All Other Mainframe Topics 4
No new posts commands missing in JESMSGLG JCL & VSAM 3
Search our Forums:

Back to Top