EasyManuals Logo
Home>IBM>Computer Hardware>TSO/E REXX

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 #168 background imageLoading...
Page #168 background image
Additional Examples
Data Stack Example 1
/********************************* REXX ****************************/
/* This exec tests several of the stack functions to see how they */
/* work together. It uses the NEWSTACK and DELSTACK commands, puts */
/* an element on the stack that exceeds 255 characters, uses the */
/* LENGTH built-in function to see how long the element is, uses */
/* QUEUED built-in function to see how many items are on the stack,*/
/* and then issues more PULL instructions than are elements on the */
/* stack. */
/*******************************************************************/
element = 'Attention please! This is a test.'
PUSH element
'NEWSTACK' /* Create a new stack and protect elements previously */
/* placed on the stack */
longitem = 'SAA is a definition -- a set of software interfaces,',
'conventions, and protocols that provide a framework for designing',
'and developing applications with cross-system consistency.',
'The Systems Application Architecture defines a common programming',
'interface you can use to develop applications, and defines common',
'communications support that you can use to connect those',
'applications.'
SAY 'The length of the element is' LENGTH(longitem) 'characters.'
/* The length of the element is 379 characters. */
QUEUE longitem
PULL anyitem
SAY anyitem /* Displays the longitem quote in uppercase */
SAY 'There are' QUEUED() 'number of elements on the stack.'
/* The QUEUED function returns 0 */
PULL emptyitem /* Pull an element from an empty stack. Results in */
/* a blank screen and PULL waits for terminal */
/* input. To end the wait, press ENTER. */
'DELSTACK' /* Remove the new stack and return to original stack.*/
PULL anyitem
SAY anyitem /* Displays ATTENTION PLEASE! THIS IS A TEST. */
Protecting Elements in the Data Stack
150
z/OS V1R1.0 TSO/E REXX User’s Guide

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