EasyManuals Logo

IBM TSO/E REXX User Manual

IBM TSO/E REXX
242 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #85 background imageLoading...
Page #85 background image
the user a message indicating the shortened name. Use the LENGTH and the
SUBSTR built-in functions as described in z/OS TSO/E REXX Reference.
ANSWER
Possible Solution
/**************************** REXX *********************************/
/* This exec tests the length of a name for a data set member. If */
/* the name is longer than 8 characters, the exec truncates the */
/* extra characters and sends the user a message indicating the */
/* shortened member name. */
/*******************************************************************/
SAY 'Please enter a member name.'
PULL membername
IF LENGTH(membername) > 8 THEN /* Name is longer than 8 characters*/
DO
membername = SUBSTR(membername,1,8) /* Shorten the name to */
/* the first 8 characters*/
SAY 'The member name you entered was too long.'
SAY membername 'will be used.'
END
ELSE NOP
Built-In Functions
Chapter 5. Using Functions 67

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the IBM TSO/E REXX and is the answer not in the manual?

IBM TSO/E REXX Specifications

General IconGeneral
BrandIBM
ModelTSO/E REXX
CategoryComputer Hardware
LanguageEnglish

Related product manuals