TPX: How to continue SET RTITLE across multiple lines?
search cancel

TPX: How to continue SET RTITLE across multiple lines?

book

Article ID: 51194

calendar_today

Updated On:

Products

TPX - Session Management

Issue/Introduction

In case a long tittle line is needed, it is not possible to directly continue the text from RTITLEx across more than one line of SYSIN input.

This document outlines a couple of alternative methods:

  1. Specify SYSIN DD to point to a data set that has LRECL of the desired report width.

  2. VDEFINE several shorter variables, then SET values and specify the variables in the report title

Environment

Release : 5.4

Component : TPX for z/OS

Resolution


1. Specify SYSIN DD to point to a data set that has LRECL of the desired report width.

As documented in Formatting a Field Longer than 78 Characters: Use a SYSIN control file with an LRECL greater than 80.

For example, If a tittle will be 132 characters long, then define a data set with LRECL 148 or longer so that is long enough to accommodate a statement:

SET RTITLE1 '<<132chars>>'

 
NOTE: It is not possible to simply have the JCL in a large LRECL dataset and use SYSIN DD * as this will not work. The JCL must specify:

//SYSIN DD DSN=long.lrecl.dataset,DISP=SHR


JCL sample:

//BATCHA   EXEC tpxproc,VNODE='*BATCH*'  
//EXTFILE  DD UNIT=SYSDA,SPACE=(CYL,(1,1))            
//RPTFILE  DD SYSOUT=*                     
//SYSIN    DD DSN=userid.CNTL.LRECL256(SYSINLNG),DISP=SHR

 
SYSIN  sample:

C                                                                               
C  Create report with long titles                                               
C                                                                               
EXTRACT GIVING(EXTFILE) USER AND NO SESSIONS (UIDXNAME(--------))              
C                                                                               
C Method A - Set a long value for RTITLEx                                       
C Must have SYSIN DD specify data set with large LRECL (not DD *)              
C                                                                               
SET RTITLE1                                                                     
'***** TITLE REPORT A: '                                                        
SET RTITLE2                                                                     
' create with SYSIN statements in dataset that has large LRECL like this files that uses LRECL=256 so I can make this line very long as needed'
REPORT GIVING(RPTFILE) USING(EXTFILE)                                           
( )
 

Sample Report
Printing the sample above produces the following output:

.....+....10...+....20...+....30...+....40...+....50...+....60...+....70...+....80...+....90...+....100..+....110..+....120..+...|130..+....140
***** TITLE REPORT A:                                                          
create with SYSIN statements in dataset that has large LRECL like this files that uses LRECL=256 so I can make this line very lon

NOTE: Site default for SYSOUT=* may be limited as in the above example where the defined RTITLE2 is truncated. (The "|" on the column count line indicates the end of the print line.)

 

Write the report to a data set with the required LRECL, or explicitly define a long LRECL on the output report file:

//BATCHA   EXEC tpxproc,VNODE='*BATCH*'  
//EXTFILE  DD UNIT=SYSDA,SPACE=(CYL,(1,1))            
//RPTFILE  DD SYSOUT=*,DCB=(LRECL=256)
//SYSIN    DD DSN=userid.CNTL.LRECL256(SYSINLNG),DISP=SHR


Sample Report
Printing the sample above produces the following output:

.....+....10...+....20...+....30...+....40...+....50...+....60...+....70...+....80...+....90...+....100..+....110..+....120..+....130|.+....140
***** TITLE REPORT A:                                                           
create with SYSIN statements in dataset that has large LRECL like this files that uses LRECL=256 so I can make this line very long as

Note that specifying LRECL=256 on the SYSOUT=* only extended the print line to 132 characters.  Shop standards may differ.

 

IMPORTANT NOTE:
Site default for SYSOUT may be limited, so even though a larger LRECL was specified, every character that goes beyond the maximum length allowed won’t be printed on the report.



2. VDEFINE several shorter variables, then SET values and specify the variables in the report title

//BATCHB   EXEC tpxproc,VNODE='*BATCH*' 
//EXTFILE  DD UNIT=SYSDA,SPACE=(CYL,(1,1)),DISP=(MOD)                  
//RPTFILE  DD SYSOUT=*  
//SYSIN DD *                                                           
C                                                                       
C  Create report with long titles                                      
C                                                                      
EXTRACT GIVING(EXTFILE) USER AND NO SESSIONS (UIDXNAME(--------))      
C                                                                       
C  Method B - Set several 40 char variables then concatenate these     
C in an RTITLE stmt                                                    
C   - Variable names must be at least 2 chars in length (e.g. AA not A)
C   - Must VDEFINE then SET                                            
C                                                                      
VDEFINE AA (LENGTH(40))                                                
VDEFINE BB (LENGTH(40))                                                
VDEFINE CC (LENGTH(40))                                                
SET AA 'AAAAAAAAAAaaaaaaaaaaAAAAAAAAAAaaaaaaaaaa'                      
SET BB 'BBBBBBBBBBbbbbbbbbbbBBBBBBBBBBbbbbbbbbbb'                      
SET CC 'CCCCCCCCCCccccccccccCCCCCCCCCCcccccccccc'                      
SET RTITLE1                                                             
'****** TITLE REPORT B:'                                               
SET RTITLE2                                                             
' VDEFINE variables with part of title line then use those in RTITLEx' 
SET RTITLE3                                                            
' &AA &BB &CC '                                                         
REPORT GIVING(RPTFILE) USING(EXTFILE)
()


Sample Report
Printing the sample above produces the following output:

...+....10...+....20...+....30...+....40...+....50...+....60...+....70...+....80...+....90...+....100..+....110..+....120|.+....130
***** TITLE REPORT B:                                              
VDEFINE VARIABLES WITH PART OF TITLE LINE THEN USE THOSE IN RTITLEX
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC