Specifying a Prefix for ISPF Table Row Variable Names
Describes how to specify a prefix for ISPF table row variable names.
The
RLX
PREF operand directs RLX
to create an ISPF table in which the name of each row variable is the RLX
PREF value concatenated with the ordinal number (1st, 2nd, 3rd, ...) of the column with the SELECT list. The syntax of the RLX
PREF clause is as follows:INTO RLXPREF(column_name_prefix,Indicator_variable_prefix)
Both
Column_name_prefix
and Indicator_variable_prefix
are limited to 4 characters in length. If no Indicator_variable_prefix
and the column can assume a value of NULL, then RLX
creates a ISPF row variable named IDV concatenated with the column’s ordinal number within the SELECT list.The following example illustrates the use of the
RLX
PREF operand within the INTO clause of the RLX
DECLARE ISPFTABLE statement. The INTO RLXPREF(COL,IV)
clause appears in bold, underlined type in the example./* REXX */ address RLX ‘RLX DECLARE RESULT ISPFTABLE FOR’, ‘SELECT NAME, COLTYPE, LENGTH’, ‘INTO RLXPREF(COL,IV)FROM SYSIBM.SYSCOLUMNS’, ‘WHERE TBCREATOR = :TBCREATOR AND TBNAME = :TBNAME’ ‘RLX TBDISPL RESULT PANEL(RLX)’
In the above example, COLTYPE is the 2nd column in the SELECT list. As such,
RLX
creates an ISPF table row variable named COL2. If COLTYPE could assume a value of NULL, RLX
would also create an ISPF table row variable named IV2 to act as an indicator variable.Assuming the exec is named EXAMPLE, you can execute it and produce the scrollable query result by issuing the following command:
RLXS EXAMPLE
SQL Query Result 'RESULT' ------------------------- -------- Row 1 to 17 of 39 Command ===> Scroll ===> PAGE COL1 COL2 COL3 1(V) 2(C) 3(S) NAME VARCHAR 18 CREATOR CHAR 8 TYPE CHAR 1 DBNAME CHAR 8 TSNAME CHAR 8 DBID SMALLINT 2 OBID SMALLINT 2 COLCOUNT SMALLINT 2 EDPROC CHAR 8 VALPROC CHAR 8 CLUSTERTYPE CHAR 1 CLUSTERRID INTEGER 4 CARD INTEGER 4 NPAGES INTEGER 4 PCTPAGES SMALLINT 2 IBMREQD CHAR 1 REMARKS VARCHAR 254
The names of the ISPF table row variables (the underlined headings in the panel) are named COL1, COL2 and COL3 – in accordance with the
RLX
PREF(COL) specification. The RLX
TBDISPL statement automatically produces a TBDISPL panel suitable to display the query result loaded into the ISPF table via the RLX
DECLARE ISPFTABLE statement. The NULLS command of the RLX
TBDISPL service governs whether indicator variables appear next to their associated host main variables on the display.