How to Execute CLIST
 

When we start learning CLIST, we learn few commands and are quite excited to test them. Most of the training and tutorials would educate you the methods of executing your CLISTs, but it happens so that these methods do not work on your installation. The following tutorial will list down 5 easy methods of executing you CLIST.

The video walks you through the five methods listed here.

The first two methods are explicit execution of CLIST and rest 3 methods are for implicit execution of CLIST.

Method 1:

Step 1: Allocate a PDS ‘USERID.ABC.XYZ’ with attributes

LRECL= 80

RECFM = FB

Step 2:

Issue the following command at command line

TSO EXEC ‘USERID.ABC.XYZ(clistnam)’

where clistnam is the name of the CLIST you want to execute.

Method 2:

Step 1: Allocate a PDS ‘USERID.ABC.XYZ’ with attributes

LRECL= 80

RECFM = FB

Step 2:

Issue the command EX against the member containing CLIST code

; ; ; ;

Method 3:

Step 1: Allocate a PDS ‘USERID.ABC.XYZ’ with attributes

LRECL= 80

RECFM = FB

Step 2:

Create a member in the PDS created above in Step1 and write the following CLIST. This CLIST will allocate the CLIST, PANELS, MESSAGE libraries to System CLIST libraries.

ALTLIB  ACTIVATE APPLICATION (CLIST) +

      DATASET(‘USERID1.ABC.XYZ’) UN COND

SET &ALTLIBRC = &LASTCC

IF &ALTLIBRC NE O THEN +

     WRITE CLIST FAILED

ELSE DO

     ISPEXEC  LIBDEF ISPMLIB DATASET ID(‘USERID1.MESSAGES’)

     ISPEXEC  LIBDEF ISPPLIB DATASET ID(‘USERID1.PANELS’)

     ISPEXEC  LIBDEF ISPSLIB DATASET ID(‘USERID1.SKELS’)

END

Step 3:

Issue the command EX against the CLIST created above to execute it.

Step 4:

Now you can execute your clist by issuing the following command at

command line

TSO clistnam

where clistnam is the name of member containing CLIST code

Method 4:

Step 1: Check the system allocated libraries for CLIST, PANELS, MESSAGES, SKELS etc

For this issue the following command at command line and press ENTER

TSO ISRDDN

The current dataset allocation screen is presented.

Issue the following command to locate the system allocated libraries for CLISTS and press ENTER

L SYSPROC

All the libraries allocated to ddname SYSPROC are listed here.

Step 2:

If you have access to any of these libraries, you can put your clist code in a member and you are all set to execute it implicitly.

Step 3:

Now you can execute your clist by issuing the following command at

command line

TSO clistnam

where clistnam is the name of member containing CLIST code

Method 5:

Step 1: Allocate a PDS ‘USERID.ABC.XYZ’ with attributes

LRECL= 80

RECFM = FB

Step 2:

Create a member in the PDS created above in Step1 and write the following CLIST. This CLIST will concatenate your CLIST library to System CLIST libraries.

ALLOCATE DD(SYSPROC)  REUSE SHR  –

DA(‘USERID1.ABC.XYZ’, ‘SYS1.CLIST’, ‘PUBLIC.CLIST’,-

      ‘PUBLIC.CLIST2’)

Where SYS1.CLIST, PUBLIC.CLIST etc are the system CLIST libraries

Step 3:

Issue the command EX against the CLIST created above to execute it.

Step 4:

Now you can execute your clist by issuing the following command at

command line

TSO clistnam

where clistnam is the name of member containing CLIST code