Example 4
Operation: Enter a fully-qualified data set name as a keyword value in an EXEC command value list.
Known:
- The CLIST named SWITCH is contained in a CLIST library named MASTER.CLIST which is allocated as SYSPROC.
- The CLIST consists of:
PROC 0 DSN1() DSN2() RENAME &DSN1 TEMPSAVE RENAME &DSN2 &DSN1 RENAME TEMPSAVE &DSN2
If you have a user ID of USER33 and you want to switch the names of two data sets MASTER.BACKUP and USER33.GOODCOPY, you can invoke the CLIST as follows:
Explicit form:
exec 'master.clist(switch)' +
'dsn1(''''''master.backup'''''') +
dsn2(goodcopy)'
Extended implicit form:
%switch dsn1('''master.backup''') dsn2(goodcopy)
Note that when you use the implicit form, the specification of quoted strings in the value list is made simpler because the value list itself is not a quoted string.