RLX / Translate
T
he CLIST to REXX Converter
User Guide
and Reference
Version 2.2.2
March 2016
Publication RCT-001-8
_______________________________________________________________________
This Guide: (RAI Publication RCT-001-8)
This document applies to RLX/Translate Version 2 Release 2 Mod 2 (March 2016),
and all subsequent releases, unless otherwise indicated in new editions or technical
newsletters. Specifications contained herein are subject to change and will be reported in
subsequent revisions or editions.
Purchase Orders for publications should be addressed to:
Documentation Coordinator
Relational Architects Intl.
Riverview Historic Plaza
33 Newark Street
Hoboken NJ 07030 USA
Tel: 201 420-0400
Fax: 201 420-4080
Reader comments regarding the product, its documentation, and suggested improvements
are welcome. A reader comment form for this purpose is provided at the back of this
publication.
Copyright (c) 2004, 2016 by Relational Architects International, Inc. (RAI) as an
unpublished work -- all rights reserved. The software product(s) described herein
and the documentation thereof are trade secrets and property of Relational
Architects, Inc. All use, disclosure, duplication, electronic storage, reproduction or
transmission without specific written authorization from RAI is strictly prohibited.
These products may also be protected under the trade-secret and copyright laws of
countries other than the United States and international agreements.
DB2, SQL/DS, SPUFI, QMF and ISPF are software products of IBM Corporation.
REXX Language Xtensions, AcceleREXX, RLX/REXX, RLX/CLIST, RLX/ISPF,
RLX/TSO, RLX/VSAM, RLX/SDK, RLX/Edit, RLX/Net, RLX/SQL, RLX for MVS
RLX/Compile, RLX/CAF, Multi/CAF, RFA and LMD are trademarks of Relational
Architects International, Inc.
Ed 16C01
_______________________________________________________________________
Preface
Related Publications
This RLX/Translate User Guide and Reference is intended for analysts, programmers and
users who wish to convert their TSO CLISTs into logically equivalent REXX execs. The
material in this Guide is augmented by the more extensive RLX product library which at
present includes the following publications:
• RLX User Guide and Reference
RLX-003
• RLX/Edit User Guide and Reference
RTE-001
• RLX Installation and Customization Guide
RLX-001
For information related to the implementation of TSO CLISTs and TSO/E REXX refer to
the following IBM publications:
• TSO/E Version 2 CLISTs
SC28-1876
• TSO/E Version 2 REXX Reference
SC28-1883
• TSO/E Version 2 REXX User's Guide
SC28-1882
Notational Conventions
The following notational conventions are used in this Guide:
Uppercase commands and their operands should be entered as shown but need not be
entered in uppercase.
Operands shown in lower case are variable; a value should be substituted for them.
Operands shown in brackets [ ] are optional, with a choice indicated by a vertical bar
|. One or none may be chosen; the defaults are underscored.
Operands shown in braces { } are alternatives; one must be chosen.
An ellipsis (...) indicates that the parameter shown may be repeated to specify
additional items of the same category.
In the Messages section, contents within arrowheads < > will be replaced at
run-time with the actual value.
Table of Contents
Preface ... iii
Related Publications... iii
Notational Conventions ... iii
Chapter 1: RLX/Translate Concepts and Facilities ... 1-1
1.1
Introduction ... 1-1
1.2
Using RLX/Translate ... 1-2
1.3
RLX/Translate Completion Codes ... 1-3
1.4
Unsupported CLIST Constructs ... 1-3
1.5
Support for CLIST Amper Variables and Nested Variables ... 1-3
1.5.1 Preserving Double Ampersands - &NRSTR ... 1-3
1.6
Translation of the CLIST GOTO statement ... 1-4
1.7
REXX Implementation Maximums ... 1-5
1.8
Literal Strings Longer than 250 Characters ... 1-6
1.9
REXX Clauses Longer than 500 characters... 1-7
1.10 Run-time Requirements for Translated Execs ... 1-10
Chapter 2: The RLX/Translate Batch Procedure... 2-1
2.2
RLX/Translate Options ... 2-3
2.2.1 List of Options ... 2-4
2.2.2 RLX/Translate Options - Default Settings ... 2-8
Chapter 3: The RLX/Translate Dialog ... 3-1
Chapter 4: Sample CLIST to REXX Translation ... 4-1
4.1
The Translate Dialog ... 4-1
4.2
Sample Output Listing ... 4-4
4.3
The translated REXX Exec ... 4-6
4.3.1 Address TSO ... 4-6
Chapter 5: RLX/Translate Return Codes and Messages ... 5-1
Appendix A: RLX/Translate Installation ... A-1
Chapter 1
RLX/Translate
Concepts and Facilities
1.1 Introduction
This chapter introduces RLX/Translate and provides an overview of its capabilities.
RLX/Translate reads a command procedure written in the TSO CLIST language (the
source language) and translates it into an equivalent REXX procedure. The Translator
also highlights those statements within the source CLIST and the translated REXX exec
that need review and/or revision.
The Translator supports all releases of the TSO CLIST language. Most TSO CLISTs
should translate without error and the translated REXX execs should produce the same
run-time results as the original CLISTs. Further, the translated REXX procedures can
interface with other command procedures in the same manner as the original CLISTs.
The only restrictions imposed by RLX/Translate involve CLIST functions without
analogous REXX facilities and the REXX imposed limit of 500 characters on the length
of clauses. (This latter restriction does not apply to environments running TSO/E
Version 2.4 and subsequent releases.) Translation warnings and errors, if any, are
flagged and cross referenced between the CLIST source listing and the output REXX
exec. This makes it easy to review (and if necessary revise) translated code. This chapter
discusses the restrictions and cautions associated with CLIST to REXX translation.
1.2 Using RLX/Translate
___________________________________________________________________________________
CLIST
Translated
source ===>
RLX/Translate ===>
REXX
module
procedure
Listings and Error messages
___________________________________________________________________________________
Figure 1.1 RLX/Translate schematic
RLX/Translate can be invoked as an ISPF dialog or through Job Control Language (JCL)
statements. Chapter 2 describes how to run RLX/Translate as an MVS batch job while
Chapter 3 describes the ISPF dialog (supplied with RLX/Translate) that lets you convert
one or several TSO CLISTs into equivalent REXX execs.
RLX/Translate produces the following output:
• A REXX exec translated from the original TSO CLIST procedure
• The translator listings -- which can include:
>
a listing of the input source of the original TSO CLIST
>
a listing of the original TSO CLIST
>
a listing of the translated REXX exec
>
messages issued by RLX/Translate
>
a procedure map
>
a function map
>
symbol cross-reference
The listing components are produced according to translation options you specify.
Chapter 4 describes and illustrates the listing components and REXX source module
produced by RLX/Translate within the context of a sample, annotated translation job.
1.3 RLX/Translate Completion Codes
RLX/Translate sets a jobstep completion code to indicate the outcome of its translation
processing. These completion codes and the message text associated with each code are
enumerated in Section 5.1.
1.4 Unsupported CLIST Constructs
The current release of RLX/Translate restricts the use of certain TSO CLIST language
facilities. For example, the following TSO CLIST constructs have no analog in REXX so
their translation is not currently supported:
•
&SYSCLENGTH•
&SYSCSUBSTR•
&SYSNSUB•
&SYSONEBYTE•
&SYSTWOBYTE•
GLOBAL•
TERMIN•
SYSREF1.5 Support for CLIST Amper Variables and Nested Variables
RLX/Translate reliably translates CLIST expressions such as &variable and &&variable.
For example, a reference to
&variable_namewithin a CLIST becomes a reference to
variable_name
within the translated REXX exec while CLIST references to
&&variable_name
become
value(variable_name)within the translated REXX exec.
Be aware, however, that CLIST expressions which exceed more than two levels of
ampersands (for example
&&&variableand
&&&&variable) can produce incorrect run-time
results in the translated REXX exec. RLX/Translate generates nested REXX value
statements when it detects multiple levels of ampersands. For example, RLX/Translate
converts the CLIST expression
&&&&variableinto the REXX expression
value(value(value(variable)))
.
1.5.1 Preserving Double Ampersands — &NRSTR
When RLX/Translate encounters the CLIST function
&NRSTR, it preserves all ampersands
in the argument expression and writes it out as a REXX literal string so as to suppress
symbolic substitution. For example, RLX/Translate converts the CLIST expression
&NRSTR(&&VAR)
into the REXX expression "
&&VAR". Be sure to check the run-time
1.6 Translation of the CLIST GOTO statement
The REXX and TSO CLIST interpreters handle direct branching instructions somewhat
differently. For example, the CLIST interpreter executes the GOTO statement in Figure
1.2 without incident.
_______________________________________________________________ DO DO GOTO EXIT END END EXIT: + EXIT _______________________________________________________________Figure 1.2 CLIST GOTO statement
However, the REXX interpreter will interrupt processing with an error return code when
it tries to execute an analogous SIGNAL statement (illustrated in Figure 1.3) that
branches out of an active DO block.
_______________________________________________________________ Do while
Do
/* Warning W001 - review the following statement */ Signal exit End End Exit: end _______________________________________________________________
Figure 1.3 Physical translation using SIGNAL
For this reason, RLX/Translate provides the option to translate a CLIST GOTO statement
into a logically equivalent REXX structure which can execute without error. When only
a single DO block is active, RLX/Translate converts the GOTO into a logically
equivalent REXX LEAVE statement (illustrated in Figure 1.4 ).
_______________________________________________________________ Do while
/* Warning W001 - review the following statement */ Leave
End Exit: end
_______________________________________________________________
In contrast, when nested DO blocks are concurrently active and the outermost DO block
is governed by a control expression, RLX/Translate converts the GOTO into a REXX
ITERATE statement (illustrated in Figure 1.5) in order to exit the nested DO blocks.
_______________________________________________________________ Do while flag = 'GO'
Do
Flag = 'STOP'
/* Warning W001 - review the following statement */ Iterate End End Exit: end _______________________________________________________________
Figure 1.5 Logical translation using ITERATE
1.7 REXX Implementation Maximums
As you translate your CLISTs into REXX execs, you should be aware of the following
REXX implementation maximums:
• The limit on the length of symbols (variable names) is 250 characters.
• The total nesting of control structures (DO-END, IF-THEN-ELSE, etc.) which
includes calls to internal routines, may not exceed a depth of 250.
• REXX functions -- such as
x = function(exp1,exp2)-- may not contain more than 20
expressions, separated by commas, between the parentheses of the function.
• Literal strings can contain up to 250 characters. However, RLX/Translate
automatically circumvents this restriction -- as described in Section 1.8.
• Releases of REXX
prior to TSO/E Version 2.4 are subject to the additional
restriction that clauses may not exceed 500 characters in length. Beginning with
TSO/E Version 2.4 this restriction has been relaxed and the maximum clause length
has been increased, such that executable CLIST statements of any length can be
translated. See Section 1.9 for a complete discussion.
1.8 Literal Strings Longer than 250 Characters
REXX Literal strings can contain up to 250 characters. However this restriction can be
circumvented by splitting long literal strings into multiple substrings. You can then
reconstruct the original string using concatenation -- as in the following example:
substring_1 = "A literal string up to 250 characters..." substring_2 = "Another literal string up to 250 characters..." whole_string = substring_1 || substring_2
RLX/Translate can
automatically split long literals and host commands into substrings
and then concatenate them to reconstitute the original string in its entirety. Consider, for
example, the following ALLOCATE statement coded within a CLIST.
___________________________________________________________________________________ ALLOCATE FILE(ISPPLIB) DATASET( +
'APPLICATION.ONE.PANELS' + 'APPLICATION.TWO.PANELS' + 'APPLICATION.THREE.PANELS' + 'APPLICATION.FOUR.PANELS' + 'APPLICATION.FIVE.PANELS' + 'APPLICATION.SIX.PANELS' + 'APPLICATION.SEVEN.PANELS' + 'APPLICATION.EIGHT.PANELS' + 'APPLICATION.NINE.PANELS' + 'APPLICATION.TEN.PANELS' + 'APPLICATION.TWELVE.PANELS' + 'APPLICATION.THIRTEEN.PANELS' + 'APPLICATION.FOURTEEN.PANELS' + 'APPLICATION.FIFTEEN.PANELS' + 'APPLICATION.SIXTEEN.PANELS' + 'APPLICATION.SEVENTEEN.PANELS' + 'APPLICATION.EIGHTEEN.PANELS' + 'APPLICATION.NINETEEN.PANELS' + 'APPLICATION.TWENTY.PANELS') SHR ___________________________________________________________________________________
Figure 1.6 Long CLIST ALLOCATE statement
Figure 1.7 illustrates how RLX/Translate breaks the original command into separate
substrings and assigns them to uniquely named REXX variables. The translated code
then concatenates the substrings to reconstitute the original string.
__________________________________________________________________________________ Do
RCT_HCStr_713911 =, "ALLOCATE FILE(ISPPLIB) DATASET( 'APPLICATION.ONE.PANELS' 'APPLICATION.TWO.PANELS' 'APPLICATION.THREE.PANELS' 'APPLICATION.FOUR.PANELS' 'APPLICATION.FIVE.PANELS' 'APPLICATION.SIX.PANELS' 'APPLICATION.SEVEN.PANELS' " RCT_HCStr_713912="'APPLICATION.EIGHT.PANELS' 'APPLICATION.NINE.PANELS' 'APPLICATION.TEN.PANELS' 'APPLICATION.TWELVE.PANELS' 'APPLICATION.THIRTEEN.PANELS' 'APPLICATION.FOURTEEN.PANELS' 'APPLICATION.FIFTEEN.PANELS' 'APPLICATION.SIXTEEN.PANELS' " RCT_HCStr_713913 =, "'APPLICATION.SEVENTEEN.PANELS' 'APPLICATION.EIGHTEEN.PANELS' 'APPLICATION.NINETEEN.PANELS' 'APPLICATION.TWENTY.PANELS') SHR " RCT_HCStr_713911 || RCT_HCStr_713912 || RCT_HCStr_713913 End ___________________________________________________________________________________
Figure 1.7 Translated REXX statement
1.9 REXX Clauses Longer than 500 characters
In releases of TSO/E
prior to Version 2.4, REXX issues the error message '
IRX0012IError running execname, line nn: Clause too long'
when it detects a REXX clause that
exceeds 500 characters in length. This length restriction is relaxed with the advent of
TSO/E Version 2.4.
Because of this difference, RLX/Translate tailors its translation processing to the version
and release of the TSO/E environment in which the translated exec will execute. (By
default, the TSO/E version and release of the execution environment is the same as the
TSO/E environment in which the translate job was submitted.) When the execution
environment is TSO/E Version 2.4 or later, RLX/Translate can convert valid CLIST
statements of any length into equivalent and executable REXX statements. No manual
revision of translated REXX source code is required.
In contrast, prior to TSO/E Version 2.4, clauses may not exceed the 500 character limit
imposed by REXX. The CLIST statements that upon translation yield illegally long
REXX clauses fall, in turn, into two categories: those which RLX/Translate can convert
automatically and those which must be manually rewritten (in either the original CLIST
or within the translated REXX exec).
RLX/Translate handles host commands -- such as the ALLOCATE statement described
in Section 1.8 -- automatically. Such literal strings are translated into executable REXX
statements, regardless of the Version and release level of the target TSO/E environment.
However, certain REXX clauses longer than 500 characters have to be analysed and
revised manually when the target TSO/E environment is TSO/E Version 2.3 or earlier.
Consider the long CLIST statement in Figure 1.8 in which a series of conditions are
combined via AND and OR keywords. Such a statement can't simply be split into
substrings and then concatenated.
___________________________________________________________________________________ IF &SUBSTR(1:3,&SYSUID) EQ &STR(ABC) OR + &SUBSTR(1:3,&SYSUID) EQ &STR(DEF) OR + &SUBSTR(1:3,&SYSUID) EQ &STR(GHI) OR + &SUBSTR(1:3,&SYSUID) EQ &STR(JKL) OR + &SUBSTR(1:3,&SYSUID) EQ &STR(MNO) OR + &SUBSTR(1:3,&SYSUID) EQ &STR(PQR) OR + &SUBSTR(1:3,&SYSUID) EQ &STR(STU) OR + &SUBSTR(1:3,&SYSUID) EQ &STR(VWX) OR + &SUBSTR(1:3,&SYSUID) EQ &STR(YZ0) OR + &SUBSTR(1:3,&SYSUID) EQ &STR(123) OR + &SUBSTR(1:3,&SYSUID) EQ &STR(456) OR + &SUBSTR(1:2,&SYSUID) EQ &STR(78) OR + &SUBSTR(1:2,&SYSUID) EQ &STR(90) OR + &SUBSTR(1:2,&SYSUID) EQ &STR(12) OR + &SUBSTR(1:3,&SYSUID) EQ &STR(A00) OR + &SUBSTR(1:3,&SYSUID) EQ &STR(A01) OR + &SUBSTR(1:3,&SYSUID) EQ &STR(A02) OR + &SUBSTR(1:3,&SYSUID) EQ &STR(A03) OR + &SUBSTR(1:3,&SYSUID) EQ &STR(A04) OR + &SUBSTR(1:3,&SYSUID) EQ &STR(A05) OR + &SUBSTR(1:3,&SYSUID) EQ &STR(A06) + THEN
WRITE YOUR TSO ID IS RECOGNIZED ELSE
WRITE SORRY - YOUR TSO ID IS NOT RECOGNIZED
___________________________________________________________________________________
Figure 1.8 CLIST statement with CLAUSE longer than 500 characters
___________________________________________________________________________________ /* REXX */ IF SUBSTR(SYSVAR(SYSUID),1,3) = 'ABC' | , SUBSTR(SYSVAR(SYSUID),1,3) = 'DEF' | , SUBSTR(SYSVAR(SYSUID),1,3) = 'GHI' | , SUBSTR(SYSVAR(SYSUID),1,3) = 'JKL' | , SUBSTR(SYSVAR(SYSUID),1,3) = 'MNO' | , SUBSTR(SYSVAR(SYSUID),1,3) = 'PQR' | , SUBSTR(SYSVAR(SYSUID),1,3) = 'STU' | , SUBSTR(SYSVAR(SYSUID),1,3) = 'VWX' | , SUBSTR(SYSVAR(SYSUID),1,3) = 'YZ0' | , SUBSTR(SYSVAR(SYSUID),1,3) = '123' | , SUBSTR(SYSVAR(SYSUID),1,3) = '456' | , SUBSTR(SYSVAR(SYSUID),1,2) = '78' | , SUBSTR(SYSVAR(SYSUID),1,2) = '90' | , SUBSTR(SYSVAR(SYSUID),1,2) = '12' | , SUBSTR(SYSVAR(SYSUID),1,3) = 'A00' | , SUBSTR(SYSVAR(SYSUID),1,3) = 'A01' | , SUBSTR(SYSVAR(SYSUID),1,3) = 'A02' | , SUBSTR(SYSVAR(SYSUID),1,3) = 'A03' | , SUBSTR(SYSVAR(SYSUID),1,3) = 'A04' | , SUBSTR(SYSVAR(SYSUID),1,3) = 'A05' | , SUBSTR(SYSVAR(SYSUID),1,3) = 'A06' , THEN
SAY 'YOUR TSO ID IS RECOGNIZED' ELSE
SAY 'SORRY - YOUR TSO ID IS NOT RECOGNIZED' RETURN
___________________________________________________________________________________
The converted REXX exec produced by RLX/Translate appears in Figure 1.9. This
statement can execute 'as is' in a TSO/E Version 2.4 (or subsequent) environment.
However, the same statement will fail in a TSO/E environment prior to Release 2.4 This
requires that either the original CLIST statement or the translated REXX statement be
changed manually. Figure 1.10 illustrates how to break the translated REXX statement
into several clauses so it can run without error.
The statement in Figure 1.10 is revised to use a SELECT, WHEN, OTHERWISE
construct in lieu of a single long series of conditions connected by the OR operator '|'.
This technique allows each clause to stay within the 500 character limit imposed by
REXX in releases of TSO/E prior to Version 2.4.
___________________________________________________________________________________ SELECT
WHEN SUBSTR(SYSVAR(SYSUID),1,3) = 'ABC' | , SUBSTR(SYSVAR(SYSUID),1,3) = 'DEF' | , SUBSTR(SYSVAR(SYSUID),1,3) = 'GHI' | , SUBSTR(SYSVAR(SYSUID),1,3) = 'JKL' | , SUBSTR(SYSVAR(SYSUID),1,3) = 'MNO' | THEN, CALL ID_RECOGNIZED WHEN SUBSTR(SYSVAR(SYSUID),1,3) = 'PQR' | , SUBSTR(SYSVAR(SYSUID),1,3) = 'STU' | , SUBSTR(SYSVAR(SYSUID),1,3) = 'VWX' | , SUBSTR(SYSVAR(SYSUID),1,3) = 'YZ0' | , SUBSTR(SYSVAR(SYSUID),1,3) = '123' | , SUBSTR(SYSVAR(SYSUID),1,3) = '456' | , SUBSTR(SYSVAR(SYSUID),1,2) = '78' | , SUBSTR(SYSVAR(SYSUID),1,2) = '90' THEN, CALL ID_RECOGNIZED WHEN SUBSTR(SYSVAR(SYSUID),1,2) = '12' |, SUBSTR(SYSVAR(SYSUID),1,3) = 'A00' | , SUBSTR(SYSVAR(SYSUID),1,3) = 'A01' | , SUBSTR(SYSVAR(SYSUID),1,3) = 'A02' | , SUBSTR(SYSVAR(SYSUID),1,3) = 'A03' | , SUBSTR(SYSVAR(SYSUID),1,3) = 'A04' | , SUBSTR(SYSVAR(SYSUID),1,3) = 'A05' | , SUBSTR(SYSVAR(SYSUID),1,3) = 'A06' THEN CALL ID_RECOGNIZED
OTHERWISE
SAY 'SORRY - YOUR TSO ID IS NOT RECOGNIZED' END
RETURN
ID_RECOGNIZED:
SAY 'YOUR TSO ID IS RECOGNIZED' RETURN
___________________________________________________________________________________
1.10 Run-time Requirements for Translated Execs
There are several run-time load modules supplied with RLX/Translate that must be
accessible through the MVS search order when you run REXX execs produced by the
Translator. These load modules provide CLIST facilities that have no analog within
REXX. An example is the PROC statement of the TSO CLIST language. The
RLX/Translate run-time library must provide access to the following load modules,
which are delivered as a part of the RLX family load library:
Name Size TTR AC AM RM Attributes RAIPWG 002328 000C2B 00 31 ANY RF RN RU RCT$PROC 003A80 001E1D 00 31 ANY RF RN RU RCT$SAY 0004F0 000C22 00 31 ANY RF RN RU RCT$TPV 000320 001F05 00 24 24 RF RN RU RCTB 019E28 001F0E 00 31 ANY RF RN RU RCTPWDCK 002270 002110 00 31 ANY RF RN RU RFA$TFP 012C30 000E19 00 31 ANY RF RN RU RFA$TFR 005398 001011 00 ANY 24 RF RN RU RFA$TIR 001318 001114 00 31 ANY RF RN RU RFA$TRR 0074E0 001122 00 31 ANY RF RN RU RFA$TSR 0195F8 001215 00 31 ANY RF RN RU RFA$TTR 0026D0 001511 00 31 ANY RF RN RU RFA$TVR 009F80 00160D 00 31 ANY RU RFP$TBLS 000438 000C04 00 24 24 RFPFLOC 0140A8 00170A 00 31 ANY RF RN RU RFPM 004198 001912 00 31 ANY RF RN RU RFPRFI 001198 001A0A 00 31 ANY RF RN RU RFPTERM 000F10 001E10 00 31 ANY
The simplest way to ensure that the RLX/Translate run-time modules are accessible is to
include them in the LINKLIST concatenation. Alternatively, the library containing the
RLX/Translate load modules can be allocated to STEPLIB or within the TSO/ISPF
environment to the DDname ISPLLIB. In this latter case, allocation through the ISPF
LIBDEF facility is
not suitable for this purpose.
The run-time load modules supplied with RLX/Translate Version 1.1 are named
RCT$PROC and SDKSCAN.
Chapter 2
The RLX/Translate
Batch Procedure
This chapter discusses the RLX/Translate batch procedure you can use instead of (or in
addition to) the RLX/Translate dialog described in Chapter 3. The RLX/Translate
procedure is supplied in the RLXCNTL library as member RCTB. It translates a single
TSO CLIST into a functionally equivalent REXX source exec.
You can copy the RCTB member of the RLXCNTL dataset into one of the catalogued
procedure libraries defined at your installation. Alternatively, you can place the RCTB
procedure instream within your JCL. In this latter case, you must terminate the
procedure with a JCL '// PEND' statement. To do so, simply remove the asterisk on the
line with the PEND statement to use RCTB as an instream procedure.
Before using the RCTB procedure, we recommend you edit the names of the RLX system
datasets defined at installation time. This way, there will be fewer parameters to specify
when you invoke the procedure.
The RCTB procedure illustrated in Figure 2.1 invokes the CLIST to REXX translator.
The numbers in the figure's right margin correspond to the numbered, annotating
paragraphs that follow. These paragraphs describe the functions of the DD names in the
RCTB procedure.
___________________________________________________________________________________ //*--- //* //* PROCEDURE NAME //* ============== //* //* RCTB //* //* CATALOGUED OR INSTREAM PROCEDURE WITH WHICH TO EXECUTE //* RLX/TRANSLATE IN THE BACKGROUND //* //* (C) COPYRIGHT RELATIONAL ARCHITECTS INTL. - 1994. 1998. //* LICENSED MATERIAL - PROGRAM PROPERTY RELATIONAL ARCHITECTS //* RLX/TRANSLATE //* //*--- //RCTB PROC RLXLOAD='RLX.VtRtMt.RLXLOAD', ** RLX SYSTEM LOADLIB // RCTIN=, ** SOURCE CLIST LIBRARY // RCTOUT= ** TARGET EXEC LIBRARY //RCTB EXEC PGM=RCTB,PARM='MAP',REGION=2M //STEPLIB DD DSN=&RLXLOAD,DISP=SHR (1) //RCTIN DD DSN=&RCTIN,DISP=SHR (2) //RCTOUT DD DSN=&RCTOUT,DISP=SHR (3) //RCTPARMS DD DSN=RLX.VtRtMt.RLXFILE(RCTPARMS),DISP=SHR (4) //RCTPRINT DD SYSOUT=* (5) //SYSTSPRT DD SYSOUT=* (6) //*RCTB PEND REMOVE * FOR USE AS INSTREAM PROCEDURE (7)
where
(1) STEPLIB
Name of the RLXLOAD library containing the RCTB program
(2) RCTIN
Name of the library which contains the source TSO CLISTs to be
translated
(3) RCTOUT
Name of the library to which the translated REXX exec will be
written
(4) RCTPARMS RLX/Translate parameteres are supplied through the RCTPARMS
DD statement.
(5) RCTPRINT
Translator listing file
(6) SYSTSPRT
Translator failure report
(7) PEND
The JCL PEND statement is commented out. Remove the asterisk
in column 3 to utilize RCTB as an instream procedure.
___________________________________________________________________________________
Figure 2.2 illustrates how to invoke the RCTB catalogued procedure to translate a TSO
CLIST into an equivalent REXX exec. The numbers in the figure's right margin
correspond to the numbered, annotating paragraphs that follow:
__________________________________________________________________________________
//jobname JOB (parms)
//STEP1 EXEC RCTB
(1)
//RCTPARMS DD *
(2)
NAME(EXAMPLE)
(3)
/*
where
(1) Invoke the RLX/Translate procedure
(2) RLX/Translate parameters are supplied through the RCTPARMS DD statement.
(3) Both the source TSO CLIST and the target REXX exec are named EXAMPLE.
The NAME parameter is described in the next section.
__________________________________________________________________________________
Figure 2.2 Sample JCL to invoke RCT catalogued procedure
2.2 RLX/Translate Options
The operation of RLX/Translate is controlled by options specified (or defaulted) when
the translator is invoked. These options specify how input should be processed and how
output is to be presented. Translator options can be specified via the PARM field of the
JCL EXEC statement, through a RCTPARMS DD statement, or both, as illustrated in
the following examples:
//RCTB EXEC PGM=RCTB,PARM='SOURCE'
//RCTPARMS DD DSN=rlx.translate.options,DISP=SHR
RLX/Translate merges options from both these sources (if present) to develop the
run-time options string. If duplicate or conflicting options are specified, the last value
specified takes effect. The RCTPARMS dataset should be defined with DCB attributes
RECFM F or FB, with an LRECL of 80. Alternatively, you can code RLX/Translate
options instream -- as in the following example:
//RCTPARMS DD * FLAG(I)
* this is a comment //*
Options supplied through the RCTPARMS file must be coded between columns 1 and 72.
RLX/Translate treats any line beginning with an asterisk (*) as a comment.
Section 2.2.1 enumerates the RLX/Translate options (in alphabetical order) along with
their acceptable abbreviations. These options direct the Translator's function. A vertical
bar ( | ) separates mutually exclusive option values. Section 2.2.2 shows the
respective default values.
2.2.1 List of Options
BOUNDS(m,n)
This parameter specifies the column boundaries within each target
record into which REXX source statements will be written. The first
value (m) specifies the beginning column while the second value (n)
represents the last column in which the text of REXX statements will
be coded. BOUNDS(1,80) is the default.
CLIST (name)
This optional parameter identifies the source CLIST to be read and
processed by the Translator. The CLIST parameter should be specified
in conjunction with the EXEC parameter to specify different names for
the input CLIST and output EXEC. If both source and target
procedures share the same name, use the NAME parameter (described
below) instead.
COMMENTS ( NO | YES )
This parameter directs RLX/Translate to include comments
[COMMENTS(YES)] or omit them [COMMENTS(NO)] from the
source CLIST into the target REXX exec. COMMENTS(NO) is the
default.
EXEC (name)
This optional parameter specifies the name of the target REXX exec to
be written by the Translator. The EXEC parameter should be specified
in conjunction with the CLIST parameter to specify different names for
the input CLIST and output EXEC. If both source and target
procedures share the same name, use the NAME parameter (described
below) instead.
FILEIO_RC (CLIST | REXX )
This parameter directs RLX/Translate to include special run-time code
into the generated EXEC to permit conversion of the REXX EXECIO
generated end of file condition into the equivalent GETFILE end-of-file
condition, such that EXECIO simulates the CLIST GETFILE
end-of-file condition.
FLAG ( I | W | E | S )
This parameter directs RLX/Translate to suppress diagnostic messages
below the specified severity level. The flag codes are I-Informational,
W-Warning, E-Error and S-Severe error. They correspond to severity
codes 0, 4, 8, and 12, respectively. FLAG(I) is the default.
GOTO ( S | L )
This parameter governs how RLX/Translate should translate CLIST
GOTO statements within the target REXX exec. Specify GOTO(S) to
translate CLIST GOTO statements into REXX SIGNAL statements.
Remember, however, that the REXX interpreter
may interrupt
pro-cessing with an error when it tries to execute a SIGNAL statement. To
handle this possibility, you can instead specify GOTO(L) to translate a
CLIST GOTO statement into a
logically equivalent REXX structure
which can execute without error. GOTO(L) is the default. See Section
1.6 for a complete discussion.
INDENT ( NO | YES )
The INDENT parameter governs whether or not RLX/Translate will
structure the generated EXEC by inserting leading spaces ahead of the
REXX EXEC constructs to enhance EXEC readability.
INDENT(YES) is the default.
INIT ( NO | YES )
The INIT parameter governs whether or not RLX/Translate assigns the
null string (a value with a length of zero) to REXX variables to
initialize them. This option is provided because the uninitialized value
of CLIST variables is the null string while the uninitialized value of a
REXX variable is its name.
The INIT option enables translated REXX execs to produce the same
run-time results as their original CLIST counterparts when those
CLISTs assume that their variables are initialized to the null string --
and rely on that fact. Specify INIT(YES) to request that code be
generated to assign an initial value of null to all REXX variables.
When INIT(NO) is specified, no initializing code is generated. Instead,
uninitialized REXX variables will have a value equivalent to their
name. INIT(NO) is the default.
INSOURCE
INS
This parameter directs RLX/Translate to print the source of the original
TSO CLIST.
MAP
This parameter directs RLX/Translate to print the CLIST procedure
function map associated with the source CLIST. MAP is the default.
MARGINS (m,n)
MAR (m,n)
This parameter specifies the column boundaries within each source
record within which CLIST language statements may appear. The first
value (m) specifies the beginning column while the second option (n)
represents the last column in which the text of CLIST language
statements may be coded. MAR(1,80) is the default. If the source
CLIST has line numbers,
exclude those columns. Consider for
example, a CLIST module with fixed length records in which CLIST
source text appears in columns 1 through 72 and line numbers appear in
columns 73 - 80. When translating this member, specify MAR(1,72).
NAME (name)
This parameter designates the name of both the source CLIST to be
translated and the target REXX exec to be written to the output dataset
defined by the RCTOUT DD statement.
NOINSOURCE
NOINS
This parameter directs RLX/Translate to suppress the original TSO
CLIST source listing.
NOMAP
This parameter directs RLX/Translate to suppress the CLIST
pro-cedure and function map.
NOOPTIONS
NOOPTN
This parameter directs RLX/Translate to suppress the listing of
translator options.
NOSOURCE
NOS
This parameter directs RLX/Translate to suppress the CLIST source
listing produced by the Translator.
OPTIONS
OPTN
This parameter directs RLX/Translate to print the list of explicit and
default translator options. This is the default.
SOURCE
S
This parameter directs RLX/Translate to print the CLIST source
procedure. This is the default.
STATS ( OFF | ON )
This parameter directs RLX/Translate to copy the CLIST member PDS
directory entry User data (ISPF statistics) into target EXEC PDS
library. STATS(OFF) is the default.
TRACE ( NO | YES )
This parameter is used to diagnose problems or errors in RLX/
Translate itself. Specify 'YES' if you wish all procedure clauses to be
traced before execution. TRACE(NO) is the default.
TRANSLATE ( NO | YES )
This parameter governs whether RLX/Translate will translate the
source CLIST into a logically equivalent REXX exec. Specify
TRANSLATE(NO) to suppress the translation process.
TRANS-LATE(YES) is the default.
TSO24 ( NO | YES )
This parameter identifies the version and release of the target TSO/E
environment in which the translated REXX exec will run.
TSO24(YES) specifies the target environment as TSO/E Version 2.4
(or a subsequent release) while TSO24(NO) specifies a TSO/E
environment
prior to Version 2.4.
TSO/E Version 2.4 is significant in that it relaxes the 500 character
restriction on the length of REXX clauses. As such, long CLIST
statements once translated can run 'as is' in a TSO/E Version 2.4
environment. In contrast, those same statements will be flagged as
unexecutable and in need of revision if the target TSO/E environment is
one prior to Version 2.4.
UPPERCASE ( NO | YES )
This parameter directs RLX/Translate to translate EXEC characters to
uppercase. Specify 'YES' if you want the Translator to convert all
characters to uppercase. UPPERCASE(NO) is the default.
XREF ( NO | YES )
This parameter directs RLX/Translate to generate a Symbol Cross
Reference. Specify 'YES' if you want the Translator to produce a
Symbol Cross Reference. XREF(YES) is the default.
2.2.2 RLX/Translate Options — Default Settings
BOUNDS(1,80) COMMENTS(NO) FILEIO_RC(REXX) FLAG(I) GOTO(L) INIT(NO) INDENT(YES) MAP MARGINS(1,80) NOINSOURCE OPTIONS SOURCE STATS(OFF) TRACE(NO) TRANSLATE(YES) TSO24(YES) UPPERCASE(NO) XREF(YES)
Chapter 3
The RLX/Translate Dialog
The RLX/Translate dialog lets you select one or more source TSO CLISTs to be
translated into functionally equivalent REXX execs. You can invoke the RLX/Translate
dialog within a TSO/ISPF environment by entering the TSO command %RCT on the
command line of any ISPF panel. Figure 3.1 illustrates the initial RLX/Translate panel
on which to specify a single TSO CLIST for processing. Alternatively, you can select
one or more CLISTs from a TSO CLIST source library or concatenated set of libraries.
____________________________________________________________________________ --- RLX/Translate --- Command ===> _
CLIST Source Library Project ===> RLX
Group ===> VtRtMt ===> ===> ===> Type ===> RLXCLIST Member ===> (Blank or pattern for member selection list) Other partitioned or sequential data set (fully qualified): Data set name ===> RLX/Translate Options partitioned data set (fully qualified): Data set name ===> RLX.VtRtMt.RLXFILE
RLX/Translate Library High Level Qualifiers: All nodes ===> RLX.VtRtMt Batch Job/Jobparm statement(s) ===> < Specify valid job card > ===>
===> ===>
____________________________________________________________________________
_______________________________________________________________________________ --- RLX/Translate --- Command ===> _
CLIST Source Library Project ===> RLX
Group ===> VtRtMt ===> ===> ===> Type ===> RLXCLIST Member ===> (Blank or pattern for member selection list) Other partitioned or sequential data set (fully qualified): Data set name ===> SOME.ONES.CLIST(SAMPLE) RLX/Translate Options partitioned data set (fully qualified): Data set name ===> RLX.VtRtMt.RLXFILE
RLX/Translate Library High Level Qualifiers: All nodes ===> RLX.VtRtMt Batch Job/Jobparm statement(s) ===> < Specify valid job card > ===>
===> ===>
_______________________________________________________________________________
Figure 3.2 RLX/Translate RCT ISPF dialog.
Figure 3.2 illustrates how to specify the name of a single CLIST for translation through
the Other Dataset name field.
If you leave the member name blank, the RLX/Translate dialog will display a scrollable
member list. Alternatively, you can specify a pattern for the member name. This
pattern, specified in accordance with ISPF/PDF conventions, limits the display to a list of
members that meet your criteria. You can specify the pattern in either the Member name
field or by specifying an 'Other Dataset Name' in the form
DATA.SET.NAME(PATTERN*).Figure 3.3 illustrates such a member list from which one or several RLX source modules
can be selected.
________________________________________________________________________________ Translate: RLX.VtRtMt.RLXCLIST --- ROW 1 OF 7 Command ===> Scroll ===> HALF Name Action Lib VV.MM Created Changed Size Init Mod ID s RLXF 1 24 00 92/09/23 92/09/23 11:48 217 217 0 RAI s RLXFHELP 1 24 00 92/09/23 92/09/23 11:48 32 32 0 RAI s RLXFHLP1 1 01 10 92/09/01 92/09/22 15:42 33 31 0 RAI4 RLXFPAN 1 24 00 92/09/23 92/09/23 11:48 33 33 0 RAI RLXFPANS 1 24 00 92/09/23 92/09/23 11:48 33 33 0 RAI RLXHLP1 1 24 00 92/09/23 92/09/23 11:48 33 33 0 RAI RLXL 1 24 00 92/09/23 92/09/23 11:48 100 100 0 RAI ________________________________________________________________________________
To select a module for RLX/Translate processing, key an 'S' into the row selection field
to the left of the member name (as illustrated in Figure 3.3). Once you have selected all
members from the currently displayed panel, press ENTER or one of the scroll PF keys.
The dialog will redisplay the member list with the literal
'Selected'appearing to the
right of the selected member name(s) -- as in Figure 3.4.
_______________________________________________________________________________ Translate: RLX.VtRtMt.RLXCLIST --- ROW 1 OF 7 Command ===> Scroll ===> HALF Name Action Lib VV.MM Created Changed Size Init Mod ID RLXF Selected 1 24 00 92/09/23 92/09/23 11:48 217 217 0 RAI RLXFHELP Selected 1 24 00 92/09/23 92/09/23 11:48 32 32 0 RAI RLXFHLP1 Selected 1 01 10 92/09/01 92/09/22 15:42 33 31 0 RAI RLXFPAN 1 24 00 92/09/23 92/09/23 11:48 33 33 0 RAI RLXFPANS 1 24 00 92/09/23 92/09/23 11:48 33 33 0 RAI RLXHLP1 1 24 00 92/09/23 92/09/23 11:48 33 33 0 RAI RLXL 1 24 00 92/09/23 92/09/23 11:48 100 100 0 RAI _______________________________________________________________________________
Figure 3.4
You can continue to scroll and select members as needed, without limitation. Once you
have selected all the CLIST members you want to translate, press the END PF key. The
dialog advances to the panel illustrated in Figure 3.5 on which you can specify translation
options and the target library to which translated REXX execs will be written. (Press
ENTER to bring up the additional options shown in the second half of Figure 3.5.)
Specify the target library into which RLX/Translate will write the translated REXX
exec(s) in the fields labeled Node 1, Node 2 and Node 3. Also specify any translation
options (as described in Section 2.2) that should apply for this execution of the
Translator. These options will apply to all selected members with the exception of EXEC
name. The name specified following the EXEC prompt applies only to the first TSO
CLIST selected for translation. For second and subsequent CLISTs you select, the
RLX/Translate dialog will assign the name of the original source TSO CLIST to the
translated REXX exec.
Once your press ENTER, the display will lock while RLX/Translate tailors the jobstream
which will execute in the background. You can either Edit the JCL first or submit the job
immediately.
_______________________________________________________________________________ --- RLX/Translate --- Command ===> Specify target Library for translated REXX exec(s) Node 1 ===> RAI Node 2 ===> TRANSLATE Node 3 ===> EXEC (may be blank) RLX/Translate Options (Blanks accept defaults) NAME ===> EXAMPLE (Name of both the source CLIST & target EXEC) EXEC ===> (Name of translated REXX exec) CLIST ===> (Name of source CLIST to be read) MARGINS ===> 1 - 72 (within which CLIST occurs - default 1,80) BOUNDS ===> 1 - 72 (within which REXX statements will be written) SOURCE ===> Y (Y/N - Produce CLIST listing) INSOURCE ===> Y (Y/N - Produce input source listing) OPTIONS ===> Y (Y/N - Produce RCT options listing)
--- RLX/Translate --- Command ===> RLX/Translate Options (Blanks accept defaults) XREF ===> Y (Y/N - Produce symbol cross-reference listing) MAP ===> Y (Y/N - Produce Function Map) FLAG ===> I (I/W/E/S - Lowest level error msgs to display) TRANSLATE ===> Y (Y/N - Translate CLIST source) GOTO ===> L (S - Translate as SIGNAL, L - Logical translate) TARGET TSO/E ===> A (B - Before V2.4, A - At or after V2.4 ) COMMENTS ===> Y (Y/N - Include CLIST comments into target EXEC) INIT ===> Y (Y/N - Initialize variables to the null string) INDENT ===> Y (Y/N - Enhance EXEC readability) FILEIO_RC ===> C (C/R - RC = CLIST GETFILE/PUTFILE or REXX EXECIO) UPPERCASE ===> N (Y/N - Translate EXEC characters to uppercase) STATS ===> N (Y/N - Preserve CLIST ISPF STATS) ________________________________________________________________________________
Chapter 4
Sample CLIST to REXX Translation
4.1 The Translate Dialog
This Chapter describes and illustrates the dialog, translation listing and REXX source
module produced by RLX/Translate within the context of an annotated translation job.
The sample CLIST is an Installation Verification Procedure (IVP) supplied with
RLX/Translate.
Figures 4.1, 4.2 and 4.3 illustrate the panels and tailored JCL presented through the
Translate dialog.
_____________________________________________________________________________
--- RLX/Translate --- Command ===> CLIST Source Library Project ===> RLX Group ===> VtRtMt ===> ===> ===> Type ===> RLXCLIST Member ===> FLYER (Blank or pattern for member selection list) Other partitioned or sequential data set (fully qualified): Data set name ===> RLX/Translate Options partitioned data set (fully qualified): Data set name ===> RLX.VtRtMt.RLXFILE RLX/Translate Library High Level Qualifiers: All nodes ===> RLX.VtRtMt Batch Job/Jobparm statement(s) ===> < Specify a valid Job Card > ===> ===> ===> _____________________________________________________________________________
_______________________________________________________________________________ --- RLX/Translate --- Command ===> Specify target Library for translated REXX exec(s) Node 1 ===> RLX Node 2 ===> TRANSLATE Node 3 ===> EXEC (may be blank) RLX/Translate Options (Blanks accept defaults) NAME ===> FLYER (Name of both the source CLIST & target EXEC) EXEC ===> (Name of translated REXX exec) CLIST ===> FLYER (Name of source CLIST to be read) MARGINS ===> 1 - 72 (within which CLIST occurs - default 1,80) BOUNDS ===> 1 - 72 (within which REXX statements will be written) SOURCE ===> Y (Y/N - Produce CLIST listing) INSOURCE ===> Y (Y/N - Produce input source listing) OPTIONS ===> Y (Y/N - Produce RCT options listing)
--- RLX/Translate --- Command ===> RLX/Translate Options (Blanks accept defaults) XREF ===> Y (Y/N - Produce symbol cross-reference listing) MAP ===> Y (Y/N - Produce Function Map) FLAG ===> I (I/W/E/S - Lowest level error msgs to display) TRANSLATE ===> Y (Y/N - Translate CLIST source) GOTO ===> L (S - Translate as SIGNAL, L - Logical translate) TARGET TSO/E ===> A (B - Before V2.4, A - At or after V2.4 ) COMMENTS ===> Y (Y/N - Include CLIST comments into target EXEC) INIT ===> Y (Y/N - Initialize variables to the null string) INDENT ===> Y (Y/N - Enhance EXEC readability) FILEIO_RC ===> C (C/R - RC = CLIST GETFILE/PUTFILE or REXX EXECIO) UPPERCASE ===> N (Y/N - Translate EXEC characters to uppercase) STATS ===> N (Y/N - Preserve CLIST ISPF STATS) _______________________________________________________________________________
_______________________________________________________________________________ EDIT ---- RAI.RAI1.SPFTEMP2.CNTL --- COLUMNS 001 072 COMMAND ===> SCROLL ===> PAGE 000001 //RAI1RCTI JOB (RAI0,1234),RAI,CLASS=K,MSGCLASS=H,NOTIFY=RAI1 000002 //*--- 000003 //* (C) COPYRIGHT RELATIONAL ARCHITECTS INTL. - 1994,1998 000004 //* LICENSED MATERIAL - PROGRAM PROPERTY RELATIONAL ARCHITECTS INTL 000005 //* RLX/TRANSLATE 000006 //*--- 000007 //RCTB PROC RLXLOAD='RLX.VtRtMt.RLXLOAD', 000008 // PARMS1='MAR(1,72),BOUNDS(1,72)', 000009 // PARMS2='', 000010 // PARMS3='', 000011 // RCTIN='RLX.VtRtMt.RLXEXEC', 000012 // RCTOUT='RLX.VtRtMt.RLXEXEC' 000013 //RCTB EXEC PGM=RCTB,REGION=2M, 000014 // PARM='&PARMS1,&PARMS2,&PARMS3,&RCTPARM' 000015 //STEPLIB DD DSN=&RLXLOAD,DISP=SHR 000016 //RCTIN DD DSN=&RCTIN,DISP=SHR 000017 //RCTOUT DD DSN=&RCTOUT,DISP=SHR 000018 //RCTPARMS DD DSN=RLX.VtRtMt.RLXFILE(RAI1RCTI),DISP=SHR 000019 //RCTPRINT DD SYSOUT=* 000020 //SYSTSPRT DD SYSOUT=* 000021 // PEND
000022 //STEP001 EXEC RCTB,RCTPARM='NAME(FLYER)' _______________________________________________________________________________
4.2 Sample Output Listing
This section illustrates the components that comprise the RLX/Translate listing.
RLX/Translate Version vrm: 3 Dec 1997. Run Date: 12/03/1997 Time: 13:10:27 Options specified:
MAR(1,72) BOUNDS(1,72) NAME(RCTFLYER) S TSO24(NO) COMMENTS(YES) INIT(YES) INS STATS(ON)
Options used:
BOUNDS(1,72) CLIST(RCTFLYER) COMMENTS(YES) EXEC(RCTFLYER) FILEIO_RC(REXX) FLAG(I) GOTO(L) INDENT(YES) INIT(YES) INSOURCE MAP MARGINS(1,72) NAME(RCTFLYER) OPTIONS SOURCE TRACE(NO) TRANSLATE(YES) TSO24(NO) UPPERCASE(NO) XREF(YES) STATS(ON)
Input Source of the original TSO CLIST 1 PROC 1 DEBUG KEYWORD('DEFAULT') 2
3 /* THIS SAMPLE PROCEDURE CAPTURES THE OUTPUT FROM THE
4 /* TSO LISTA COMMAND AND MAPS IT INTO AN ISPF TEMPORARY TABLE. 5 /* THE USER CAN THEN DISPLAY AND SCROLL THE OUTPUT ON AN ISPF PANEL 6
7 WRITE HELLO &SYSUID THE DATE IS &SYSDATE AND THE TIME IS &SYSTIME 8
9 ISPEXEC TBCREATE LISTA NAMES(LISTTEXT) /* CREATE TEMPORARY TABLE 10 SET SYSOUTTRAP = 999 /* SET MAX NUMBER OF OUTPUT LINES TO TRAP 11 LISTA STATUS HIST /* OBTAIN ALLOCATED FILE AND DATASET INFO 12 SET LIMIT = &SYSOUTLINE /* OBTAIN NUMBER OF LINES OF OUTPUT TRAPPED 13
14 /* MAP TRAPPED LIST ALLOCATION OUTPUT INTO THE ISPF TEMP TABLE 15
16 SET INDEX = 1 /* START WITH THE FIRST LINE 17 DO WHILE &INDEX < &LIMIT /* CONTINUE FOR ALL LINES 18 SET OUTLINE = &&SYSOUTLINE&INDEX /* GET CURRENT OUTPUT LINE 19 SET LISTTEXT = &STR(&OUTLINE) /* COPY TO ISPF ROW VARIABLE 20 ISPEXEC TBADD LISTA /* ADD TO ISPF TABLE 21 SET &INDEX = &INDEX + 1 /* STEP TO NEXT OUTPUT LINE 22 END
23 /* ISPEXEC TBTOP LISTA /* POSITION TO TOP OF DISPLAY 24 /* DO WHILE &LASTCC = 0 /* UNTIL USER PRESSES END 25 /* ISPEXEC TBDISPL LISTA PANEL(LISTA) /* DISPLAY AND SCROLL OUTPUT 26 /* END
27 ISPEXEC TBEND LISTA /* REMOVE ISPF TEMP TABLE 28 EXIT CODE(&LASTCC)
Source of the original TSO CLIST 1 PROC 1 DEBUG KEYWORD('DEFAULT')
2 WRITE HELLO &SYSUID THE DATE IS &SYSDATE AND THE TIME IS &SYSTIME 3 ISPEXEC TBCREATE LISTA NAMES(LISTTEXT)
4 SET SYSOUTTRAP = 999 5 LISTA STATUS HIST 6 SET LIMIT = &SYSOUTLINE 7 SET INDEX = 1
8 DO WHILE &INDEX < &LIMIT
9 SET OUTLINE = &&SYSOUTLINE&INDEX 10 SET LISTTEXT = &STR(&OUTLINE) 11 ISPEXEC TBADD LISTA
12 SET &INDEX = &INDEX + 1 13 END
15 EXIT CODE(&LASTCC)
RLX/Translate Version vrm: 3 Dec 1997. Run Date: 12/03/1997 Time: 13:10:27 Symbol Cross-reference listing
Cross-reference of commands References
LISTA... 5
Cross-reference of control variables References &LASTCC... 15 &SYSDATE... 2 &SYSOUTLINE... 6 9 &SYSTIME... 2 &SYSUID... 2 SYSOUTTRAP... 4
Cross-reference of functions References STR... 10
Cross-reference of identifiers References INDEX... 7 8 9 12 12 12 LIMIT... 6 8
LISTTEXT... 10
OUTLINE... 9 10 Cross-reference of ISPF Services References TBADD... 11
TBCREATE... 3
TBEND... 14
Cross-reference of literals References AND... 2 DATE... 2 DEBUG... 1 HELLO... 2 HIST... 5 IS... 2 2 KEYWORD... 1 LISTA... 3 5 11 14 NAMES... 3 PROC... 1 STATUS... 5 TBADD... 11 TBCREATE... 3 TBEND... 14 THE... 2 2 TIME... 2 1... 1
Cross-reference of statements References DO... 8 END... 13 EXIT... 15 PROC... 1 SET... 4 6 7 9 10 12 WRITE... 2
Symbol cross-reference summary RLX/Translate found the following: 1 external command(s) 6 control variable(s) 1 function(s) 4 identifier(s) 3 ISPF service(s) 0 label(s) 17 literal(s) 6 statement(s) 0 RLX service(s) End of Symbol cross-reference
RLX/Translate Version vrm: 3 Dec 1997. Run Date: 12/03/1997 Time: 13:10:27 Function Map
Source CLIST Format REXX Format LineID --- --- 10 STR(&OUTLINE)... OUTLINE End of Function Map
RLX/Translate Version vrm: 3 Dec 1997. Run Date: 12/03/1997 Time: 13:10:27 RLX/Translate statistics
15 clauses in the original CLIST were translated 54 lines were written to the translated REXX exec There were 0 message(s) issued for this translation There were 0 message(s) suppressed by the flag option. Return code is 0
4.3 The translated REXX Exec
This section describes and illustrates the REXX source module produced by the
Translator. Figure 4.4 shows the REXX source module in its entirety.
RLX/Translate generates a REXX source header (like the one shown in the first ten lines
of Figure 4.4) to identify the date and time of translation along with translator's TSO User
ID.
4.3.1 Address TSO
Since TSO CLISTs execute (by definition) in the TSO environment, RLX/Translate sets
the initial REXX host command environment to TSO. Thus, Address TSO becomes the
first executable statement within the translated REXX exec.
___________________________________________________________________________ /* This REXX exec was produced by
RLX/Translate Version vrm: 3 Dec 1997.
(C) Copyright Relational Architects Intl. - 1994. 1997. Licensed Material - Program property Relational Architects Intl -
Exec Name ... RCTFLYER Translation Date ... 12/03/1997 Translation Time ... 10:16:46 Translator's User ID .. RAI017 */ Address TSO INDEX = '' LIMIT = '' LISTTEXT = '' OUTLINE = '' Arg ParmString
Interpret RCT$PROC(ParmString,"PROC 1 DEBUG KEYWORD('DEFAULT')")
/* THIS SAMPLE PROCEDURE CAPTURES THE OUTPUT FROM THE */ /* TSO LISTA COMMAND AND MAPS IT INTO AN ISPF TEMPORARY TABLE. */ /* THE USER CAN THEN DISPLAY AND SCROLL THE OUTPUT ON AN ISPF PANEL */ Say "HELLO",
SysVar('SYSUID') "THE DATE IS" Date('U') "AND THE TIME IS" Time() /* CREATE TEMPORARY TABLE */ Address ISPEXEC "TBCREATE LISTA NAMES(LISTTEXT)"
Do
Call OUTTRAP 'SYSOUTLINE',999 SYSOUTTRAP = 999
/* SET MAX NUMBER OF OUTPUT LINES TO TRAP */ end
/* OBTAIN ALLOCATED FILE AND DATASET INFO */ "LISTA STATUS HIST"
/* OBTAIN NUMBER OF LINES OF OUTPUT TRAPPED */ LIMIT = SYSOUTLINE0
/* MAP TRAPPED LIST ALLOCATION OUTPUT INTO THE ISPF TEMP TABLE */ /* START WITH THE FIRST LINE */ INDEX = 1
/* CONTINUE FOR ALL LINES */ Do while INDEX<LIMIT
/* GET CURRENT OUTPUT LINE */ OUTLINE = Value(SYSOUTLINE³³INDEX)
/* COPY TO ISPF ROW VARIABLE */ LISTTEXT = OUTLINE
/* ADD TO ISPF TABLE */ Address ISPEXEC "TBADD LISTA"
/* STEP TO NEXT OUTPUT LINE */ INDEX = INDEX + 1
end
/* ISPEXEC TBTOP LISTA POSITION TO TOP OF DISPLAY */ /* DO WHILE &LASTCC = 0 UNTIL USER PRESSES END */ /* ISPEXEC TBDISPL LISTA PANEL(LISTA) DISPLAY AND SCROLL OUTPUT */ /* END */ /* REMOVE ISPF TEMP TABLE */ Address ISPEXEC "TBEND LISTA"
Exit(Rc)
___________________________________________________________________________