Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·...

352
Functions and Other Facilities Integrated Resource Manager Version 500 GC32-9223-00 September 2002 Candle Corporation 201 North Douglas Street El Segundo, California 90245

Transcript of Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·...

Page 1: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Functions and Other FacilitiesIntegrated Resource Manager

Version 500

GC32-9223-00

September 2002

Candle Corporation201 North Douglas Street

El Segundo, California 90245

Page 2: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

2 Integrated Resource Manager Functions and Other Facilities Version 500

Registered trademarks and service marks of Candle Corporation: AF/OPERATOR, AF/PERFORMER, AF/REMOTE, Availability Command Center, Candle Command Center, Candle Electronic Customer Support, Candle logo, Candle Management Server, Candle Management Workstation, Candle Technologies, CL/CONFERENCE, CL/SUPERSESSION, CT, CT/Data Server, CT/DS, DB Logo, DB/QUICKCHANGE, DELTAMON, ETEWatch, IntelliWatch, MQSecure, MQView, OMEGACENTER, OMEGAMON, OMEGAMON/e, OMEGAMON II, OMEGAMON Monitoring Agent, OMEGAVIEW, OMEGAVIEW II, Solutions for Networked Businesses, and Transplex.Trademarks and service marks of Candle Corporation: Alert Adapter, Alert Adapter Plus, Alert Emitter, AMS, Amsys, AUTOMATED FACILITIES, Availability Managers, Candle Business Partner Logo, Candle Direct Logo, CandleLight, CandleNet, CandleNet 2000, CandleNet Portal, Candle CommandPro, CCC, CECS, CICAT, CL/ENGINE, CL/GATEWAY, CL/TECHNOLOGY, CMS, CMW, Command & Control, CommandWatch, Connect-Two, CSA ANALYZER, CT/ALS, CT/Application Logic Services, CT/DCS, CT/Distributed Computing Services, CT/Engine, CT/Implementation Services, CT/IX, CT/Workbench, CT/Workstation Server, CT/WS, DB/DASD, DB/EXPLAIN, DB/MIGRATOR, DB/QUICKCOMPARE, DB/SMU, DB/Tools, DB/WORKBENCH, Design Network, DEXAN, eBA*ServiceMonitor, End-to-End, Enterprise Candle Command Center, Enterprise Candle Management Workstation, EPILOG, ERPNet, ESRA, ETEWatch, HostBridge, IntelliWatch Pinnacle, Lava Console, Messaging Mastered, MQADMIN, MQEdit, MQEXPERT, MQMON, NBX, OMA, OMC Gateway, OMC Status Manager, OMEGACENTER Bridge, OMEGACENTER Gateway, OMEGACENTER Status Manager, OMEGAMON Management Center, OSM, PC COMPANION, Performance Pac, PowerQ, PQConfiguration, PQEdit, PQScope, Response Time Network, Roma, Roma Application Manager, Roma Broker, Roma BSP, Roma Connector, Roma Developer, Roma FS/A, Roma FS/Access, Roma Network, Roma Object Access, Roma Systems Manager, Roma WF/Access, Roma Workflow Access, RTA, RTN, SentinelManager, Solutions for Networked Applications, Status Monitor, Tracer, Unified Directory Services, and Volcano.Trademarks and registered trademarks of other companies: AIX, DB2, and MQSeries are registered trademarks of International Business Machines Corporation. SAP is a registered trademark and R/3 is a trademark of SAP AG. UNIX is a registered trademark in the U.S. and other countries, licensed exclusively through X/Open Company Ltd. HP-UX is a trademark of Hewlett-Packard Company. SunOS is a trademark of Sun Microsystems, Inc.

All other company and product names used herein are trademarks or registered trademarks of their respective companies.

ProtoView Development Corp. - May contain DataTable Version 3.0 Copyright 1989 - 1996 by ProtoView Development Corp. and distributed under license by Candle Corporation.

Copyright © September 2002, Candle Corporation, a California corporation. All rights reserved. International rights secured.

Threaded Environment for AS/400, Patent No. 5,504,898; Data Server with Data Probes Employing Predicate Tests in Rule Statements (Event Driven Sampling), Patent No. 5,615,359; MVS/ESA Message Transport System Using the XCF Coupling Facility, Patent No. 5,754,856; Intelligent Remote Agent for Computer Performance Monitoring, Patent No. 5,781,703; Data Server with Event Driven Sampling, Patent No. 5,809,238; Threaded Environment for Computer Systems Without Native Threading Support, Patent No. 5,835,763; Object Procedure Messaging Facility, Patent No. 5,848,234; End-to-End Response Time Measurement for Computer Programs, Patent No. 5,991,705; Communications on a Network, Patent Pending; Improved Message Queuing Based Network Computing Architecture, Patent Pending; User Interface for System Management Applications, Patent Pending.

NOTICE: This documentation is provided with RESTRICTED RIGHTS. Use, duplication, or disclosure by the Government is subject to restrictions set forth in the applicable license agreement and/or the applicable government rights clause.

This documentation contains confidential, proprietary information of Candle Corporation that is licensed for your internal use only. Any unauthorized use, duplication, or disclosure is unlawful.

Page 3: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Contents 3

Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11About this Document . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11Prerequisites. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

Adobe Portable Document Format . . . . . . . . . . . . . . . . . . . . . . . . . . 12Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12Printing problems? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

Documentation Conventions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14Panels and figures. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14Revision bars . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14Variables and literals. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14Symbols. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15

Documentation Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16Online Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16Printed documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

Chapter 1. REXX Function Package Assembler Functions. . . . . . . . . . . . . . 19Dataset Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

ALLOC - Dataset Allocate Function . . . . . . . . . . . . . . . . . . . 21ALLOCDD - Allocated Dataset DD Function . . . . . . . . . . . . 29ALLOCDSN - Allocated Dataset Name Function . . . . . . . . . 31ALLOCED - Dataset Allocated Function . . . . . . . . . . . . . . . . 32CONCAT - Dataset Concatenate Function . . . . . . . . . . . . . . 34DECONCAT - Dataset Deoncatenate Function . . . . . . . . . . . 35FREE - Dataset Unallocate Function . . . . . . . . . . . . . . . . . . . 36MEMBER - PDS Member Function . . . . . . . . . . . . . . . . . . . 39MEMBERS - PDS Members Function . . . . . . . . . . . . . . . . . 40

General Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41ABEND - Abnormal Termination Function . . . . . . . . . . . . . . 41BIT2DAYS - Bit-to-Days Function. . . . . . . . . . . . . . . . . . . . . 43BIT2LIST - Bit-to-List Function . . . . . . . . . . . . . . . . . . . . . . 44

Contents

Page 4: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Contents

4 Integrated Resource Manager Functions and Other Facilities Version 500

CPCMD - CP Command Function . . . . . . . . . . . . . . . . . . . . 45CPUTIME - CPU Time Used Function . . . . . . . . . . . . . . . . . 46DECRYPT - Decrypt Function . . . . . . . . . . . . . . . . . . . . . . . 47ENCRYPT - Encrypt Function . . . . . . . . . . . . . . . . . . . . . . . 48PATTERN - Pattern Matching Function . . . . . . . . . . . . . . . . . 49SORTWORD - Sort Word Function . . . . . . . . . . . . . . . . . . . 53WAITSECS - Wait Seconds Function . . . . . . . . . . . . . . . . . . 54

Message Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55DOM - Delete-Operator-Message Function. . . . . . . . . . . . . . 55MLWTO - Write-to-Operator Function . . . . . . . . . . . . . . . . . 56WTL - Write-to-Log Function . . . . . . . . . . . . . . . . . . . . . . . . 60WTO - Write-to-Operator Function . . . . . . . . . . . . . . . . . . . . 61WTOR - Write-to-Operator with Reply Function . . . . . . . . . . 64WTOROK - Query WTOR Limit Function . . . . . . . . . . . . . . 67

System Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68CONSADDR - Console Address Function . . . . . . . . . . . . . . 68CONSAREA - Console Area ID Function . . . . . . . . . . . . . . . 69CONSID - Console ID Function . . . . . . . . . . . . . . . . . . . . . . 70CONSNAME - Console Name Function . . . . . . . . . . . . . . . . 71CONSOUTP - Console Output Pending Function. . . . . . . . . 72CONXID - Extended Console ID Function . . . . . . . . . . . . . . 73CONXNAME - Extended Console Name Function . . . . . . . . 74DEVALLOC - Device Allocated Function . . . . . . . . . . . . . . . 75DEVICE - Device Class Function . . . . . . . . . . . . . . . . . . . . . 76DEVICES - Device Class List Function . . . . . . . . . . . . . . . . . 77DEVNUM - Device Number Function . . . . . . . . . . . . . . . . . . 84DEVPATH - Device Path Function . . . . . . . . . . . . . . . . . . . . 85DEVPEND - Device Pending Offline Function. . . . . . . . . . . . 86IPLTIME - IPL Time Function . . . . . . . . . . . . . . . . . . . . . . . . 87MODIFYID - Modify ID Function . . . . . . . . . . . . . . . . . . . . . 88ONLINE - Device Online Function . . . . . . . . . . . . . . . . . . . . 89@RCFSSTA - Sysplex Status Function. . . . . . . . . . . . . . . . . 90REGION - Region Size Function. . . . . . . . . . . . . . . . . . . . . . 92REPLIES - Outstanding Replies Function . . . . . . . . . . . . . . . 93RESDEQ - Resource Dequeue Function . . . . . . . . . . . . . . . . 95RESENQ - Resource Enqueue Function . . . . . . . . . . . . . . . . 96VOLSER - Volume Serial Number Function . . . . . . . . . . . . . 98

Date and Time Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99

Page 5: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Contents 5

BASE2BDS - Base to Base-Date-in-Seconds Function . . . . . 99BASE2DAY - Base Date to Date Function. . . . . . . . . . . . . . 101BDS - Base-Date-in-Seconds Function . . . . . . . . . . . . . . . . 103BDS2BASE - Base-Date-in-Seconds to Base Function . . . . 104BDS2TIME - Base-Date-in-Seconds to Time Function . . . . 106BDS2TOD - Base-Date-in-Seconds to TOD Function . . . . . 108CENT2DAY - Day-of-Century to Date Function . . . . . . . . . 110DATEPART - Date Segment Function. . . . . . . . . . . . . . . . . 112DATETIME - Date and Time Function . . . . . . . . . . . . . . . . 113DAY2BASE - Date to Base Date Function. . . . . . . . . . . . . . 118DAY2CENT - Date to Day-of-Century Function . . . . . . . . . 120GMT - Greenwich Mean Time Function . . . . . . . . . . . . . . . 121LEAPYEAR - Leap Year Function. . . . . . . . . . . . . . . . . . . . 122TIMEPART - Time Segment Function. . . . . . . . . . . . . . . . . 124TIME2BDS - Time to Base-in-Seconds Function . . . . . . . . 125TIME2TOD - Time to Time-of-Day Function . . . . . . . . . . . 127TOD - Time-of-Day Function . . . . . . . . . . . . . . . . . . . . . . . 129TOD2BDS - Time-of-Day to BDS Function . . . . . . . . . . . . 130TOD2TIME - Time-of-Day to Time Function . . . . . . . . . . . 132WEEKDAY - Date to Day-of-Week Function . . . . . . . . . . . . 134

AF/OPERATOR Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135FINDLGN - Find Logon Function . . . . . . . . . . . . . . . . . . . . 135FINDMAT - Find Match Function . . . . . . . . . . . . . . . . . . . . 136LOGMSG - Log Message Function. . . . . . . . . . . . . . . . . . . 138P2PCOM1 - Peer-to-Peer COM1 Active Function . . . . . . . . 139P2PLINK - Peer-to-Peer Link Active Function . . . . . . . . . . . 140

IMS Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141IMSDCRDY - IMS DC Ready Function . . . . . . . . . . . . . . . 141IMSREADY - IMS Ready Function . . . . . . . . . . . . . . . . . . . 142

JES3 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143J3ACTIVE - JES3 Active Function . . . . . . . . . . . . . . . . . . . 143J3CLASS - JES3 Job Class Function . . . . . . . . . . . . . . . . . 144J3DEVICE - JES3 Device Function . . . . . . . . . . . . . . . . . . 146J3GLBID - JES3 Global Main ID Function. . . . . . . . . . . . . 147J3GLOBAL - JES3 Global Function. . . . . . . . . . . . . . . . . . 148J3GROUP - JES3 Job Group Function . . . . . . . . . . . . . . . 149J3INITS - JES3 Job Initiators Function. . . . . . . . . . . . . . . . 151J3NJECNS - JES3 NJE Console Function . . . . . . . . . . . . . 153

Page 6: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Contents

6 Integrated Resource Manager Functions and Other Facilities Version 500

J3RJPWS - JES3 SNA/RJP Workstation Function . . . . . . . 154J3SEQNO - JES3 Sequence Number Function . . . . . . . . . 156

REXX Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158EXECDROP - Drop an EXEC Function . . . . . . . . . . . . . . . 158EXECLOAD - Load an EXEC Function . . . . . . . . . . . . . . . 159EXECSTAT - EXEC Status Function. . . . . . . . . . . . . . . . . . 161NOVALU - No Value Function . . . . . . . . . . . . . . . . . . . . . . 162REXXIC - Immediate Command Function . . . . . . . . . . . . . 163REXXVGET - Variable Get Function. . . . . . . . . . . . . . . . . . 164REXXVPUT - Variable Put Function . . . . . . . . . . . . . . . . . . 165SUBCOM - Subcommand Environment Function . . . . . . . 166

Table Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167TABLE - Manager Interface . . . . . . . . . . . . . . . . . . . . . . . . 167TBADD - Add a Row . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169TBAPPEND - Append Rows. . . . . . . . . . . . . . . . . . . . . . . . 170TBARRAY - Create Row Arrays . . . . . . . . . . . . . . . . . . . . . 171TBCOLUMN - Get Column Names . . . . . . . . . . . . . . . . . . 172TBCREATE - Create a Table . . . . . . . . . . . . . . . . . . . . . . . 173TBDELETE - Delete a Row . . . . . . . . . . . . . . . . . . . . . . . . 175TBEXIST - Locate a Row . . . . . . . . . . . . . . . . . . . . . . . . . . 176TBFETCH - Fetch a Cell. . . . . . . . . . . . . . . . . . . . . . . . . . . 177TBGET - Get a Row . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178TBIDS - Get Row IDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179TBKEYS - Get Keys . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180TBMOD - Modify a Row . . . . . . . . . . . . . . . . . . . . . . . . . . 181TBNAMES - Get Table Names . . . . . . . . . . . . . . . . . . . . . . 183TBPUT - Put a Row . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184TBQUERY - Table Information. . . . . . . . . . . . . . . . . . . . . . 185TBREAD - Read a Row . . . . . . . . . . . . . . . . . . . . . . . . . . . 192TBRECORD - Record Number. . . . . . . . . . . . . . . . . . . . . . 194TBRESTOR - Restore a Cell. . . . . . . . . . . . . . . . . . . . . . . . 195TBROW - Get Row Names . . . . . . . . . . . . . . . . . . . . . . . . . 196TBSARG - Search Argument . . . . . . . . . . . . . . . . . . . . . . . 197TBSCAN - Scan a Table . . . . . . . . . . . . . . . . . . . . . . . . . . . 199TBSEARCH - Search a Table . . . . . . . . . . . . . . . . . . . . . . . 200TBSELECT - Data Selection . . . . . . . . . . . . . . . . . . . . . . . 201TBSORT - Sort a Table . . . . . . . . . . . . . . . . . . . . . . . . . . . 204TBUPDATE - Update a Cell . . . . . . . . . . . . . . . . . . . . . . . . 205

Page 7: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Contents 7

Chapter 2. REXX Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207Active Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208

@AFRACTV - AF/REMOTE Active Function . . . . . . . . . . . 208@BDTACTV - BDT Node Active Function . . . . . . . . . . . . . 209@DB2DACT - DB2 Database Active Function . . . . . . . . . . 210@DB2SACT - DB2 Tablespace Active Function . . . . . . . . . 211@IMSAACT - IMS APPC Active Function . . . . . . . . . . . . . 212@IMSDACT - IMS Database Active Function. . . . . . . . . . . 213@IMSLACT - IMS Link Active Function . . . . . . . . . . . . . . 214@IMSNACT - IMS Node Active Function. . . . . . . . . . . . . . 215@IMSRACT - IMS Area Active Function . . . . . . . . . . . . . . 216@IMSSACT - IMS Subsystem Active Function. . . . . . . . . . 217@IMSTACT - IMS Transaction Active Function . . . . . . . . . 218@IMSTAFA - IMS TAF Session Active Function . . . . . . . . . 219@JES2LGN - JES2 VTAM Interface Active Function . . . . . 220@JES2LNE - JES2 RJE/NJE Line Active Function . . . . . . 221@MQUCACT - MQ Channel Active Function . . . . . . . . . . 222@MQULACT - MQ Listener Active Function . . . . . . . . . . . 223@MQUSACT - MQ Command Server Active Function . . . 224@P2PCOM1 - Peer-to-Peer COM1 Active Function . . . . . . 225@P2PLNKA - Peer-to-Peer Link Active Function . . . . . . . . 226@RCFACTV - Started Task Manager Active Function. . . . . 227@RCFLACT - Started Task Manager List Active Function . 229

Application Call Functions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230@AFRCALL - AF/REMOTE Manager Call Function . . . . . 230@APLCALL - Application Manager Call Function . . . . . . . 232@CCFCALL - Command Manager Call Function . . . . . . . 233@CNSCALL - Console Manager Call Function . . . . . . . . . 234@DEVCALL - Device Manager Call Function . . . . . . . . . . 235@JESCALL - JES Manager Call Function . . . . . . . . . . . . . 236@MCFCALL - Message Manager Call Function. . . . . . . . . 237@RCFCALL - Started Task Manager Internal Call Function 238@SCFCALL - Schedule Manager Internal Call Function . . 239@TBLCALL - Table Manager Call Function. . . . . . . . . . . . 240@VTMCALL - VTAM Manager Internal Call Function . . . . 241

CA7 Functions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242@CA7DMD - CA7 Demand Job Function . . . . . . . . . . . . . 242@CA7FCMP - CA7 Force Complete Function . . . . . . . . . . 244

Page 8: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Contents

8 Integrated Resource Manager Functions and Other Facilities Version 500

@CA7HOLD - CA7 Hold Job Function . . . . . . . . . . . . . . . 245@CA7LOGF - CA7 Console Logoff Function. . . . . . . . . . . 246@CA7LOGN - CA7 Console Logon Function . . . . . . . . . . 247@CA7PDSN - CA7 Post Dataset Requirement Function . . . 248@CA7RLSE - CA7 Release Job Function . . . . . . . . . . . . . 249@CA7RUN - CA7 Run Job Function . . . . . . . . . . . . . . . . . 250@CA7SCMD - CA7 SVC Command Function. . . . . . . . . . 252@CA7PUSR - CA7 Post User Requirement Function . . . . . 253

IRM Utility Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254@APLCONS - Application Console Function. . . . . . . . . . . 254@APLFMAT - Application Find Match Function . . . . . . . . . 256@APLLOGN - Application Logons Function . . . . . . . . . . . 257@APLMSGS - Application Message Function . . . . . . . . . . 258@APLOPER - Application Command Function . . . . . . . . . 264@APLOPTS - Application Options Function . . . . . . . . . . . 266@APLPTRN - Application Pattern Function . . . . . . . . . . . . 267@APLSSCN - Application Subsystem Console Function . . 268@APLVDCL - Application Variable Definition Function . . . 270@APLVLET - Application Variable Assignment Function . . 272@APLVSUB - Application Variable Substitute Function . . . 273@COMGLNK - COM Manager Get Active Link Function . 274@DEVVARY - Device Manager Vary Function . . . . . . . . . . 275@JOBEDIT - Job Edit Function . . . . . . . . . . . . . . . . . . . . . 276@JOBSMIT - Job Submit Function . . . . . . . . . . . . . . . . . . 278@RCFQSCH - Started Task Manager Schedule Query Function279@RCFSCHD - Started Task Manager Schedule Function. . 280@RCFSCHQ - Started Task Manager Resource Schedule Function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282@RCFSTAT - Started Task Manager Get Status Function . . 283@RCFSUCC - Started Task Manager Successor Function . 284@TBLRGST - Table Manager Register Function. . . . . . . . . 285@TBLUTBL - Table Manager User Table Function . . . . . . . 286@TCIOPER - AF/TCI Command Function . . . . . . . . . . . . . 287@VTMDNET - VTAM Manager Display Function . . . . . . . . 289@VTMVNET - VTAM Manager Vary Function . . . . . . . . . . 290

Page 9: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Contents 9

Chapter 3. Miscellaneous Exits and Routines . . . . . . . . . . . . . . . . . . . . . . 291Batch Job Utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292

@JOB@RCF - Batch Job/Started Task Manager Interface . 292@LOGSCAN - MVS Syslog Scanning Utility . . . . . . . . . . . 294

CA Utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301@ICMSTOP - CA ICOM Stop Routine . . . . . . . . . . . . . . . 301KAUZ7SHU - CA7 Stop Routine . . . . . . . . . . . . . . . . . . . . 302KAUZ7VRA - CA7 VTAM Post-Recovery Exit . . . . . . . . . . . 304KAUZ7$DM - CA7 Demand Job Routine . . . . . . . . . . . . . . 305KAUZ7$FC - CA7 Force Complete Routine . . . . . . . . . . . . 307KAUZ7$HO - CA7 Hold Job Routine. . . . . . . . . . . . . . . . . 308KAUZ7$PD - CA7 Post Dataset Requirement Routine . . . . 309KAUZ7$PU - CA7 Post User Requirement Routine. . . . . . . 310KAUZ7$RL - CA7 Release Job Routine . . . . . . . . . . . . . . . 311KAUZ7$RU - CA7 Run Job Routine. . . . . . . . . . . . . . . . . . 312KAUZ7$SC - CA7 SVC Command Routine . . . . . . . . . . . . 314

DB2 Utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315@DB2XPW2 - DB2 Stop WTOR Exit . . . . . . . . . . . . . . . . . 315

MQ Utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316@MQSXPW1 - MQ Series Stop WTOR Exit . . . . . . . . . . . 316@MQSXRB1 - MQ Series Pre-Recovery Exit . . . . . . . . . . . 317

Network Task Utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318@NETVSTP - NetView Stop Routine . . . . . . . . . . . . . . . . . 318@NVASTOP - NetView Access Stop Routine . . . . . . . . . . . 319@TCPXPW1 - TCP/IP Stop WTOR Exit . . . . . . . . . . . . . . . 320

Omegamon and OmegaView Utilities . . . . . . . . . . . . . . . . . . . . . . . 321@OMCVRA1 - Omegamon/CICS Post-VTAM Recovery Exit321@OMDVRA1 - Omegamon/DB2 Post-VTAM Recovery Exit 322@OMILOGF - AF/Operator Omegamon/IMS Logoff Routine. . 323@OMILOGN - AF/Operator Omegamon/IMS Logon Routine . 324@OMIXRBL - Omegamon/IMS Logon Pre-Recovery Exit . 325@OMVLOGF - AF/Operator OmegaView Logoff Routine . 326@OMVLOGN - AF/Operator OmegaView Logon Routine . 327@OMVVRA1 - OmegaView Post-VTAM Recovery Exit . . . . 328@OMVXPWA - OmegaView Stop WTOR Exit . . . . . . . . . . 329@OMVXPW1 - OmegaView Stop WTOR Exit . . . . . . . . . . 330

Page 10: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Contents

10 Integrated Resource Manager Functions and Other Facilities Version 500

@OMVXRBL - OmegaView Logon Pre-Recovery Exit . . . . 331@OM2LOGF - AF/Operator Omegamon/MVS Logoff Routine 332@OM2LOGN - AF/Operator Omegamon/MVS Logon Routine 333@OM2VRA1 - Omegamon/MVS Post-VTAM Recovery Exit 334@OM2XRBL - Omegamon/MVS Logon Pre-Recovery Exit 335@OVIVRA1 - POVI Post-VTAM Recovery Exit . . . . . . . . . . 336@OVIXPW1 - POVI Stop WTOR Exit. . . . . . . . . . . . . . . . . 337

TSO Utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338AF/TCI - TSO Command Interface. . . . . . . . . . . . . . . . . . . 338@TCIXSA1 - AF/TCI Post Start Exit . . . . . . . . . . . . . . . . . . 343@TSOUMAX - Set TSO USERMAX Routine. . . . . . . . . . . 344

Appendix A. Customer Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345Electronic support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345Telephone support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346Customer support locations and numbers . . . . . . . . . . . . . 346Incident documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . 348Ensuring your satisfaction with customer support . . . . . . . . 348

Page 11: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Preface 11

Preface

About this DocumentThis guide provides reference information for IRM Functions and Other Facilities for the Integrated Resource Manager (IRM) Version 500.

This guide is directed to the systems operator(s) responsible for using the Integrated Resource Manager. It assumes that you have some previous experience in using mainframe software and knowledge of MVS systems and SMP/E.

PrerequisitesThis guide assumes that AF/OPERATOR, or OMEGACENTER Gateway for MVS, and the Integrated Resource Manager has been SMP/E installed and that maintenance has been applied to bring them up to current levels of service. For information on installing AF/OPERATOR refer to Installing Candle Products on MVS (IC51-6057).

Refer to the AF/OPERATOR and the IRM Configuration and Customization Guides for additional information on installing and configuring AF/OPERATOR and IRM respectively.

P

Page 12: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Adobe Portable Document Format

12 Integrated Resource Manager Functions and Other Facilities Version 500

Adobe Portable Document Format

IntroductionCandle supplies documentation in the Adobe Portable Documentation Format (PDF). The Adobe Acrobat Reader prints PDF documents with the fonts, formatting, and graphics as contained in the original document. To print a Candle document, perform the following:

1. Specify the print options for your system. From the Acrobat Reader Menu bar, select File > Print Setup... and make your selections. A setting of 300 dpi is highly recommended as is duplex printing if your printer supports it.

2. To start printing, select File > Print on the Acrobat Reader Menu bar.3. On the Print popup, select one of the Print Range options for:

– a single page

– a range of pages

– all of the document

(Optional)

4. To fit oversize pages to the paper size currently loaded on your printer, select the Shrink to Fit option.

Printing problems?Your printer usually determines the print quality of your output. Sometimes printing problems can occur. If you experience printing problems, potential areas to check are:

� settings for your printer and printer driver. (The 300 dpi settings for both your driver and printer should be the same. A setting of 300 dpi is recommended.)

� the printer driver you are using. (You may need a different printer driver or the Universal Printer driver from Adobe. This free printer driver is available at www.adobe.com.)

Page 13: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Preface 13

Adobe Portable Document Format

� the halftone/graphics color adjustment for printing color on black and white printers. (Check the printer properties under Start > Settings > Printer. For more information, see the online help for the Acrobat Reader.)

� the amount of available memory in your printer. (Insufficient memory can cause a document or graphics to fail to print.)

For additional information on printing problems, refer to the documentation for your printer or contact your printer manufacturer.

Page 14: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Documentation Conventions

14 Integrated Resource Manager Functions and Other Facilities Version 500

Documentation Conventions

IntroductionCandle documentation adheres to accepted typographical conventions for command syntax. Conventions specific to Candle documentation are discussed in the following sections.

Panels and figuresThe panels and figures in this document are representations. Actual product panels may differ.

Revision barsRevision bars (|) may appear in the left margin to identify new or updated material.

Variables and literalsIn examples of command syntax, uppercase letters are actual values (literals) that the user should type; lowercase letters are used for variables that represent data supplied by the user. Default values are underscored.

LOGON APPLID(cccccccc)

In the above example, you type LOGIN APPLID followed by an application identifier (represented by cccccccc) within parentheses. The number of characters indicates the maximum allowable length of the variable.

Note: In ordinary text, variable names appear in italics.

Page 15: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Preface 15

Documentation Conventions

SymbolsThe following symbols may appear in command syntax.

Table 1. Symbols

Symbol Usage

| The ‘or’ symbol is used to denote a choice. Either the argument on the left or the argument on the right may be used. For example:

YES | NO

In this example, YES or NO may be specified.

[ ] Denotes optional arguments. Those arguments not enclosed in square brackets are required. For example:

APPLDEST DEST [ALTDEST]

In this example, DEST is a required argument and ALTDEST is optional.

{ } Some documents use braces to denote required arguments, or to group arguments for clarity. For example:

COMPARE {workload} -

REPORT={SUMMARY | HISTOGRAM}

The workload variable is required. The REPORT keyword must be specified with a value of SUMMARY or HISTOGRAM.

_ Default values are underscored. For example:

COPY infile outfile -

[COMPRESS=YES | NO}]

In this example, the COMPRESS keyword is optional. If specified, the only valid values are YES or NO. If omitted, the default is YES.

b The symbol b indicates a blank space, when needed for clarity.

Page 16: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Documentation Set

16 Integrated Resource Manager Functions and Other Facilities Version 500

Documentation Set

IntroductionCandle provides a complete set of documentation for the Integrated Resource Manager. Each manual in this documentation set contains a specific type of information to help you use the product.

Candle welcomes your comments and suggestions for changes or additions to the documentation set. A user comment form, located at the back of each manual, provides simple instructions for communicating with Candle's Information Development department. You can also send electronic mail to [email protected]. Please include the product name, version, and book title in the subject line. To order additional manuals, contact Candle Customer Support.

Online DocumentationAll documents in the Integrated Resource Manager documentation set are available online.

Page 17: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Preface 17

Documentation Set

Printed documentationThe documentation listed in the following table is available for the Integrated Resource Manager. To order additional product manuals, contact your Candle Support Services representative.

Table 2. Integrated Resource Manager Documentation

DocumentNumber

Document Name Description

AU51-6292 Integrated Resource Manager Configuration and Customization Guide

Explains how to configure and customize the Integrated Resource Manager after it is installed.

AU54-6514 Integrated Resource Manager Primary Managers User’s Guide

Provides a task-oriented guide to using the Integrated Resource Manager. Explains basic features and navigation methods for the Primary Managers.

AU54-6515 Integrated Resource Manager Control Managers User’s Guide

Provides a task-oriented guide to using the Integrated Resource Manager. Explains basic features and navigation methods for the Control Managers.

AU54-6295 Integrated Resource Manager AF/OPERATOR and Subsystem Managers User’s Guide

Provides a task-oriented guide to using the Integrated Resource Manager. Explains basic features and navigation methods.

AU53-6591 Integrated Resource Manager Functions and Other Facilities

Provides comprehensive reference information about the functions and facilities of the Integrated Resource Manager.

AU52-6293 Integrated Resource Manager Messages Manual

Provides a reference summary of all Integrated Resource Manager messages.

AU99-6297 Integrated Resource Manager Command Quick Reference Guide

Quick Reference Handbook that explains the format and parameters for the Integrated Resource Manager console commands

Page 18: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Documentation Set

18 Integrated Resource Manager Functions and Other Facilities Version 500

OMC99-4833 Candle Products Program Directory

Provides installation instructions and details all other installation consideration.

Table 2. Integrated Resource Manager Documentation

DocumentNumber

Document Name Description

Page 19: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 19

REXX Function PackageAssembler Functions

IntroductionTo facilitate the Automation Applications and take full advantage of the REXX programming language, a User Written REXX Function Package has been developed for the automation environment. This function package is used to extend the capabilities of REXX provided by the built-in functions and TSO/E extended functions.

While the REXX Function Package can be used generally in the MVS community, the functions have been developed and will be implemented specifically for the AF/OPERATOR run-time environment. Each of the functions in the package is written according to the specifications outlined in the IBM manual, TSO Extensions Version 2 REXX Reference1. All of the functions are written in Assembler language and each of the individual load modules for the functions is link edited into the function package directory, KAURXFPD.

Access to the functions is automatically provided by REXX. The first time any one of the functions is called, REXX will search for and load the function package into above-the-line storage and call the function module. Anytime after this, when a function is referenced, REXX will call the in-storage copy of the function module to process the function.

Developers can access the functions in the REXX Function Package just as they would any built-in REXX function. Refer to the REXX Reference manual for more information on coding syntax and REXX functions.

1. IBM Corporation, TSO Extensions Version 2 REXX Reference, SC28-1883-1 (Poughkeepsie,NY.:IBM 1989), Chapter 12: TSO/E REXX Programming Services, Function Packages, pp. 235-246.

1

Page 20: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

20 Integrated Resource Manager Functions and Other Facilities Version 500

Chapter ContentsDataset Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21General Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41Message Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55System Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68Date and Time Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99AF/OPERATOR Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135IMS Functions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141JES3 Functions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143REXX Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158Table Functions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167

Page 21: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 21

Dataset Functions

Dataset Functions

ALLOC - Dataset Allocate FunctionAllocates a dataset. Returns 1 if the dataset is successfully allocated and 0 if not.

Syntax>>----ALLOC(ddname,dsname,disp,ndisp,cdisp,close,volser,unit,

unitcount,spaceunit,space,rlse,round,form,dcb,like,expdt,mgmt)----------<<

ddname Specifies the name associated with the dataset, optional. If the argument is not specified, a system generated name (SYS#####) will be used. A maximum of eight characters is allowed. The specified DD name must conform to MVS naming restrictions.

dsname Specifies the fully qualified dataset name, required. The dataset name can be a maximum of 44 characters. If a member name is specified, the maximum length is 54: 44 character maximum for the dataset name, 8 character maximum for the member name, and 2 characters for the open and close parenthesis.

disp The beginning status of the dataset, optional. Valid values are:� NEW� MOD� OLD� SHR

The default is SHR. The permanently allocated attribute can be added to the allocation by prefacing the status value with a 'P' or 'p'. For example, if 'PS' is specified, the resulting allocation will be permanent with a status of SHR.

Page 22: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Dataset Functions

22 Integrated Resource Manager Functions and Other Facilities Version 500

ndisp The normal disposition of the dataset when the dataset is closed or when the job terminates, optional. Valid values are: � KEEP� DELETE� CATLG� UNCATLG

cdisp The conditional (abnormal) disposition of the dataset should the job terminate abnormally, optional. Valid values are:� KEEP� DELETE� CATLG� UNCATLG

close Requests automatic un-allocation when the dataset is closed, optional. Valid value is: � FREE

Page 23: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 23

Dataset Functions

volser Specifies the volume serial number of a direct access device on which a new dataset is to reside or on which an old dataset is located, optional. A maximum of six characters is allowed.

A volume reference dataset can be specified for this argument instead of a volume serial number. To specify a volume reference dataset, code the argument as follows:

DSN=reference_dataset_name

A maximum of 44 characters is allowed for the volume reference dataset name.

An SMS storage class can be specified for this argument instead of a volume serial number. To specify an SMS storage class, code the argument as follows:

STOR=storclas

where storclas is the name of the SMS storage class. A maximum of eight characters is allowed for the SMS storage class.

unit Specifies the unit type on which a file or dataset is to be allocated, optional. This argument can be used to specify a defined group name (esoteric), a device type, or a device address. A maximum of eight characters is allowed.

unitcount Specifies the maximum number of devices to be allocated, optional. This argument must be numeric and in the range 1 to 59.

Parallel mounting can be requested by coding the PARALLEL keyword for this argument instead of a unit count.

Page 24: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Dataset Functions

24 Integrated Resource Manager Functions and Other Facilities Version 500

spaceunit Specifies the type of space units for the allocation, optional. Valid values are:� BLK� TRK� CYL� U� K� M

With SMS, U, K, and M are multipliers for the allocation quantity specified with the SPACE argument.

space Specifies the amount of space to be allocated for a new dataset, optional. The argument consists of four numeric tokens '10 5 50 200', which represent: � the primary allocation quantity, � the secondary allocation quantity, � the directory block quantity, and � the average block length.

rlse Specifies that unused space is to be released when the dataset is closed, optional. Valid value is: � RLSE

round Specifies that the amount of allocated space be rounded up to the nearest full cylinder, optional. Valid value is: � ROUND

form Specifies the format of the allocated space, optional. Valid values are: � CONTIG� MXIG� ALX

dcb Specifies the dcb characteristics for a new dataset, optional. The argument consists of four tokens, 'PO FB 8880 80', which represent the DSORG, RECFM, BLKSIZE and LRECL of the dataset.

Page 25: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 25

Dataset Functions

like Specifies that the DCB characteristics for the dataset are to be retrieved from an existing model dataset, optional. The format of the argument is:

LIKE=model_dataset_name

A maximum of 44 characters is allowed for the model dataset name.

SMS data class can be specified for this argument instead of a model dataset. To specify data class, code the argument as follows:

DATA=dataclas

where:

dataclas is the name of the SMS data class. A maximum of eight characters is allowed for the SMS data class.

A reference dataset can be specified for this argument instead of a model dataset. To specify a reference dataset, code the argument as follows:

DSN=reference_dataset_name

A maximum of 44 characters is allowed for the reference dataset name.

A reference DD name can be specified for this argument instead of a model dataset. To specify a reference DD name, code the argument as follows:

DD=reference_ddname

A maximum of eight characters is allowed for the reference DD name. The DD name must refer to a DD name defined by JCL; a JCL DD statement.

expdt Specifies the expiration date for the dataset, optional. The expiration date must be specified in the form yyddd, yyyyddd, or a retention period between 1 and 9999 days.

mgmt Specifies the SMS management class for the dataset, optional. A maximum of eight characters is allowed for the SMS management class.

Page 26: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Dataset Functions

26 Integrated Resource Manager Functions and Other Facilities Version 500

Notes

Only the capitalized letter is needed to specify the following argument keyword values; all other characters are ignored:

If the dataset is successfully allocated by this function, the special variables SVC99DD, SVC99DSN, and SVC99VOL, will be set to the DD name, dataset name, and volume serial number associated with the dataset.

A temporary dataset can be created by specifying the dsname argument using the form '&dsname'; the ampersand signifies that the dataset is temporary. The value following the ampersand, dsname, must be a one to eight character literal which follows standard dataset naming restrictions (begins with an alphabetic or national

Abbrev... Represents... Used for...

N NEW Dataset status

M MOD Dataset status

O OLD Dataset status

S SHR Dataset status

K KEEP Dataset disposition

C CATLG Dataset disposition

U UNCATLG Dataset disposition

F FREE Dataset allocation

P PARALLEL Parallel mount option

B BLK Dataset space unit

T TRK Dataset space unit

C CYL Dataset space unit

R RLSE Release unused space

R ROUND Allocation space rounding

C CONTIG Allocation space format

M MXIG Allocation space format

A ALX Allocation space format

Page 27: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 27

Dataset Functions

and the remaining characters are alphabetic, numeric, or national). The system assigns a name to the dataset using the following format:

SYS#####.T######.RA###.USERID.DSNAME.H##

For example, if '&TEMP' is specified for the dsname argument, the system will generate a dataset name similar to the following:

SYS99292.T104008.RA000.USERID.TEMP.H01

The variables used in the examples listed below have the following values:

Name... Value...

vol DASD01

uni 3390

spc 10 5 50 200

dcb PO FB 8880 80

like LIKE=DATA.SET.MODEL

lids DSN=DATA.SET.REF

lidd DD=JCLDDNM

stor STOR=JCL

data DATA=CNTL

mgmt SYSDEV2

Examplesalloc(,'DATA.SET') -> 1

alloc('DDNM','&DSNAME') -> 1

alloc('DDNM','DATA.SET') -> 1

alloc('DDNM','DATA.SET(MBR)') -> 1

alloc('DDNM','DATA.SET','S') -> 1

alloc('DDNM','DATA.SET','PS') -> 1

alloc('DDNM','DATA.SET','O') -> 1

alloc('DDNM','DATA.SET','O','D') -> 1

alloc('DDNM','DATA.SET','O','D','D') -> 1

alloc('DDNM','DATA.SET','S',,,'FREE') -> 1

alloc('DDNM','DATA.SET','S',,,,'DASD01',3390) -> 1

alloc('DDNM','DATA.SET','S',,,,'DSN=DATA.SET.REF') -> 1

alloc('DDNM','DATA.SET','N','C',,,vol,uni,,'C','10') -> 1

alloc('DDNM','DATA.SET','N','C',,,vol,uni,,'C','10 5') -> 1

alloc('DDNM','DATA.SET','N','C',,,vol,uni,,'C','10 5 50') -> 1

Page 28: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Dataset Functions

28 Integrated Resource Manager Functions and Other Facilities Version 500

alloc('DDNM','DATA.SET','N','C',,,vol,uni,,'C',spc,'R') -> 1

alloc('DDNM','DATA.SET','N','C',,,vol,uni,,'C',spc,,'R') -> 1

alloc('DDNM','DATA.SET','N','C',,,vol,uni,,'C',spc,,,,dcb) -> 1

alloc('DDNM','DATA.SET','N','C',,,vol,uni,,'C',spc,,,,,like)-> 1

alloc('DDNM','DATA.SET','N','C',,,vol,uni,,'C',spc,,,,,lids)-> 1

alloc('DDNM','DATA.SET','N','C',,,vol,uni,,'C',spc,,,,,lidd)-> 1

alloc('DDNM','DATA.SET','N','C',,,vol,uni,,'C',spc,,,,,,90) -> 1

alloc('DDNM','DATA.SET','N','C',,,stor,,,,,,,,,data,,mgmt) -> 1

alloc('DDNM','BADDATASETNAME') -> 0

Page 29: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 29

Dataset Functions

ALLOCDD - Allocated Dataset DD FunctionDetermines if a dataset is allocated and returns the DD name(s) associated with the dataset. If the specified dataset is not found, or does not match the filtering criteria, a null value will be returned.

Syntax

>>----ALLOCDD(dsname,filter)----------<<

dsname Specifies the fully qualified dataset name, required. The dataset name can be a maximum of 44 characters. If a member name is specified, the maximum length is 54: 44 character maximum for the dataset name, 8 character maximum for the member name, and 2 characters for the open and close parentheses.

filter Search filtering option, optional. If a filtering option is specified only entries that match the filter will be included in the result. Valid values are:� PERM Permanent allocations� ‘IN-USE All in-use allocations� ‘NOT-IN’ Not-in-use allocations� BOTH Both permanent and in-use� ALL All allocations (P, I, N)

If not specified, filter will default to BOTH. Only the first character of the argument is significant; all other characters are ignored.

Page 30: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Dataset Functions

30 Integrated Resource Manager Functions and Other Facilities Version 500

Examplesallocdd('DATA.SET.JCL') -> JCLDD

allocdd('DATA.SET.DYN') -> SYS00001

allocdd('DATA.SET.PDS') -> MBRDD1 MBRDD2 MBRDD3

allocdd('DATA.SET.PDS(MBR)') -> MBRDD1

allocdd('DATA.SET','P') -> JCLDD1 JCLDD2

allocdd('DATA.SET','I') -> DYNAMIC1

allocdd('DATA.SET','N') -> DYNAMIC2

allocdd('DATA.SET','B') -> JCLDD1 JCLDD2 DYNAMIC1

allocdd('DATA.SET','A') -> JCLDD1 JCLDD2 DYNAMIC1 DYNAMIC2

allocdd('DATA.SET') -> '' (null value - dsname not found)

allocdd('DATA.SET(MBR)') -> '' (null value - member not found)

Page 31: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 31

Dataset Functions

ALLOCDSN - Allocated Dataset Name FunctionDetermines if a DD name is allocated and returns the dataset name(s) associated with the DD name. If the specified DD name is not found, or does not match the filtering criteria, a null value will be returned.

Syntax

>>----ALLOCDSN(ddname,filter)----------<<

Examplesallocdsn('DDNM') -> DATA.SET

allocdsn('ddnm') -> DATA.SET

allocdsn('DDNM') -> DATA.SET(MBR)

allocdsn('DDNM') -> DATA.SET.ONE DATA.SET.TWO

allocdsn('DDNM','P') -> DATA.SET.JCL

allocdsn('DDNM','I') -> DATA.SET.DY1

allocdsn('DDNM','N') -> DATA.SET.DY2

allocdsn('DDNM','B') -> DATA.SET.JCL DATA.SET.DY1

allocdsn('DDNM','A') -> DATA.SET.JCL DATA.SET.DY1 DATA.SET.DY2

allocdsn('JUNK') -> '' (null value - ddname not found)

ddname Specifies the name associated with the dataset, required. A maximum of eight characters is allowed. A blank ddname is not allowed.

filter Search filtering option, optional. If a filtering option is specified, only entries that match the filter will be included in the result. Valid values are:� PERM Permanent allocations� ‘IN-USE All in-use allocations� ‘NOT-IN’ Not-in-use allocations� BOTH Both permanent and in-use� ALL All allocations (P, I, N)

If not specified, filter will default to BOTH. Only the first character of the argument is significant; all other characters are ignored.

Page 32: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Dataset Functions

32 Integrated Resource Manager Functions and Other Facilities Version 500

ALLOCED - Dataset Allocated FunctionDetermines if a dataset is allocated by a given file name (DD name). Returns 1 if the dataset is allocated by the file name and 0 if not.

Syntax

>>----ALLOCED(ddname,dsname,filter)----------<<

ddname Specifies the name associated with the dataset, required. A maximum of eight characters is allowed. A blank ddname is not allowed.

dsname Specifies the fully qualified dataset name, optional. The dataset name can be a maximum of 44 characters. If a member name is specified the maximum length is 54: 44 character maximum for the dataset name, 8 character maximum for the member name, and 2 characters for the open and close parentheses.

filter Search filtering option, optional. If a filtering option is specified, only entries that match the filter will be included in the result. Valid values are:� PERM Permanent allocations� ‘IN-USE All in-use allocations� ‘NOT-IN’ Not-in-use allocations� BOTH Both permanent and in-use� ALL All allocations (P, I, N)

If not specified, filter will default to BOTH. Only the first character of the argument is significant; all other characters are ignored.

Page 33: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 33

Dataset Functions

Examplesalloced('DDNM') -> 1

alloced('DDNM','DATA.SET') -> 1

alloced('DDNM','DATA.SET(MBR)' -> 1

alloced('DDNM','DATA.SET','P') -> 1

alloced('DDNM','DATA.SET','I') -> 1

alloced('DDNM','DATA.SET','N') -> 1

alloced('DDNM','DATA.SET','B') -> 1

alloced('DDNM','DATA.SET','A') -> 1

alloced('JUNK','DATA.SET') -> 0

alloced('DDNM','JUNK.SET') -> 0

Page 34: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Dataset Functions

34 Integrated Resource Manager Functions and Other Facilities Version 500

CONCAT - Dataset Concatenate FunctionConcatenates two previously allocated datasets. Returns 1 if the two datasets were successfully concatenated and 0 if not.

Syntax

>>----CONCAT(ddname,ccname,ccperm)----------<<

Notes

Multiple datasets can be concatenated by calling this function to concatenate a new dataset to an already concatenated dataset group.

The following code example concatenates the DD2 dataset to DD1 and then concatenates the DD3 dataset to the DD1 dataset group, resulting in a dataset concatenation of DD1-DD2-DD3:

call concat ‘DD1’,’DD2’call concat ‘DD1’,’DD3’

Examplesconcat('DD1','DD2') -> 1 (DD2 concatenated to DD1)

concat('DD1','DD3') -> 1 (DD3 concatenated to DD1 and DD2)

concat('DD1','DD2','P') -> 1 (DD2 permanently concatenated to DD1)

ddname Specifies the name associated with the primary dataset, required. This ddname will be the DD name associated with the concatenated dataset group. A maximum of eight characters is allowed.

ccname Specifies the name associated with the secondary datasset, required. A maximum of eight characters is allowed.

ccperm Specifies the permanently concatenated attribute, optional. Specify the PERM keyword to permanently concatenate the two specified datasets. P is an acceptable abreviation for PERM.

Note: If the datasets are permanently concatenated, they cannot be dynamically deconcatenated.

Page 35: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 35

Dataset Functions

DECONCAT - Dataset Deoncatenate FunctionDeconcatenates a dynamically concatenated dataset group. Returns 1 if the datasets are successfully deconcatenated and 0 if not.

Syntax

>>----DECONCAT(ddname)----------<<

Examplesdeconcat('DD1') ->1 (DD1 datasets deconcatenated)

deconcat('DD1') -> 0 (if DD1 has no concatenated datasets)

deconcat('DD1') -> 0 (if datasets permanently concatenated)

ddname Specifies the name associated with the dataset group, required. A maximum of eight characters is allowed.

Note: If the datasets are permanently concatenated, they cannot be dynamically deconcatenated.

Page 36: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Dataset Functions

36 Integrated Resource Manager Functions and Other Facilities Version 500

FREE - Dataset Unallocate FunctionUnallocates a dataset. Returns 1 if the dataset is successfully unallocated and 0 if not.

Syntax

>>----FREE(ddname,dsname,unallc,odisp)----------<<

ddname Specifies the name of the dataset, optional. If this argu-ment is not specified, a valid dsname argument must be specified. A maximum of eight characters is allowed.

dsname Specifies the fully qualified name of the dataset, optional. A dataset name can be a maximum of 54 characters with a member name and 44 without. If this argument is not spec-ified, ddname must be specified.

Note: If a dsname is specified without a ddname, all current allocations for the dataset will be freed simultaneously; all DDs using the dataset will be freed.

unallc Specifies the unallc option, optional. Specify UNALLOC to release the dataset or REMOVE to turn off the dataset’s in-use attribute. UNALLOC will deallocate the dataset, allowing it to be re-used by other jobs. The UNALLOC option will release the dataset even if it has the perma-nently allocated attribute.

The REMOVE option turns off the in-use attribute for the dataset, leaving the dataset allocated, but eligible for an automatic deallocation request (unless the dataset is per-manently allocated).

The system defaults are used if unallc is not specified: the in-use attribute is removed for a permanently allocated dataset, the dataset is released for a non-permanently allo-cated dataset.

Page 37: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 37

Dataset Functions

Notes

Only the abbreviation is needed to specify the argument keyword values; all other characters are ignored:

unalloccont.

The following summarizes the effect of the options on the two different types of dataset allocations:

Option: Type: Result:

Default Perm Dataset remains

Default Non-Perm Dataset released

UNALLOC Perm Dataset released

UNALLOC Non-Perm Dataset released

REMOVE Perm Dataset remains

REMOVE Non-Perm Dataset remains, but eligible for automaticrelease

odisp The override to the normal disposition (ndisp) of the dataset, optional. This argument is used to change the dis-position assigned when the dataset was originally allo-cated. Valid values are:� KEEP� DELETE� CATLG� UNCATLG

Abbrev... Represents... Used for...

K Keep Dataset disposition

D Delete Dataset disposition

C Catlg Dataset disposition

U Uncatlg Dataset disposition

R Remove Dataset unallocation

U Unalloc Dataset unallocation

Page 38: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Dataset Functions

38 Integrated Resource Manager Functions and Other Facilities Version 500

Examplesfree('DDNM') -> 1

free(,'DATA.SET') -> 1

free('DDNM','DATA.SET') -> 1

free('DDNM','DATA.SET(MBR)') -> 1

free('DDNM','DATA.SET','U') -> 1

free('DDNM','DATA.SET','R') -> 1

free('DDNM','DATA.SET',,'K') -> 1

free('DDNM','DATA.SET',,'D') -> 1

free('DDNM','DATA.SET',,'C') -> 1

free('DDNM','DATA.SET',,'U') -> 1

free('JUNK') -> 0 (ddname not allocated)

free(,'JUNK.SET') -> 0 (dsname not allocated)

free('JUNK','JUNK.SET') -> 0 (dd/dsn not allocated)

free('DDNM','PERM.SET') -> 1 (in-use attribute off)

free('DDNM','PERM.SET','R') -> 1 (allocation was freed)

Page 39: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 39

Dataset Functions

MEMBER - PDS Member FunctionDetermines if a member exists in a partitioned dataset. Returns 1 if the member exists and 0 if not.

The directory of the partitioned dataset must be allocated prior to the invocation of this function by the DD name specified in the arguments. The directory may be allocated simply by allocating the dataset without specifying a member name.

Syntax

>>----MEMBER(ddname,member)----------<<

Examplesmember('DDNM','MEMBER') -> 1

member('ddnm','member') -> 1

member('JUNK','MEMBER') -> 0 (ddname not found)

member('DDNM','JUNKER') -> 0 (member not found)

ddname Specifies the ddname of the partitioned dataset directory, required. A maximum of eight characters is allowed.

member Name of the member to locate, required. A maximum of eight characters is allowed.

Page 40: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Dataset Functions

40 Integrated Resource Manager Functions and Other Facilities Version 500

MEMBERS - PDS Members FunctionReads the specified PDS directory and returns a list of member names in the PDS. Returns a null value if no members are found in the PDS.

The directory of the partitioned dataset must be allocated prior to the invocation of this function by the DD name specified in the arguments. The directory may be allocated simply by allocating the dataset without specifying a member name.

Syntax

>>----MEMBERS(ddname)----------<<

Examples members('DDNM') -> @APLDESC @APLMSGS @APLTBLS ...

members('ddnm') -> @APLDESC @APLMSGS @APLTBLS ...

members('JUNK') -> '' (null value - ddname not found)

members('EMPTY') -> '' (null value - no members found)

ddname Specifies the ddname of the partitioned dataset directory, required. A maximum of eight characters is allowed.

Page 41: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 41

General Functions

General Functions

ABEND - Abnormal Termination FunctionGenerates the specified user or system abend.

Syntax

>>----ABEND(code,resn,step,type)----------<<

code Abnormal termination completion code, optional. Valid values are:� 0 to 4095

The default is: 222; a user 0222 abend. A hexadecimal code can be specified by pre-facing the code with:

X||code (or: 'X'||'0C4'x)

Note: A System completion code, unlike a User completion code, is generally referenced in hexadecimal. Therefore, to generate a U0222 abend, specify 222 for the completion code. To generate a S222 abend specify 546, or '222'x, for the completion code.

Under AF/OPERATOR, generating a U0222 abend is equivalent to canceling the current match.

resn A numeric reason code, optional. Valid values are 0 to 2147483647. A reason code of 0 is the default.

step Use the literal ‘STEP’ to specify that the entire job step of the active task is to be terminated, optional. Only the first character of the argument is significant; all other characters are ignored. The default is task level termination.

Page 42: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

General Functions

42 Integrated Resource Manager Functions and Other Facilities Version 500

Examplesabend() -> (task abends with U0222, reason code 0)

abend('222') -> (task abends with U0222, reason code 0)

abend('222','2') -> (task abends with U0222, reason code 2)

abend('222',,'S') -> (step abends with U0222, reason code 0)

abend('222',,,'U') -> (task abends with U0222, reason code 0)

abend('546',,,'S') -> (task abends with S222, reason code 0)

abend('X'||'222'x,,,'S') -> (task abends with S222, reason code 0)

abend('X'||'0C4'x,,,'S') -> (task abends with S0C4, reason code 0)

type Completion code type, optional. Valid values are:� USER� SYSTEM

The default is USER. Only the first character of the argument is significant; all other characters are ignored.

Page 43: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 43

General Functions

BIT2DAYS - Bit-to-Days FunctionConverts a seven-character bit string into day values. Returns the corresponding three-character day value, for each one found in the bit string, as a string of words.

Syntax

>>----BIT2DAYS(bitstrng)----------<<

Examplesbit2days('1000000') -> SUN

bit2days('0100000') -> MON

bit2days('0010000') -> TUE

bit2days('0001000') -> WED

bit2days('0000100') -> THU

bit2days('0000010') -> FRI

bit2days('0000001') -> SAT

bit2days('1001001') -> SUN WED SAT

bit2days('1111111') -> SUN MON TUE WED THU FRI SAT

bit2days('0000000') -> '' (null value)

bitstrng Seven-character bit string, a string consisting of ones and zeroes, which represents the seven days of the week, Sunday through Saturday, required.

Page 44: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

General Functions

44 Integrated Resource Manager Functions and Other Facilities Version 500

BIT2LIST - Bit-to-List FunctionConverts a character string into a string of numbers representing the position offsets of the one-bits in the character string.

Syntax

>>----BIT2LIST(bitarg)----------<<

Notes

The BIT2LIST() function can be used to convert the AF/OPERATOR global variable AOROUT into a string of numeric route codes by using the following code example:

route_glbvar = glbvget('AOROUT')

route_string = c2x(aorout)

route_codes = bit2list(route_string)

Examplesbit2list('00'x) -> '' (null value)

bit2list('80'x) -> 1

bit2list('C0'x) -> 1,2

bit2list('E0'x) -> 1,2,3

bit2list('F0'x) -> 1,2,3,4

bit2list('F8'x) -> 1,2,3,4,5

bit2list('FC'x) -> 1,2,3,4,5,6

bit2list('FE'x) -> 1,2,3,4,5,6,7

bit2list('FF'x) -> 1,2,3,4,5,6,7,8

bit2list('FFFF'x) -> 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16

bitarg Specifies the input character string, required. A maximum of 16 characters is allowed.

Page 45: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 45

General Functions

CPCMD - CP Command FunctionIssues the specified VM CP command through the Diagnose instruction, Code X'08'. Returns 1 if the command was successful and 0 if either the Diagnose instruction or the CP command failed. Can optionally return the response from the CP command in the special variable CPMSG.

Syntax

>>----CPCMD(cpcmd,option)----------<<

Notes

This function must be invoked in an authorized REXX environment . Calling this function while running unauthorized results in a syntax error..

Examplescpcmd('MSG USERID1 something') -> 1 (command successful)

cpcmd('Q V 410 ASDF','R') -> 1 (response in CPMSG)

cpcmd('BAD COMMAND') -> 0 (command unsuccessful)

cpcmd Valid CP command, required. A maximum of 240 characters is allowed.

option Command response option, Response, optional. If Response is specified, any response from the specified CP command is returned in the special variable CPMSG. A maximum of 2048 characters will be returned. If the response is longer than 2048 characters, it will be truncated.

Note: All command response information is returned, including CP error message text generated by a command failure.

Page 46: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

General Functions

46 Integrated Resource Manager Functions and Other Facilities Version 500

CPUTIME - CPU Time Used FunctionObtains accumulated CPU time for the current TCB and returns that value in used CPU seconds format.

Syntax

>>----CPUTIME()----------<<

There are no arguments for this function.

Notes

The CPUTIME() function can be used to determine the CPU time consumed by a range of REXX code as in the following example:

before = cputime()

code......

code......

code......

code......

after = cputime()

used = after - before

Examplescputime() -> 1468.298

cputime() -> 1724.364

Page 47: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 47

General Functions

DECRYPT - Decrypt FunctionReturns the decrypted value of the specified alphanumeric string.

Syntax

>>----DECRYPT(string)----------<<

Notes

This function must be invoked in an authorized REXX environment. Calling this function while running unauthorized results in a syntax error.

Examplesdecrypt(????????) -> PASSWORD

string Alphanumeric string to be decrypted, required. A maximum of eight characters is allowed.

Page 48: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

General Functions

48 Integrated Resource Manager Functions and Other Facilities Version 500

ENCRYPT - Encrypt FunctionReturns the encrypted value of the specified alphanumeric string.

Syntax

>>----ENCRYPT(string)----------<<

Examplesencrypt(string) -> encrypted_string

encrypt(password) -> encrypted_password

string Alphanumeric string to be encrypted, required. A maximum of eight characters is allowed.

Page 49: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 49

General Functions

PATTERN - Pattern Matching FunctionCompares a text string to a pattern string and returns 1 if the specified text string matches the specified pattern and 0 if not.

Syntax

>>----PATTERN(text,ptrn)----------<<

Notes

Pattern matching involves a character-by-character comparison of a text string with a pattern string. The text string may be of any size and contain any EBCDIC value (00-FF). The pattern string may also contain any EBCDIC value, as well as pattern characters. Pattern characters each have a special use in the pattern matching process. The following is a list of the valid pattern characters and a short description of their use:

? A question mark matches any single EBCDIC character. In effect, a question mark in a pattern will skip over one character in the text string.

# A pound sign matches one numeric character in the text string.

* An asterisk is used to match any string of characters in the text string whose length is unknown.

b A single blank will match one or more contiguous blanks in the text string.

bb Multiple blanks will match the same number of blanks in the text string.

^ A not sign is an escape character used to indicate that the next character is a literal character value, i.e. treat the next character as a standard character and not as a pattern character. The ‘^’ is used in a pattern to specify the literals for the pattern characters: ?, #, *, and ^.

. A period is used to end a pattern started with a ?, #, or *. At all other times, a period is just a simple character value.

text Text string, required. The text string may contain any EBCDIC character and be of any length.

ptrn Pattern string, required. The pattern string may contain pattern characters, as well as EBCDIC characters, and also may be of any length.

Page 50: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

General Functions

50 Integrated Resource Manager Functions and Other Facilities Version 500

A ?, #, or * pattern must be ended with a comma, a blank, or a period character unless the last character in the pattern is also the last character in the pattern string. If the pattern is ended with a period, the period is treated as a special pattern character and not used in the text pattern comparison process.

The ? and # pattern characters may be concatenated without intervening pattern end characters for use in creating pattern variables. The * pattern character may not be intermixed with concatenated ? or # characters.

Pattern variables can be created by concatenating a valid REXX variable name to a ?, #, or * pattern before the pattern end character. For example, if the text and pattern match, the following patterns will create variables:

#NAME. Creates a variable called NAME whose value is a single number.

?NAME. Creates a variable called NAME whose value is a single character.

##NAME. Creates a variable called NAME whose value is a two character number.

??NAME. Creates a variable called NAME whose value is two characters in length.

##??NM. Creates a variable called NM whose value is a two character number plus the following two characters.

*NAME Creates a variable called NAME which has a value of variable length. The exact value of NAME is determined by matching the pattern and text. NAME will equal the string matched by the asterisk.

A null value for the pattern string always results in a 'no match' condition even if the text string is also a null value. A null text string will only match a pattern of a single asterisk.

A pattern may end with a trailing (extra) asterisk and still match the text string.

Page 51: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 51

General Functions

Pattern Examples

Text MatchingValue Value Description

ABCDEFGH ABCD?.FGH The ? will match the E or anyother character.

ABCDEFGH ABCD???? The ???? matches EFGH. ABCD????.would also be valid.

ABCD1FGH ABCD#.FGH The # will match the 1 or anyother number.

ABCD1FGH ABCD#???. The #??? matches 1FGH. ? and # can be mixed.

ABCDEFGH A*.H The * matches BCDEFG.

ABCDEFGH A* The * matches everything afterthe A.

A H A H The single blank matches allblanks between A and H.

ABC FGH ABC FGH Multiple blanks will be matchedexactly.

ABC#?*GH ABC^#^?^*GH Use of not sign for the literalcharacters #?*

ABCDBFGH A*VARIABL.H The * matches BCDEFG. A variablecalled VARIABL is created, whichhas a value of "BCDEFG".

ABCD1FGH ABCD#VVV.??.H The # will match the 1; ?? matchesFG. The VVV variable has a valueof "1".

AAA11BBB *X.##.*Z ## matches 11; X = "AAA"and Z = "BBB".

AAA11BBB *X.##Y.*Z ## matches 11; X = "AAA", Y = "11", and Z = "BBB".

ABC ABC* Trailing asterisk is ok.

'' * Null text matches an asterisk(*).

Page 52: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

General Functions

52 Integrated Resource Manager Functions and Other Facilities Version 500

Examplespattern('ABCDEFGH','ABCDEFGH') -> 1

pattern('ABCDEFGH','abcdefgh') -> 0 (matching is case sensitive)

pattern('ABCDEFGH','ABCD?.FGH') -> 1

pattern('ABCDEFGH','ABCD????') -> 1

pattern('ABCDEFGH','ABCD????.') -> 1

pattern('ABCD1FGH','ABCD#.FGH') -> 1

pattern('ABCD1FGH','ABCD#???.') -> 1

pattern('ABCDEFGH','A*.H') -> 1

pattern('ABCDEFGH','A*') -> 1

pattern('A H','A H') -> 1

pattern('ABC FGH','ABC FGH') -> 1

pattern('ABC#?FGH','ABC^#^?FGH') -> 1

pattern('ABCDEFGH','A*VAR1.H') -> 1

pattern('ABC1EFG','ABC#VAR2.??.G) -> 1

pattern('ABC','ABC*') -> 1

pattern('','*') -> 1

Page 53: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 53

General Functions

SORTWORD - Sort Word FunctionSorts the specified string of blank delimited words in ascending or descending EBCDIC order. Returns the string of words, in the specified sort order, with each word in the string separated by a single blank.

Syntax

>>----SORTWORD(string,order)----------<<

Examplessortword('DOG CAT BIRD FOX APE') -> APE BIRD CAT DOG FOX

sortword('dog cat fox ape','a') -> ape cat dog fox

sortword('DOG CAT FOX APE','D') -> FOX DOG CAT APE

sortword('E c D F a b C B A') -> a b c A B C D E F

string A list of blank delimited words to be sorted, required. Any number of words may be specified and the words may be of any length. A null string is also allowed.

order Sort direction, optional. Valid values for order are:� ASCENDING Sort in ascending order� DESCENDING Sort in descending order

If order is not specified, it defaults to ASCENDING. Only the first character of the argument is significant; all others following are ignored.

Page 54: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

General Functions

54 Integrated Resource Manager Functions and Other Facilities Version 500

WAITSECS - Wait Seconds FunctionWaits for the specified number of seconds, then returns control to the calling program. Returns 1 if the wait was successfully completed and 0 if not.

Syntax

>>----WAITSECS(seconds)----------<<

Notes

If this function is called in the AF/OPERATOR environment, a virtual wait will be used instead of a hard wait.

When a REXX exec is created specifically for the AF/OPERATOR environment, it is recommended that the built-in AF/OPERATOR WAIT command be used rather than this function. The WAIT() function was designed for use mainly in batch or TSO environments like AFTCI.

Exampleswaitsecs('60') -> 1

waitsecs('86400') -> 0

seconds Number of seconds to wait, required. Must be numeric and in the range 1 to 86400 (24 hours).

Page 55: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 55

Message Functions

Message Functions

DOM - Delete-Operator-Message FunctionDeletes a message from the operator console. Returns 1 if DOM was successful and 0 if not.

Syntax

>>----DOM(msgid)----------<<

Examplesdom(7985053) -> 1

dom(5469830) -> 0

msgid ID of the message to DOM, required. The msgid must be in the form returned by the WTO() function.

Page 56: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Message Functions

56 Integrated Resource Manager Functions and Other Facilities Version 500

MLWTO - Write-to-Operator FunctionIssues a multiline message to the operator console. Returns the message identification number of the MLWTO.

Syntax

>>----MLWTO(stem,rout,desc,consid,consnm,jobnm,jobid,areaid,header)----------<<

stem Stem name for the message text variables, required. A maximum of 32 characters is allowed for the stem name. If the stem references an array, include the period, 'stem.', when specifying the name.

Before calling the function, a set of variables must be created in the REXX environment which contains the message text for the MLWTO. Each variable in the set must contain one line of text for the MLWTO. The variables must be named using the stem name as a prefix and a sequential number as a suffix: stem.1, stem.2, etc. or stem1, stem2, etc.

An index variable, stem.0 or stem0, must also be created which contains the total number of text variables.

A maximum of 71 characters is allowed for a line of message text. A maximum of 10 message lines can be issued by an unauthorized caller. The maximum for authorized callers is 9999. At least two lines must be specified.

Note: Text for an unauthorized caller can be a maximum of 70 characters. Any extra text is truncated.

Page 57: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 57

Message Functions

rout Route codes for the message, optional. Route codes must be numeric and in the range 1 to 128. Multiple route codes can be specified by separating each of the codes with a blank: '1 2 3 4' or a comma: '1,2,3'. If a route code is not specified, a default route code of 2 will be used. If a 0 is specified, the message will be issued without a route code and will then be assigned the system default route code if one has been defined.

Note: Unauthorized callers are allowed to use route codes 1-28. If a code that is not in this range is specified by an unauthorized caller, an argument error condition will be raised.

desc Specifies the descriptor code for the message, optional. The descriptor code must be numeric and in the range 0 to 13. If a 0 is specified, or if the argument is omitted, the message will be issued without a descriptor code (i.e., a non-highlighted, non-held message).

consid Specifies the ID of the console that is to receive the message, optional. Must be numeric and in the range 0 to 2147483647 (2G-1). If console ID 0 is specified, the message is issued to the MVS INTERNAL console.

The MLG keyword can be used to send the message to the hardcopy log. Specifying the MLG keyword will cause the message to be routed to the system hardcopy log only the message will not be displayed on the operator console.

An extended console ID may be specified instead of the standard numeric console ID. To specify an extended MCS console ID, specify a four byte binary or eight byte hexadecimal ID using the format: ‘X(bbbb)’ or ‘X(xxxxxxxx)’.

consnm Specifies the name of the console that is to receive the message, optional. A maximum of eight characters is allowed.

Page 58: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Message Functions

58 Integrated Resource Manager Functions and Other Facilities Version 500

Notes

The message ID returned by this function can be used as input to the DOM() function to delete the message from the operator console.

If both the consid and the consnm arguments are specified, the consid argument takes precedence.

jobnm Specifies the job name associated with the MLWTO, optional. Job names can be a maximum of eight characters. The default is the job name of the issuer.

jobid Specifies the JES JOBID associated with the MLWTO, optional. JES job IDs can be a maximum of eight characters. The default is the job ID of the issuer.

areaid Specifies a display area of the console screen on which the multi-line message is to be written. Valid area IDs are:� A through J

The ID refers to an out-of-line area defined on a console by a 'CONSOLE A,n' command. If an area ID is omitted, the message is displayed in the general message area of the console.

header Specifies the header format of the message, optional. One control line and up to two label lines can be defined for the header format. The valid values for the header format are:� C 1 Control line� CL 1 Control line and 1 Label line� CLL 1 Control line and 2 Label lines� L 0 Control line and 1 Label line� LL 0 Control line and 2 Label lines

If defined, text for control and label lines must be in the first 'n' message text variables. For example, if CLL is specified, the first text variable will be used for the control line, the second for the first label line, and the third text variable for the second label line.

Note: Text for the control line can be a maximum of 35 characters (34 for unauthorized callers). Extra text will be truncated.

Page 59: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 59

Message Functions

There are four reserved console names that must not be used: INSTREAM, HC, INTERNAL and UNKNOWN. If any of these names are specified for consnm, a syntax error will be generated.

The jobnm, jobid, and areaid arguments can only be used by authorized callers. Specifying any one of these arguments in an unauthorized environment will result in a syntax error.

If an area ID is specified, descriptor codes eight and nine will be added to the message automatically.

If both the jobnm and jobid arguments are specified and valid, the message will be written to the job log of the job specified by the jobnm and jobid arguments, as well as to the system log.

Examplesmlwto('ABC.') -> 1000

mlwto('ABC.','2 9') -> 1000 (route codes 2 & 9)

mlwto('ABC.',,'2') -> 1000 (descriptor code 2)

mlwto('ABC.',,,'4') -> 1000 (issued to console #4)

mlwto('ABC.',,,,'CONSOLE1') -> 1000 (issued to named cons)

mlwto('ABC.',,,,,'MYJOB') -> 1000 (issued with a job name)

mlwto('ABC.',,,,,,'JOB11111') -> 1000 (issued with a job id #)

mlwto('ABC.',,,,,,,'A') -> 1000 (displayed in area ID A )

mlwto('ABC.',,,,,,,,'CL') -> 1000 (1 ctl line & 1 lbl line)

Page 60: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Message Functions

60 Integrated Resource Manager Functions and Other Facilities Version 500

WTL - Write-to-Log FunctionWrites a message to the system log. Returns 1 if the message was successfully written and 0 if not.

Syntax

>>----WTL(msgtext)---------<<

Exampleswtl('Msg written to log') -> 1

wtl('Not written to log') -> 0

msgtext Text of the message to write to the log, required. A maximum of 126 characters is allowed.

Page 61: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 61

Message Functions

WTO - Write-to-Operator FunctionIssues a message to the operator console. Returns the message identification number of the WTO.

Syntax

>>----WTO(msg,rout,desc,consid,consnm,jobnm,jobid)--------<<

msg The message text for the WTO, required. A maximum of 126 characters is allowed. A null message is not allowed.

rout Route codes for the message, optional. Route codes must be numeric and in the range 1 to 128. Multiple route codes can be specified by separating each of the codes with a blank: '1 2 3 4' or a comma: '1,2,3'. If a route code is not specified, a default route code of 2 will be used. If a 0 is specified, the message will be issued without a route code and will then be assigned the system default route code if one has been defined.

Note: Unauthorized callers are allowed to use route codes 1-28. If a code that is not in this range is specified by an unauthorized caller, an argument error condition is raised.

desc Specifies the descriptor code for the message, optional. The descriptor code must be numeric and in the range 0 to 13. If a 0 is specified, or if the argument is omitted, the message will be issued without a descriptor code (i.e., a non-highlighted, non-held message).

Page 62: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Message Functions

62 Integrated Resource Manager Functions and Other Facilities Version 500

Notes

The message ID returned by this function can be used as input to the DOM() function to delete the message from the operator console.

If both the consid and the consnm arguments are specified, the consid argument takes precedence.

There are four reserved console names that must not be used: INSTREAM, HC, INTERNAL and UNKNOWN. If any of these names are specified for consnm, a syntax error will be generated.

The jobnm and jobid arguments can only be used by authorized callers. Specifying either of these two arguments in an unauthorized environment will result in a syntax error.

consid Specifies the ID of the console that is to receive the message, optional. Must be numeric and in the range 0 to 2147483647 (2G-1). If console ID 0 is specified, the message is issued to the MVS INTERNAL console.

The MLG keyword can be used to send the message to the hardcopy log. Specifying the MLG keyword will cause the message to be routed to the system hardcopy log only; the message will not be displayed on the operator console.

An extended console ID may be specified instead of the standard numeric console ID. To specify an extended MCS console ID, specify a four byte binary or eight byte hexadecimal ID using the format: ‘X(bbbb)’ or ‘X(xxxxxxxx)’.

consnm Specifies the name of the console that is to receive the message, optional. A maximum of eight characters is allowed.

jobnm Specifies the job name associated with the WTO, optional. Job names can be a maximum of eight characters. The default is the job name of the issuer.

jobid Specifies the JES jobid associated with the WTO, optional. JES jobid can be a maximum of eight characters. The default is the jobid of the issuer.

Page 63: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 63

Message Functions

If both the jobnm and jobid arguments are specified and valid, the message will be written to the job log of the job specified by the jobnm and jobid arguments, as well as to the system log.

Exampleswto('ASOA000I msg') -> 1000

wto('ASOA000I msg with rout code 2',2) -> 1000

wto('ASOA000I msg with desc code 2',,2) -> 1000

wto('ASOA000I msg to console one ',,,1) -> 1000

wto('ASOA000I msg INTERNAL console',,,0) -> 1000

wto('ASOA000I msg to system log ',,,'MLG') -> 1000

wto('ASOA000I msg to console name ',,,,'CONSOLE1') -> 1000

wto('ASOA000I msg using a job name',,,,,'MYJOBNAM')-> 1000

wto('ASOA000I write msg to job log',,,,,'MYJOB','JOB11111') -> 1000

Page 64: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Message Functions

64 Integrated Resource Manager Functions and Other Facilities Version 500

WTOR - Write-to-Operator with Reply FunctionIssues a message to the operator console requiring a reply. Returns the response from the operator.

Syntax

>>----WTOR(msg,rout,desc,consid,consnm,jobnm,jobid,timeout)-----------<<

msg The message text for the WTOR, required. A maximum of 122 characters is allowed. A null message is not allowed.

rout Route codes for the message, optional. Route codes must be numeric and in the range 1 to 128. Multiple route codes can be specified by separating each of the codes with a blank: '1 2 3 4' or a comma: '1,2,3'. If a route code is not specified, a default route code of 2 will be used. If a 0 is specified, the message will be issued without a route code and will then be assigned the system default route code if one has been defined.

Note: Unauthorized callers are allowed to use route codes 1-28. If a code that is not in this range is specified by an unauthorized caller, an argument error condition will be raised.

desc Specifies the descriptor code for the message, optional. The descriptor code must be numeric and in the range 0 to 13. If a 0 is specified, or if the argument is omitted, the message will be issued without a descriptor code (i.e., a non-highlighted, non-held message).

Page 65: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 65

Message Functions

Notes

The valid descriptor codes for a WTOR are 7 and 13. The system automatically adds descriptor code 7 to all WTORs and deletes codes 1-6 and 8-12. All WTORs are issued as highlighted action messages.

If both the consid and the consnm arguments are specified, the consid argument takes precedence.

There are four reserved console names that must not be used: INSTREAM, HC, INTERNAL and UNKNOWN. If any of these names are specified for consnm, a syntax error will be generated.

consid Specifies the ID of the console that is to receive the message, optional. Must be numeric and in the range 0 to 2147483647 (2G-1). If console ID 0 is specified, the message is issued to the MVS INTERNAL console.

The MLG keyword can be used to send the message to the hardcopy log. Specifying the MLG keyword will cause the message to be routed to the system hardcopy log only; the message will not be displayed on the operator console.

An extended console ID may be specified instead of the standard numeric console ID. To specify an extended MCS console ID, specify a four byte binary or eight byte hexadecimal ID using the format ‘X(bbbb)’ or ‘X(xxxxxxxx)’.

consnm Specifies the name of the console that is to receive the message, optional. A maximum of eight characters is allowed.

jobnm Specifies the job name associated with the WTOR, optional. Job names can be a maximum of eight characters. The default is the job name of the issuer.

jobid Specifies the jobid associated with the WTOR, optional. JES job IDs can be a maximum of eight characters. The default is the job ID of the issuer.

timeout Specifies a timeout interval for the WTOR in seconds, optional. Must be numeric and in the range 1 to 86400 (24 hrs). A zero timeout interval is not allowed.

Page 66: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Message Functions

66 Integrated Resource Manager Functions and Other Facilities Version 500

The jobnm and jobid arguments can only be used by authorized callers. Specifying either of these two arguments in an unauthorized environment will result in a syntax error.

If both the JOBNM and JOBID arguments are specified and valid, the message will be written to the job log of the job specified by the jobnm and jobid arguments, as well as to the system log.

If timeout is specified and no reply is made to the WTOR within the time out interval, the WTOR will be DOM'ed, control will be returned to the caller, and a null value will be returned for the operator reply.

If a reply is received, the special variables, REPLYCNM, REPLYCID and REPLYCIX, will be set to the name, numeric console ID, and the eight byte hexadecimal extended console ID, of the console that replied to the WTOR.

The maximum length of a reply is 118 characters.

Exampleswtor('ASOA004A Reply Y or N') -> Y

wtor('ASOA004A Reply Y or N','2 9') -> Y (route codes 2 & 9)

wtor('ASOA004A Reply Y or N',,'7') -> Y (descriptor code 7)

wtor('ASOA004A Reply Y or N',,,'4') -> Y (issued to console #4)

wtor('ASOA004A Reply Y or N',,,,'CONSOLE1') -> Y (issued to named cons)

wtor('ASOA004A Reply Y or N',,,,,'MYJOBNAM') -> Y (issued with a job name)

wtor('ASOA004A Reply Y or N',,,,,,'JOB11111')-> Y (issued with a job id #)

wtor('ASOA004A Reply Y or N',,,,,,,'60') -> Y (expires in 60 seconds)

Page 67: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 67

Message Functions

WTOROK - Query WTOR Limit FunctionCompares the current outstanding WTOR count to the system WTOR limit. Returns 0 if the current count is within 10 percent of the WTOR limit. Otherwise, a 1 is returned; it is safe to issue a WTOR.

Syntax

>>----WTOROK(pcnt)----------<<

Exampleswtorok() -> 1

wtorok(20) -> 1

wtorok() -> 0

pcnt Specifies the percentage of the system WTOR limit that must still be available for a 1 to be returned, optional. This argument is used to replace the default percentage of 10. The argument pcnt must be numeric and in the range 10 to 50. If pcnt is not specified, a default of 10% will be used.

Page 68: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

System Functions

68 Integrated Resource Manager Functions and Other Facilities Version 500

System Functions

CONSADDR - Console Address FunctionReturns the address of the specified console or the owning sub-system name (JES) if there is no physical device associated with the console. If the specified console has not been defined, the literal, UNK, will be returned.

Syntax

>>----CONSADDR(consid)----------<<

Examplesconsaddr('0') -> F22

consaddr('1') -> 410

consaddr('01') -> 410

consaddr('30') -> JES

consaddr('99') -> UNK

consid Console ID must be numeric and in the range 0 to 99, required. If console ID 0 is specified, the address of the MVS master console will be returned.

Page 69: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 69

System Functions

CONSAREA - Console Area ID FunctionDetermines if the specified console area ID has been defined on the specified console. Returns 1 if the console area ID has been defined and 0 if not.

Syntax

>>----CONSAREA(consid,areaid)----------<<

Examplesconsarea('01','A') -> 1

consarea('02','A') -> 0

consid Console ID must be numeric and in the range 0 to 2147483647 (2G-1), required.

areaid Console area ID, required. Valid area IDs are: � A through J� Z

Page 70: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

System Functions

70 Integrated Resource Manager Functions and Other Facilities Version 500

CONSID - Console ID FunctionReturns the numeric ID of the specified console or the value 00 if the console is not found.

Syntax

>>----CONSID(consnm)----------<<

Examplesconsid('CONSOP01') -> 01

consid('consop01') -> 01

consid('REMOTE01') -> 16

consid('GARBAGE') -> 00

consnm Console name, required. Console names can be a maximum of eight characters.

Page 71: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 71

System Functions

CONSNAME - Console Name FunctionReturns the name of the specified console or a null value if the console has not been defined.

Syntax

>>----CONSNM(consid)----------<<

Examplesconsnm('0') -> CONSOPS00

consnm('1') -> CONSOPS01

consnm('01') -> CONSOPS01

consnm('99') -> '' (null value)

consid Console ID must be numeric and in the range 0 to 99, required. If console ID 0 is specified, the name of the master console will be returned.

Page 72: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

System Functions

72 Integrated Resource Manager Functions and Other Facilities Version 500

CONSOUTP - Console Output Pending FunctionChecks the specified console for pending output. Returns 1 if the console has pending output and 0 if not.

Syntax

>>----CONSOUTP(consid)----------<<

Examplesconsoutp('0') -> 1

consoutp('99') -> 0

consid Console ID must be numeric and in the range 0 to 99, required. If console ID 0 is specified, the MVS master console will be checked for pending output.

Page 73: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 73

System Functions

CONXID - Extended Console ID FunctionReturns the numeric ID for the specified console or the value 0 if the console is not found. The specified console may reference a standard or an extended MVS MCS console.

Syntax

>>----CONXID(consnm)----------<<

Examplesconxid('CMDCNA') -> 1

conxid('SDFUSER') -> 16777457

conxid('NOTFOUND') -> 0

consnm Console names can be a maximum of eight character, required.

Page 74: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

System Functions

74 Integrated Resource Manager Functions and Other Facilities Version 500

CONXNAME - Extended Console Name FunctionReturns the name for the specified console or a null value if the console is not found. The specified console may reference a standard or an extended MVS MCS console.

Syntax

>>----CONXNAME(consid)----------<<

Examplesconxname('0') -> INTERNAL

conxname('1') -> CMDCNA

conxname('16777457')-> SDFUSER

conxname('9999') -> '' (null value - console not found)

consid Console ID must be numeric and in the range 0 to 2147483647 (2G-1), required. If console ID 0 is specified, the name of the internal console is returned.

Page 75: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 75

System Functions

DEVALLOC - Device Allocated FunctionDetermines if the specified device is allocated. Returns 1 if the device is allocated and 0 if not.

Syntax

>>----DEVALLOC(devaddr)----------<<

Examplesdevalloc('768') -> 1

devalloc('0768') -> 1

devalloc('1BE0') -> 0 (device not allocated)

devalloc('1A00') -> 0 (device not defined)

devaddr Address, or hexadecimal number, of the device, required. A maximum of four characters is allowed. If necessary, this argument is padded with leading zeroes to form a four character device address.

Page 76: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

System Functions

76 Integrated Resource Manager Functions and Other Facilities Version 500

DEVICE - Device Class FunctionDetermines if the specified device is in the specified class. Returns 1 if the device is in the specified class and 0 if not.

Syntax

>>----DEVICE(devaddr,devclass)----------<<

Examplesdevice('40F','TAPE') -> 1

device('040F','TAPE') -> 1

device('0001','COMM') -> 1

device('0500','CTC') -> 1

device('01BC','DASD') -> 1

device('0410','DISP') -> 1

device('01C0','UREC') -> 1

device('01C0','CHAR') -> 0

devaddr Address, or hexadecimal number, of the device, required. A maximum of four characters is allowed. If necessary, this argument is padded with leading zeroes to form a four character device address.

devclass Desired class of the device, required. Valid values are:� TAPE Tape device� COMM Communication device� CTC CTC device� DASD DASD device� DISP Display device� UREC Unit record device� CHAR Character reader device

The devclass argument must be specified; there is no default value.

Page 77: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 77

System Functions

DEVICES - Device Class List FunctionSearches for all devices that meet the specified filtering criteria and returns the addresses, or hexadecimal device numbers, for those devices as a string of words, with each word separated by a blank. If no device is found that meets the specified search criteria, a null value is returned.

The search is based on device class, but can be filtered by device model within the class. For example, a search can be made for direct access devices, which will return the addresses of all direct access devices, or a search can be made for direct access devices with a model type of 3390, which will return the device addresses of just the 3390 DASD devices.

The current availability of the device, whether the device is online or offline, accessible or inaccessible, has no effect on the search. As long as the device has been defined, its address is returned.

Device addresses are returned in either three or four character format depending on the release level of the MVS operating system.

Syntax

>>----DEVICES(devclass,devmodel)----------<<

devclass Desired class of the device, required. Valid values are:� TAPE Tape device� COMM Communication device� CTC CTC device� DASD DASD device� DISP Display device� UREC Unit record device� CHAR Character reader device

The devclass argument must be specified; there is no default value.

Page 78: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

System Functions

78 Integrated Resource Manager Functions and Other Facilities Version 500

devmodel Desired model of the device, optional. Valid values are:� 2400 Tape device� 3400 Tape device� 3410 Tape device� 3420 Tape device� 3422 Tape device� 3423 Tape device� 3424 Tape device� 3430 Tape device� 3480 Tape device� 3490 Tape device� 3590 Tape device� 7340 Tape device� 8809 Tape device� 9347 Tape device� 9348 Tape device� 1060 Communication device� 2701 Communication device� 2701-2 Communication device� 2701-3 Communication device� 2701-4 Communication device� 2701-5 Communication device� 2701-6 Communication device� 2701-7 Communication device� 2701-8 Communication device� 2701-9 Communication device� 2702 Communication device� 2702-1 Communication device� 2702-2 Communication device� 2702-3 Communication device� 2702-4 Communication device� 2702-5 Communication device� 2702-6 Communication device� 2702-7 Communication device

Page 79: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 79

System Functions

devmodelcont.

� 2702-8 Communication device� 2702-9 Communication device� 2703 Communication device� 2703-1 Communication device� 2703-2 Communication device� 2703-3 Communication device� 2703-4 Communication device� 2703-5 Communication device� 2703-6 Communication device� 2703-7 Communication device� 2703-8 Communication device� 2703-9 Communication device� 2955 Communication device� 3704 Communication device� 3705 Communication device� 3705-2 Communication device� 3705-3 Communication device� 3705-4 Communication device� 3791 Communication device� 3968 Communication device� 7770 Communication device� 7772 Communication device� CTCB CTC device� CTCP CTC device� CTCS CTC device� OSDD CTC device� OSDV CTC device� RS6K CTC device� 3172 CTC device� 2301 DASD device� 2303 DASD device� 2305-1 DASD device� 2305-2 DASD device� 2311 DASD device

Page 80: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

System Functions

80 Integrated Resource Manager Functions and Other Facilities Version 500

devmodelcont.

� 2314-19 DASD device� 2321 DASD device� 3330 DASD device� 3330-11 DASD device� 3340 DASD device� 3350 DASD device� 3375 DASD device� 3380 DASD device� 3390 DASD device� 9340 DASD device� 1015 Display device� 1053 Display device� 2250 Display device� 2260 Display device� 2280 Display device� 2282 Display device� 3036 Display device� 3066 Display device� 3138 Display device� 3148 Display device� 3158 Display device� 3270 Display device� 3278 Display device� 3284 Display device� 3286 Display device� 5080 Display device� 5080-2 Display device� AFP1 Unit decord device� DUMY Unit record device� 1012 Unit record device� 1017 Unit record device� 1018 Unit record device� 1052 Unit record device� 1255 Unit record device

Page 81: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 81

System Functions

devmodelcont.

� 1255-2 Unit record device� 1270 Unit record device� 1270-2 Unit record device� 1275-PC Unit record device� 1275-SC Unit record device� 1275-1 Unit record device� 1275-2 Unit record device� 1285 Unit record device� 1287 Unit record device� 1288 Unit record device� 1403-4 Unit record device� 1419-PC Unit record device� 1419-1 Unit record device� 1419-2 Unit record device� 1419-3 Unit record device� 1442 Unit record device� 1443 Unit record device� 2150 Unit record device� 2495 Unit record device� 2495-2 Unit record device� 2501 Unit record device� 2520 Unit record device� 2540-P Unit record device� 2540-R Unit record device� 2560 Unit record device� 2596 Unit record device� 2671 Unit record device� 2947 Unit record device� 2956-1 Unit record device� 2956-2 Unit record device� 2956-3 Unit record device� 2956-4 Unit record device� 2956-5 Unit record device� 3203 Unit record device

Page 82: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

System Functions

82 Integrated Resource Manager Functions and Other Facilities Version 500

devmodelcont.

� 3203-2 Unit record device� 3210 Unit record device� 3210-2 Unit record device� 3211 Unit record device� 3213 Unit record device� 3215 Unit record device� 3215-2 Unit record device� 3262 Unit record device� 3504 Unit record device� 3505 Unit record device� 3525 Unit record device� 3525-2 Unit record device� 3540 Unit record device� 3800 Unit record device� 3800-3/8 Unit record device� 3838 Unit record device� 3848 Unit record device� 3851 Unit record device� 3886 Unit record device� 3886-2 Unit record device� 3890 Unit record device� 3890-2 Unit record device� 3895 Unit record device� 4245 Unit record device� 4248 Unit record device� 5203 Unit record device� 5203-2 Unit record device� 5424 Unit record device� 5425 Unit record device� 7443 Unit record device

If devmodel is omitted, no filtering by device type is performed; the addresses of all devices within the class are returned. If devmodel is specified, only the addresses of those devices with the specified model type, within the class, are returned.

Page 83: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 83

System Functions

Examplesdevices('TAPE') -> 0400 0401 0402 ... 040C 040D 040E 040F

devices('COMM') -> 0001 0002 0003 ... 000C 000D 000E 000F

devices('CTC') -> 0500 0501 0502 ... 050C 050D 050E 050F

devices('DASD') -> 0A00 0A01 0A02 ... 0A0C 0A0D 0A0E 0A0F

devices('DISP') -> 0410 0411 05E0 05E1 ... 05ED 05EE 05EF

devices('UREC') -> 036C 036D 0530 0540 ... 054A 054B 054C

devices('UREC','2501') -> 0530 0540

devices('CHAR') -> ''

devmodelcont.

The specified device model type must be within the specified device class. If a mismatch is encountered, a syntax error will be generated.

Page 84: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

System Functions

84 Integrated Resource Manager Functions and Other Facilities Version 500

DEVNUM - Device Number FunctionReturns a three or four character hexadecimal device number for the specified volume serial number. If the specified volser is not found, a null value will be returned.

Syntax

>>----DEVNUM(volser)----------<<

Examplesdevnum('DASD01') -> 084B

devnum('dasd01') -> 084B

devnum('NOFIND') -> ''

volser Volume serial number for the device, required. A maximum of six characters is allowed.

Page 85: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 85

System Functions

DEVPATH - Device Path FunctionDetermines if there is a path to the specified device. Returns 1 if there is a valid path to the device and 0 if: there is no physical path to the device, the device is not attached to a logical path, or if the device is not found.

Syntax

>>----DEVPATH(devaddr)----------<<

Examplesdevpath('44A') -> 1

devpath('044A') -> 1

devpath('FFFF') -> 0 (device not defined)

devpath('FFFF') -> 0 (device has no path)

devaddr Address, or hexadecimal number, of the device, required. A maximum of four characters is allowed. If necessary, this argument is padded with leading zeroes to form a four character device address.

Page 86: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

System Functions

86 Integrated Resource Manager Functions and Other Facilities Version 500

DEVPEND - Device Pending Offline FunctionDetermines if the specified device is in pending offline status. If a 'VARY xxx,OFFLINE' command is issued for a device that is currently allocated, the device will be put into pending offline status until it is de-allocated. This function will determine if a device is in pending offline status and return 1 if it is and 0 if not.

Syntax

>>----DEVPEND(devaddr)-----------<<

Examplesdevpend('4A0') -> 1

devpend('04A0') -> 1

devpend('FFFF') -> 0 (device not defined)

devpend('FFFF') -> 0 (offline not pending)

devaddr Address, or hexadecimal number, of the device, required. A maximum of four characters is allowed. If necessary, this argument is padded with leading zeroes to form a four character device address.

Page 87: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 87

System Functions

IPLTIME - IPL Time FunctionReturns the date and time of the last system IPL.

Syntax

>>----IPLTIME()----------<<

There are no arguments for this function.

Examplesipltime() -> 06/10/02 14:26:32

Page 88: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

System Functions

88 Integrated Resource Manager Functions and Other Facilities Version 500

MODIFYID - Modify ID FunctionSearches for the specified task, and if found, returns the MVS modify command identifier for the task. If the specified task is not found, a null value will be returned.

Syntax

>>----MODIFYID(tasknm)----------<<

Examplesmodifyid('$AFOP23')-> AO

modifyid('AFTCI') -> TCI

modifyid('NET34') -> NET

modifyid('VLF') -> VLF

modifyid('TSO23') -> TSO

modifyid('APPC') -> APPC

modifyid('NOTASK') -> '' (task not found)

tasknm Name (MVS address space name) of the task to use for the search, required. A maximum of eight characters is allowed.

Page 89: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 89

System Functions

ONLINE - Device Online FunctionDetermines if the user-specified device is online. Returns 1 if the specified device is online and 0 if the device is offline or not found.

Syntax

>>----ONLINE(devaddr)----------<<

Examplesonline('1BA') -> 1

online('01BA') -> 1

online('FFFF') -> 0 (device not defined)

online('FFFF') -> 0 (device not online)

devaddr Address, or hexadecimal number, of the device, required. A maximum of four characters is allowed. If necessary, this argument is padded with leading zeroes to form a four character device address.

Page 90: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

System Functions

90 Integrated Resource Manager Functions and Other Facilities Version 500

@RCFSSTA - Sysplex Status FunctionReturns status information from the global task status table for a resource. The status information will be returned in REXX array variables.

Syntax

>>----@RCFSSTA(system,object,option)------------<<

system IRM ID of the desired object, required. Valid values are:� ALL All IRM IDs� irmid Specific IRM ID, IRM ID = smfid||subsysid

where smfid is a System SMF ID and subsysid is the AF/OPERATOR Subsystem ID.

object Name of the object, required. Valid values are:� ALL All Started Task Manager controlled

resources.� task_name Started task name� pattern Started task name pattern

option Desired status information, optional. Valid values are:� Svalue Object status value� Status Object status text� Schedule Object current schedule� Number Object number� Recover Object recover count� RIP Object recovery-in-progress flag� ALL All status options

If not specified, option defaults to Svalue.

Page 91: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 91

System Functions

Notes

Results of the function call will be returned in REXX array variables as follows:� OBJECT.0 Object name index variable � OBJECT.n Object name� IRMID.0 IRMID index variable� IRMID.n IRMID for object� SVALUE.0 Svalue index variable� SVALUE.n Numerical representation of object status � STATUS.0 Status index variable � STATUS.n Text representation of object status� SCHED.0 Schedule index variable � SCHED.n Object's current schedule #. Zero (0) if the object does

not run on a schedule � NUMBER.0 Object number index variable� NUMBER.n Object number � RECOVER.0 Recover index variable� RECOVER.n Object recover count � RIP.0 RIP index variable� RIP.n Object recovery-in-progress flag

Examples@RCFSSTA('ALL','ALL','ALL') All status data for all

objects & all IRMIDs.

@RCFSSTA('SP23AU00','ALL','ALL') All status data for all objects, IRMID AU00 & SMFID SP23.

@RCFSSTA('ALL','CIC*','STATUS NUMBER') Status and number for all objects beginning with CIC; all IRMIDs.

@RCFSSTA('SP13AU03','CICS2352','STATUS')Status for CICS2352 on SP13, IRMID AU03.

@RCFSSTA('SP13AU03','CICS2352') Status for CICS2352 on SP13, IRMID AU03.

Page 92: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

System Functions

92 Integrated Resource Manager Functions and Other Facilities Version 500

REGION - Region Size FunctionReturns the region size of the currently running task in kilobytes (K).

Syntax

>>----REGION()----------<<

There are no arguments for this function.

Examplesregion() -> 131072

Page 93: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 93

System Functions

REPLIES - Outstanding Replies FunctionRetrieves the job name, job ID, reply ID, system name, date, time, and message text for the current outstanding replies and creates a set of variables in the REXX environment which contains the information. Returns 1 if outstanding replies were found, and the reply variables were created, and 0 if not.

Upon successful completion of this function, the following variable arrays will be created:� REPLY_JN.n Reply Job Name

� REPLY_JI.n Reply Job ID

� REPLY_ID.n Reply ID Number

� REPLY_MT.n Reply Message Text

� REPLY_DT.n Reply Message Date

� REPLY_TM.n Reply Message Time

� REPLY_SN.n Reply System Name

An index variable is also created for each array which contains the number of elements in the array:

� REPLY_JN.0 Reply Job Name Element Count

� REPLY_JI.0 Reply Job ID Element Count

� REPLY_ID.0 Reply ID Number Element Count

� REPLY_MT.0 Reply Message Text Element Count

� REPLY_DT.0 Reply Message Date Element Count

� REPLY_TM.0 Reply Message Time Element Count

� REPLY_SN.0 Reply System Name Element Count

Each set of variables determined by the value of n contains information on one outstanding reply.

Page 94: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

System Functions

94 Integrated Resource Manager Functions and Other Facilities Version 500

Syntax

>>----REPLIES()----------<<

There are no arguments for this function.

Notes

This function must be invoked in an authorized REXX environment. Calling this function wile running unauthorized results in a syntax error.

Examplesreplies() -> 1

replies() -> 0

Page 95: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 95

System Functions

RESDEQ - Resource Dequeue FunctionReleases an enqueue for a user-named resource. Returns 1 if the dequeue request is successful and 0 if not2.

Syntax

>>----RESDEQ(qname,rname,scope)-----------<<

Examplesresdeq('@APL@ENQ','MYENQUEUE') -> 1

resdeq('@APL@ENQ','MYENQUEUE') -> 0

resdeq('@APL@ENQ','MYENQUEUE','STEP') -> 1

resdeq('@APL@ENQ','MYENQUEUE','SYSTEM') -> 1

resdeq('@APL@ENQ','MYENQUEUE','SYSTEMS')-> 1

2. See IBM Corporation, MVS/ESA SPL: Application Development Macro Reference, SC28-1857-5 (Poughkeepsie, NY.:IBM, 1991), DEQ - Release Control of a Serially Reus-able Resource, pp. 141-147, for a complete description of the dequeue mechanism.

qname User-defined qname for the resource, required. A maximum of eight characters is allowed. A qname may contain any valid hexadecimal character.

rname User-defined rname for the resource, required. A maximum of 255 characters is allowed. An rname may contain any valid hexadecimal character.

scope Specifies the scope of the requested enqueue, optional. Valid values are:� STEP� SYSTEM� SYSTEMS

If scope is not specified, it defaults to STEP.

Page 96: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

System Functions

96 Integrated Resource Manager Functions and Other Facilities Version 500

RESENQ - Resource Enqueue FunctionProcesses an enqueue request for a user-named resource. Returns 1 if the enqueue request is successful and 0 if not3.

Syntax

>>----RESENQ(qname,rname,scope,qtype,rtype)---------<<

3. See IBM Corporation, MVS/ESA SPL: Application Development Macro Reference, SC28-1857-5 (Poughkeepsie, NY.:IBM, 1991), ENQ - Release Control of a Serially Reusable Resource, pp. 181-187, for a complete description of the enqueue mech-anism.

qname User-defined qname for the resource, required. A maxi-mum of eight characters is allowed. A qname may contain any valid hexadecimal character.

rname User-defined rname for the resource, required. A maxi-mum of 255 characters is allowed. An rname may contain any valid hexadecimal character.

scope Specifies the scope of the requested enqueue, optional. Valid values are:� STEP� SYSTEM� SYSTEMS

If scope is not specified it defaults to STEP.

qtype Specifies the type of access for the resource, optional. Valid values are:� EXCLUSIVE� SHARED

The default is EXCLUSIVE. Only the first character of the argument is significant; all other characters are ignored.

Page 97: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 97

System Functions

Examplesresenq('@APL@ENQ','MYENQ') -> 1

resenq('@APL@ENQ','MYENQ') -> 0

resenq('@APL@ENQ','MYENQ','STEP') -> 1

resenq('@APL@ENQ','MYENQ','SYSTEM') -> 1

resenq('@APL@ENQ','MYENQ','SYSTEMS') -> 1

resenq('@APL@ENQ','MYENQ','STEP','E','T')-> 1

resenq('@APL@ENQ','MYENQ','STEP','E','U')-> 1

resenq('@APL@ENQ','MYENQ','STEP','E','C')-> 1

resenq('@APL@ENQ','MYENQ','STEP','E','H')-> 1

rtype Specifies the type of enqueue request, optional. Valid values are:� TEST Tests whether the resource is immediately

available. Does not acquire resource control.� USE Control of the resource is requested only if

immediately available. The active task is not placed in a wait condition.

� CHNG Changes control of the resource from shared to exclusive access if it is immediately available. The active task is not placed in a wait condition.

Note: This option is valid only for a qtype of EXCLUSIVE. If a qtype of SHARED is specified, a syntax error will be generated.

� HAVE Control of the resource is requested. The active task is placed in a wait condition if the resource is not available.

The default is USE. Only the first character of the argument keyword is significant; all others are ignored.

Page 98: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

System Functions

98 Integrated Resource Manager Functions and Other Facilities Version 500

VOLSER - Volume Serial Number FunctionReturns the volume serial number, volser, for the user-specified device. If the specified device is not found, has no volume serial number, or has an invalid volser, a null value will be returned.

Syntax

>>----VOLSER(devaddr)----------<<

Examplesvolser('84B') -> DASD01

volser('084B') -> DASD01

volser('FFFF') -> '' (null value - no volser)

volser('FFFF') -> '' (null value - not defined)

devaddr Address, or hexadecimal number, of the device, required. A maximum of four characters is allowed. If necessary, this argument is padded with leading zeroes to form a four character device address.

Page 99: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 99

Date and Time Functions

Date and Time Functions

BASE2BDS - Base to Base-Date-in-Seconds FunctionConverts a numeric Base Date to a Base-Date-in-Seconds value. Returns the BDS value in eight byte binary format, 16 byte hexadecimal format, or 12 byte numeric format. If the numeric format is specified, the resulting BDS value will be padded to the left with leading zeroes to form a 12 byte result, if necessary.

Syntax

>>----BASE2BDS(days,format,gmt)----------<<

days Base Date for the date, required. Must be a numeric value in the range -366 to 3652058. A negative value will result in a date in the year 0000 where the value -366 represents the date 01/01/0000 and 0 represents the date 01/01/0001.

format Output format, optional. Valid values are:� BINARY 8 byte binary BDS value� HEX 16 byte hexadecimal BDS value� X 16 byte hexadecimal BDS value� NUMERIC 12 byte numeric BDS value

If format is not specified, it defaults to BINARY. Only the first character in the argument keyword is significant; all others are ignored.

gmt The Greenwich Mean Time differential to be used for time calculations, optional. The argument must be numeric and in the form +/-HH.hhh or +/-HH:MM:SS and in the range 00:00:00 to 23:59:59. If not specified, the argument defaults to the system-maintained GMT differential.

Page 100: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Date and Time Functions

100 Integrated Resource Manager Functions and Other Facilities Version 500

Notes

The Base Date value used by this function is equivalent to that produced by the built-in REXX function DATE(), using the Base option.

Examplesbase2bds('731006','B') -> ????????

base2bds('731006','H') -> 0000000EB490FF70

base2bds('731006','X') -> 0000000EB490FF70

base2bds('731006','N') -> 063158943600

base2bds('-366') -> ????????

base2bds('-366','X') -> FFFFFFFFFE1DDD70

base2bds('0') -> ????????

base2bds('0','X') -> 0000000000006270

base2bds('3652058') -> ????????

base2bds('3652058','X') -> 0000004977854970

base2bds('731006','B','00:00:00') -> ????????

base2bds('731006','H','00:00:00') -> 0000000EB4909D00

base2bds('731006','X','00:00:00') -> 0000000EB4909D00

base2bds('731006','N','00:00:00') -> 063158918400

Page 101: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 101

Date and Time Functions

BASE2DAY - Base Date to Date FunctionConverts a numeric Base Date to a USA format date. Returns the date value, in standard or extended format, for the specified Base Date. This function can be used in conjunction with the DAY2BASE() REXX function to perform numeric calculations on dates.

Syntax

>>----BASE2DAY(days,format)----------<<

Notes

The Base Date value used by this function is equivalent to that produced by the built-in REXX function DATE(), using the Base option.

date('U') = base2day(date('B'))

The following example illustrates the combined use of the BASE2DAY() and DAY2BASE() functions to perform numeric calculations on dates:

this date = ‘06/06/2002’ >>> “06/06/2002this date = day2base(this date) >>> “731006”next base = this base + 1 >>> “731007”next date = base2day(next base,’X’ >>> “06/07/2002”

days Base Date for the date, required. Must be a numeric value in the range -366 to 3652058. A negative value will result in a date in the year 0000 where the value -366 represents the date 01/01/0000, and 0 represents the date 01/01/0001.

format Output format, optional. Valid values are:� STANDARD USA format date: MM/DD/YY� EXTENDED USA format date: MM/DD/YYYY� X USA format date: MM/DD/YYYY

If format is not specified, it defaults to STANDARD. Only the first character in the argument keyword is significant; all others are ignored.

Page 102: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Date and Time Functions

102 Integrated Resource Manager Functions and Other Facilities Version 500

Examplesbase2day('731006') -> 06/02/02

base2day('731006','S') -> 06/02/02

base2day('731006','E') -> 06/02/2002

base2day('731006','X') -> 06/02/2002

base2day('-366') -> 01/01/00

base2day('-366','X') -> 01/01/0000

base2day('0') -> 01/01/01

base2day('0','X') -> 01/01/0001

base2day('3652058') -> 12/31/99

base2day('3652058','X') -> 12/31/9999

Page 103: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 103

Date and Time Functions

BDS - Base-Date-in-Seconds FunctionReturns the current Base-Date-in-Seconds in eight byte binary format, 16 byte hexadecimal format or 12 byte numeric format. If the numeric format is specified, the resulting BDS value will be padded to the left with leading zeroes to form a 12 byte result if necessary.

Syntax

>>----BDS(format)----------<<

Notes

The Base Date value used by this function is equivalent to that produced by the built-in REXX function DATE(), using the Base option.

Examplesbds() -> ????????

bds('B') -> ????????

bds('H') -> 0000000EB4921A27

bds('X') -> 0000000EB4921A27

bds('N') -> 063159015975

format Output format, optional. Valid values for format are:� BINARY 8 byte binary BDS value� HEX 16 byte hexadecimal BDS value� X 16 byte hexadecimal BDS value� NUMERIC 12 byte numeric BDS value

If format is not specified, it defaults to BINARY. Only the first character in the argument keyword is significant; all others are ignored.

Page 104: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Date and Time Functions

104 Integrated Resource Manager Functions and Other Facilities Version 500

BDS2BASE - Base-Date-in-Seconds to Base FunctionConverts a Base-Date-in-Seconds value to a Base Date value representing the number of complete days since January 1, 0001. Returns the numeric Base Date for the Base-Date-in-Seconds value.

Syntax

>>----BDS2BASE(bds,gmt)----------<<

Notes

The Base Date value used by this function is equivalent to that produced by the built-in REXX function DATE(), using the Base option.

bds Eight byte binary, 16 byte hexadecimal, or 12 byte numeric BDS value, required.

The date and time value, including any time adjustments, must be in the range: 0000/01/01 00:00:00 - 9999/12/31 23:59:59.

gmt The Greenwich Mean Time differential to be used for time calculations, optional. The argument must be numeric and in the form +/-HH.hhh or +/-HH:MM:SS and in the range 00:00:00 to 23:59:59. If not specified, the argument defaults to the system-maintained GMT differential.

Page 105: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 105

Date and Time Functions

Examplesbds2base(????????) -> -366 (BDS=0000/01/01

23:00:00)

bds2base('FFFFFFFFFE1F20E0') -> -366 (BDS=0000/01/01 23:00:00)

bds2base('-000031514400') -> -366 (BDS=0000/01/01 23:00:00)

bds2base('-000031514400','+04:00:00') -> -365 (BDS=0000/01/02 03:00:00)

bds2base(????????) -> 731006 (BDS=2002/06/06 10:00:00)

bds2base('0000000EB4918C10') -> 731006 (BDS=2002/06/06 10:00:00)

bds2base('063158979600') -> 731006 (BDS=2002/06/06 10:00:00)

bds2base('063158979600','+04:00:00') -> 731006 (BDS=2002/06/06 14:00:00)

bds2base(????????) -> 3652057 (BDS=9999/12/30 23:00:00)

bds2base('0000004977853B60') -> 3652057 (BDS=9999/12/30 23:00:00)

bds2base('315537832800') -> 3652057 (BDS=9999/12/30 23:00:00)

bds2base('315537832800','+04:00:00') -> 3652058 (BDS=9999/12/31 03:00:00)

Page 106: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Date and Time Functions

106 Integrated Resource Manager Functions and Other Facilities Version 500

BDS2TIME - Base-Date-in-Seconds to Time FunctionConverts a Base-Date-in-Seconds value to an ordered or extended ordered format date and time value. The BDS value can be specified in eight byte binary format, 16 byte hexadecimal format, or 12 byte numeric format. Returns a date and time value in the requested format.

Syntax

>>----BDS2TIME(bds,format,gmt,time)----------<<

bds Eight byte binary, 16 byte hexadecimal, or 12 byte numeric bds value, optional. If this argument is not specified, the current system bds value is used.

The date and time value, including any time adjustments, must be in the range 0000/01/01 00:00:00 - 9999/12/31 23:59:59.

format Output format, optional. Valid values are:� STANDARD YY/MM/DD HH:MM:SS� EXTENDED YYYY/MM/DD HH:MM:SS� X YYYY/MM/DD HH:MM:SS

If format is not specified, it defaults to EXTENDED. Only the first character in the argument keyword is significant; all others are ignored.

gmt The Greenwich Mean Time differential to be used for time calculations, optional. The argument must be numeric and in the form +/-HH.hhh or +/-HH:MM:SS and in the range 00:00:00 to 23:59:59. If not specified, the argument defaults to the system-maintained GMT differential.

time Time value to add to or subtract from the date and time, optional. Time must be numeric and in the form +/-HH.hhh or +/-HH:MM:SS. The maximum adjustment is +/-99:59:59.

Page 107: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 107

Date and Time Functions

Notes

The Base Date value used by this function is equivalent to that produced by the built-in REXX function DATE(), using the Base option.

Examplesbds2time() -> 2002/06/07 16:19:37

bds2time(binbds1) -> 2002/06/06 10:00:00

bds2time('063158979600') -> 2002/06/06 10:00:00

bds2time('0000000EB4918C10') -> 2002/06/06 10:00:00

bds2time('0000000EB4918C10','S') -> 2002/06/06 10:00:00

bds2time('0000000EB4918C10','E') -> 2002/06/06 10:00:00

bds2time('0000000EB4918C10','X') -> 2002/06/06 10:00:00

bds2time('0000000EB4918C10',,'0') -> 2002/06/06 17:00:00

bds2time('0000000EB4918C10',,,'+1')-> 2002/06/06 11:00:00

bds2time('0000000EB4918C10',,,'-1')-> 2002/06/06 09:00:00

Page 108: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Date and Time Functions

108 Integrated Resource Manager Functions and Other Facilities Version 500

BDS2TOD - Base-Date-in-Seconds to TOD FunctionConverts a Base-Date-in-Seconds value to a Time-of-Day value. Returns the TOD stamp in either eight byte binary format or 16 byte hexadecimal format.

Syntax

>>----BDS2TOD(bds,format)----------<<

Notes

The Base Date value used by this function is equivalent to that produced by the built-in REXX function DATE(), using the Base option.

bds Eight byte binary, 16 byte hexadecimal, or 12 byte numeric bds value, required.

A zero value is returned for any date and time value that is not within the TOD epoch.

format Output format, optional. Valid values are:� BINARY 8 byte binary TOD stamp� HEX 16 byte hex TOD stamp.� X 16 byte hex TOD stamp

If format is not specified, it defaults to BINARY. Only the first character in the argument keyword is significant; all others are ignored.

Page 109: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 109

Date and Time Functions

Examplesbds2tod(????????) -> ???????? (BDS=2002/06/06

10:00:00)

bds2tod(????????,'H') -> B7BD329000400000 (BDS=2002/06/06 10:00:00)

bds2tod(????????,'X') -> B7BD329000400000 (BDS=2002/06/06 10:00:00)

bds2tod('0000000EB4918C10') -> ???????? (BDS=2002/06/06 10:00:00)

bds2tod('0000000EB4918C10','H') -> B7BD329000400000 (BDS=2002/06/06 10:00:00)

bds2tod('0000000EB4918C10','X') -> B7BD329000400000 (BDS=2002/06/06 10:00:00)

bds2tod('063158979600') -> ???????? (BDS=2002/06/06 10:00:00)

bds2tod('063158979600','H') -> B7BD329000400000 (BDS=2002/06/06 10:00:00)

bds2tod('063158979600','X') -> B7BD329000400000 (BDS=2002/06/06 10:00:00)

Page 110: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Date and Time Functions

110 Integrated Resource Manager Functions and Other Facilities Version 500

CENT2DAY - Day-of-Century to Date FunctionConverts a numeric Day-of-Century to a Date. Returns the USA format date, in standard or extended format, for the specified numeric Day-of-Century.

This function can be used in conjunction with the DAY2CENT() REXX function to perform numeric calculations on dates.

Syntax

>>----CENT2DAY(days,format,century)---------<<

days Day-of-Century for the date, required. Must be a numeric value in the range -36523 to 73048 (+/- one day for leap centuries).

A negative value will result in a date in the last century. A value over the number of days in the century, usually 36524, will result in a date in the next century.

format Output format, optional. Valid values are:� STANDARD USA format date: MM/DD/YY� EXTENDED USA format date: MM/DD/YYYY� X USA format date: MM/DD/YYYY

If format is not specified, it defaults to STANDARD. Only the first character in the argument keyword is significant; all others are ignored.

century The century in which the day falls, optional. Must be a numeric value in the form CC or YYYY. If not specified, the century defaults to the current system century.

Page 111: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 111

Date and Time Functions

Notes

The Day-of-Century value used by this function is equivalent to that produced by the built-in REXX function DATE(), using the Century option.

date('U') = cent2day(date('C'))

The following example is provided to illustrate the combined use of the CENT2DAY() and DAY2CENT() functions to perform numeric calculations on dates:

this_date = '12/31/1999 >>> "12/31/1999"this_cent = day2cent(this_date) >>> "36524"next_cent = this_cent + 1 >>> "36525"next_date = cent2day(next_cent,'X','19') >>> "01/01/2000"

Examplescent2day('888') -> 06/06/02

cent2day('888','S') -> 06/06/02

cent2day('888','E') -> 06/06/2002

cent2day('888','X') -> 06/06/2002

cent2day('888','X','20') -> 06/06/2002

cent2day('888','X','21') -> 06/07/2102

cent2day('60','X','2000') -> 02/29/2000

cent2day('60','X','2100') -> 03/01/2100

cent2day('0','X','2000') -> 12/31/1999

cent2day('0','X','2100') -> 12/31/2099

cent2day('-36523','X','20') -> 01/01/1900

cent2day('-36523','X','21') -> 01/02/2000

cent2day('-36524','X','21') -> 01/01/2000

Page 112: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Date and Time Functions

112 Integrated Resource Manager Functions and Other Facilities Version 500

DATEPART - Date Segment FunctionReturns the requested segment of the current date. The Century, Year, Month, or Day will be returned as a two-character numeric value.

Syntax

>>----DATEPART(segment)-----------<<

Examplesdatepart() -> 20

datepart('C') -> 20

datepart('Y') -> 02

datepart('M') -> 06

datepart('D') -> 10

segment Requested segment of the current date, optional. Valid values are:� C Century� Y Year� M Month� D Day

If segment is not specified, it defaults to CENTURY. Only the first character in the argument keyword is significant; all others are ignored.

Page 113: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 113

Date and Time Functions

DATETIME - Date and Time FunctionConverts a formatted input date and time value to a formatted output date and time value. The resulting date and time can be adjusted, up or down, by a number of years, months, days, or a time value consisting of hours, minutes and/or seconds. Or, this function can simply be used to convert a date value from one format to another. Returns an adjusted and/or re-formatted date and time value in the requested format.

Syntax

>>----DATETIME(datetime,ifrm,ofrm,yrs,mns,dys,time)----------<<

datetime Date and time value, optional. If not specified, the current system date and time will be used. The valid date formats are described by the input format option argument below. The general format for this argument is:

date_value time_value

where date_value is a date in one of the valid formats and time_value is a time value, separated from the date_value by a single blank character, which is in the form HH:MM:SS. For example:

MM/DD/YY HH:MM:SS

The date and time value, including any time adjustments, must be in the range 0000/01/01 00:00:00 - 9999/12/31 23:59:59.

If a century is not specified, the century will default to the current system century.

The time value may be omitted. If the time value is omitted from the argument, it will also be omitted from the result.

The time value can be qualified to the millionth-second level, i.e. SS.SSSSSS. This is included for compatibility with existing functions but the information is not used by this function. Any value specified beyond the full second is ignored by this function.

Page 114: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Date and Time Functions

114 Integrated Resource Manager Functions and Other Facilities Version 500

ifrm Input format, optional. Valid values are:� E European format...... DD/MM/YY� J Julian format........... YYDDD� N Normal format........ DD Mon YYYY� O Ordered format....... YY/MM/DD� S Sorted format.......... YYYYMMDD� U USA format............ MM/DD/YY� XE Extended European. DD/MM/YYYY� XJ Extended Julian....... YYYYDDD� XO Extended Ordered.... YYYY/MM/DD� XU Extended USA......... MM/DD/YYYY

If ifrm is not specified, it defaults to USA format. The input format must match the date format of the datetime argument. If the datetime argument is omitted, ifrm will be checked for the correct syntax, but will not be used.

ofrm Output format, optional. Valid values are:� E European format...... DD/MM/YY� J Julian format........... YYDDD� N Normal format........ DD Mon YYYY� O Ordered format....... YY/MM/DD� S Sorted format.......... YYYYMMDD� U USA format............ MM/DD/YY� XE Extended European. DD/MM/YYYY� XJ Extended Julian....... YYYYDDD� XO Extended Ordered.... YYYY/MM/DD� XU Extended USA......... MM/DD/YYYY

If ofrm is not specified, it defaults to USA format.

yrs Number of years to add to or subtract from the date and time, optional. Must be numeric and in the form +/-YYY.

Page 115: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 115

Date and Time Functions

Notes

The Base Date value used by this function is equivalent to that produced by the built-in REXX function DATE(), using the Base option.

The result of the DATETIME() function can be used as input to an AF/OPERATOR "TRAP ADD(name) TOD(time)" command to schedule an event 'five minutes from now' by creating a code segment similar to the following example:

now = datetime()parse value datetime(,,,,,,'+00:05:00') with date time."TRAP ADD(NOWPLUS5) TOD("time date") ACT('EXEC ….') ENABLE

A trace of this coding technique would appear as follows:

*-* now = datetime()>>> "06/10/02 15:58:15"*-* parse value datetime(,,,,,,'+00:05:00') with date time.>>> "06/10/02 16:03:15">>> "06/10/02">>> "16:03:15">.> "" *-* "TRAP ADD(NOWPLUS5) TOD("time date") ACT('EXEC ...') ENABLE">>> "TRAP ADD(NOWPLUS5) TOD(16:03:15 06/10/02) ACT('EXEC ...') ENABLE"

mns Number of months to add to or subtract from the date and time, optional. Must be numeric and in the form +/-MMMM.

If the resulting month has less days than the specified date, the last day of the resulting month is returned. For example, if -6 is specified for mns and the input date is 08/31/2002, the result will be 02/28/2002.

dys Number of days to add to or subtract from the date and time, optional. Must be numeric and in the form +/-DDDDD.

time Time value to add to or subtract from the date and time, optional. Time must be numeric and in the form +/-HH.hhh or +/-HH:MM:SS. The maximum adjustment is +/-99:59:59.

Page 116: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Date and Time Functions

116 Integrated Resource Manager Functions and Other Facilities Version 500

Examplesdatetime(,,,,,,'+00:05:00') -> 06/11/02 10:28:14datetime('06/10/02 08:00:00','U') -> 06/10/02 08:00:00datetime('06/10/02 08:00:00','U',,,,,'+00:05:00')

-> 06/10/02 08:05:00datetime('12/31/2001','XU','XU') -> 12/31/2001datetime('01/01/2002','XU','XU') -> 01/01/2002datetime('12/31/2001','XU','XU',,,1) -> 01/01/2002datetime('01/01/2000','XU','XU') -> 01/01/2000datetime('01/01/2000','XU','XU',,,1) -> 01/02/2000datetime('01/01/2000','XU','XU',,,365) -> 12/31/2000datetime('01/01/2000','XU','XU',,,366) -> 01/01/2001datetime('12/31/0000','XU','XU',,,1) -> 01/01/0001datetime('12/31/9999','XU','XU',,,-1,'24:00:00')

-> 12/31/9999datetime('12/10/9999 00:00:00','XU','XU',,-14)

-> 10/10/9998 00:00:00datetime('12/10/9999 00:00:00','XU','XU',,-9999)

-> 09/10/9166 00:00:00datetime('12/10/2000','XU',,3,2,19,'+00:05:00')

-> 02/29/04datetime('12/10/2000','XU','E',3,2,19,'+00:05:00')

-> 29/02/04datetime('12/10/2000','XU','J',3,2,19,'+00:05:00')

-> 04060datetime('12/10/2000','XU','N',3,2,19,'+00:05:00')

-> 29 Feb 2004datetime('12/10/2000','XU','O',3,2,19,'+00:05:00')

-> 04/02/29datetime('12/10/2000','XU','S',3,2,19,'+00:05:00')

-> 20040229datetime('12/10/2000','XU','U',3,2,19,'+00:05:00')

-> 02/29/04datetime('12/10/2000','XU','XE',3,2,19,'+00:05:00')

-> 29/02/2004datetime('12/10/2000','XU','XJ',3,2,19,'+00:05:00')

-> 2004060datetime('12/10/2000','XU','XO',3,2,19,'+00:05:00')

-> 2004/02/29datetime('12/10/2000','XU','XU',3,2,19,'+00:05:00')

-> 02/29/2004datetime('06/10/02',,'U') -> 06/10/02

datetime('10/06/02','E','U') -> 06/10/02

datetime('02161','J','U') -> 06/10/02

Page 117: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 117

Date and Time Functions

datetime('10 Jun 2002,'N','U') -> 06/10/02

datetime('02/06/10,'O','U') -> 06/10/02

datetime('20020610,'S','U') -> 06/10/02

datetime('06/10/02,'U','U') -> 06/10/02

datetime('10/06/2002,'XE','U') -> 06/10/02

datetime('2002161,'XJ','U') -> 06/10/02

datetime('2002/06/10','XO','U') -> 06/10/02

datetime('06/10/2002','U','E') -> 10/06/02

datetime('06/10/2002','U','J') -> 02161

datetime('06/10/2002','U','N') -> 10 Jun 2002

datetime('06/10/2002','U','O') -> 02/06/10

datetime('06/10/2002','U','S') -> 20020610

datetime('06/10/2002','U','U') -> 06/10/02

datetime('06/10/2002','U','XE') -> 10/06/2002

datetime('06/10/2002','U','XJ') -> 2002161

datetime('06/10/2002','U','XO') -> 2002/06/10

datetime('06/10/2002','U','XU') -> 06/10/2002

datetime(,,,,,,'+00:05:00') -> 06/11/02 11:57:14

datetime(,,'E',,,,'+00:05:00') -> 11/06/02 11:57:14

datetime(,,'J',,,,'+00:05:00') -> 02162 11:57:14

datetime(,,'N',,,,'+00:05:00') -> 11 Jun 2002 11:57:14

datetime(,,'O',,,,'+00:05:00') -> 02/06/11 11:57:14

datetime(,,'S',,,,'+00:05:00') -> 20020611 11:57:14

datetime(,,'U',,,,'+00:05:00') -> 06/11/02 11:57:14

datetime(,,'XE',,,,'+00:05:00') -> 11/06/2002 11:57:14

datetime(,,'XJ',,,,'+00:05:00') -> 2002162 11:57:14

datetime(,,'XO',,,,'+00:05:00') -> 2002/06/11 11:57:14

datetime(,,'XU',,,,'+00:05:00') -> 06/11/2002 11:57:14

Page 118: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Date and Time Functions

118 Integrated Resource Manager Functions and Other Facilities Version 500

DAY2BASE - Date to Base Date FunctionConverts a USA format date to a Base Date; the number of complete days since January 1, 0001. This number includes the base date, January 1, 0001, but does not include the specified date, since it is not complete. Returns the numeric Base Date for the date.

This function can be used in conjunction with the BASE2DAY() REXX function to perform numeric calculations on dates.

Syntax

>>----DAY2BASE(date)-----------<<

Notes

The Base Date value used by this function is equivalent to that produced by the built-in REXX function DATE(), using the Base option.

date('B') = day2base(date('U'))

The following example is provided to illustrate the combined use of the BASE2DAY() and DAY2BASE() functions to perform numeric calculations on dates:

this_date = '12/31/1999 >>> "12/31/1999"this_base = day2base(this_date) >>> "730118"next_base = this_base + 1 >>> "730119"next_date = base2day(next_base,'X') >>> "01/01/2000"

date USA format date, MM/DD/YY or MM/DD/YYYY, required. If not specified, the century defaults to the current system century.

Page 119: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 119

Date and Time Functions

Examplesday2base('06/10/02') -> 731010

day2base('06/10/2002') -> 731010

day2base('06/10/1902') -> 694485

day2base('06/10/2102') -> 767534

day2base('01/01/00') -> 730119

day2base('01/01/0000') -> -366

day2base('01/01/01') -> 730485

day2base('01/01/0001') -> 0

day2base('12/31/99') -> 766643

day2base('12/31/9999') -> 3652058

Page 120: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Date and Time Functions

120 Integrated Resource Manager Functions and Other Facilities Version 500

DAY2CENT - Date to Day-of-Century FunctionConverts a USA format date to a Day-of-Century. Returns the numeric Day-of-Century for the date.

This function can be used in conjunction with the CENT2DAY() REXX function to perform numeric calculations on dates.

Syntax

>>----DAY2CENT(date)-----------<<

Notes

The Day-of-Century value used by this function is equivalent to that produced by the built-in REXX function DATE(), using the Century option.

date('C') = day2cent(date('U'))

The following example is provided to illustrate the combined use of the CENT2DAY() and DAY2CENT() functions to perform numeric calculations on dates:

this_date = '12/31/1999' >>> "12/31/1999"this_cent = day2cent(this_date) >>> "36524"next_cent = this_cent + 1 >>> "36525"next_date = cent2day(next_cent,'X','19') >>> "01/01/2000"

Examplesday2cent('06/11/02') -> 893

day2cent('06/11/2002') -> 893

day2cent('06/11/1902') -> 892

day2cent('06/10/2102') -> 891

day2cent('03/01/1900') -> 60

day2cent('02/29/2000') -> 60

day2cent('01/01/1900') -> 1

day2cent('01/01/2000') -> 1

day2cent('12/31/1999') -> 36524

day2cent('12/31/2099') -> 36525

date USA format date, MM/DD/YY or MM/DD/YYYY, required. If not specified,the century defaults to the current system century.

Page 121: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 121

Date and Time Functions

GMT - Greenwich Mean Time FunctionReturns the system-maintained Greenwich Mean Time differential. The result will be returned in the following format: HH.hhh or -HH.hhh. The sign is added if the GMT is negative; i.e. the local time zone is west of Greenwich, England.

Syntax

>>----GMT()----------<<

There are no arguments for this function.

Examplesgmt() -> -8.000

Page 122: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Date and Time Functions

122 Integrated Resource Manager Functions and Other Facilities Version 500

LEAPYEAR - Leap Year FunctionDetermines if the specified year is a leap year. Returns 1 if the year is a leap year and 0 if not.

Syntax

>>----LEAPYEAR(year)----------<<

year Year value, optional. The current year will be used if the argument is omitted. Valid formats are:� YY Numeric year� YYDDD Julian format� DD Mon YYYY Normal format� YY/MM/DDO Ordered format� YYYYMMDD Sorted format� MM/DD/YY USA format� DD/MM/YY European format� YYYY Extended numeric year� YYYYDDD Extended Julian format� YYYY/MM/DD Extended ordered format� MM/DD/YYYY Extended USA format� DD/MM/YYYY Extended European format

Ordered format dates must be specified in the form:

yy/mm/dd||'O' or date||O

This syntax is used to distinguish an ordered format date from either a USA or European format date.

The format of the argument is determined by its length and, therefore, year must not contain leading or trailing blanks.

Page 123: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 123

Date and Time Functions

Examplesleapyear('00') -> 1

leapyear('00161') -> 1

leapyear('10 Jun 2000') -> 1

leapyear('00/06/10O') -> 1

leapyear('20000610') -> 1

leapyear('06/10/00') -> 1

leapyear('10/06/00') -> 1

leapyear('2000') -> 1

leapyear('2000161') -> 1

leapyear('2000/06/10') -> 1

leapyear('06/10/2000') -> 1

leapyear('10/06/2000') -> 1

leapyear('1600') -> 1

leapyear('1700') -> 0

leapyear('1800') -> 0

leapyear('1900') -> 0

leapyear('2001') -> 0

leapyear('2002') -> 0

yearcont.

The argument must be specified in one of the described formats, but only century and year are considered significant and validated. All other characters in the argument are ignored with the exception that, in some cases, slashes are used to determine the format of the argument.

Page 124: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Date and Time Functions

124 Integrated Resource Manager Functions and Other Facilities Version 500

TIMEPART - Time Segment FunctionReturns the requested segment of the current time. The hour, minutes, or seconds will be returned as a two-character numeric value.

Syntax

>>----TIMEPART(segment)----------<<

Examplestimepart() -> 13

timepart('H') -> 13

timepart('M') -> 17

timepart('S') -> 05

segment Requested segment of the current time, optional. Valid values are:� H Hours� M Minutes� S Seconds

If segment is not specified, it defaults to HOUR. Only the first character of the argument keyword is significant; all others are ignored.

Page 125: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 125

Date and Time Functions

TIME2BDS - Time to Base-in-Seconds FunctionConverts an ordered or extended ordered format date and time value to a Base-in-Seconds, BDS, value. The BDS value can be returned in eight byte binary format, 16 byte hexadecimal format or 12 byte numeric format. If the numeric format is specified, the resulting BDS value is padded to the left with leading zeroes, if necessary, to form a 12 byte result.

Syntax

>>----TIME2BDS(datetime,format,gmt,time)----------<<

datetime Date and time value, optional. Valid formats for datetime are ordered format date and time:

(YY/MM/DD HH:MM:SS)

and extended ordered format date and time:

(YYYY/MM/DD HH:MM:SS).

The default value for this argument is the current date and time; the current BDS value will be returned. If century is not specified, the century defaults to the current system century.

The time value can be qualified to any part of a second or omitted. Any part of the time value that is omitted will default to zero.

The time value can be qualified to the millionth-second level, i.e. SS.SSSSSS. This is included for compatibility with existing functions, but the information is not used by this function. Any value specified beyond the full second level is ignored by this function.

format Output format, optional. Valid values are:� BINARY 8 byte binary BDS value� HEX 16 byte hexadecimal BDS value� X 16 byte hexadecimal BDS value� NUMERIC 12 byte numeric BDS value

If format is not specified, it defaults to BINARY. Only the first character in the argument keyword is significant; all others are ignored.

Page 126: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Date and Time Functions

126 Integrated Resource Manager Functions and Other Facilities Version 500

Notes

The Base Date value used by this function is equivalent to that produced by the built-in REXX function DATE(), using the Base option.

Examplestime2bds() -> ????????

time2bds('02/06/11 15:30:00') -> ????????

time2bds('2002/06/11 15:30:00') -> ????????

time2bds('2002/06/11 15:30:00','B') -> ????????

time2bds('2002/06/11 15:30:00','H') -> 0000000EB49870E8

time2bds('2002/06/11 15:30:00','X') -> 0000000EB49870E8

time2bds('2002/06/11 15:30:00','N') -> 063159431400

time2bds('2002/06/11 15:30:00','X',0) -> 0000000EB4980E78

time2bds('2002/06/11 15:30:00','X',-8) -> 0000000EB4987EF8

time2bds('2002/06/11 15:30:00','X',+8) -> 0000000EB4979DF8

time2bds('2002/06/11 15:30:00','X',-1) -> 0000000EB49862D8

time2bds('2002/06/11 15:30:00','X',+1) -> 0000000EB4987EF8

gmt The Greenwich Mean Time differential to be used for time calculations, optional.

The argument must be numeric and in the form +/-HH.hhh or +/-HH:MM:SS and in the range 00:00:00 to 23:59:59. If not specified, the argument defaults to the system-maintained GMT differential.

time Time value to add to or subtract from the date and time, optional. Time must be numeric and in the form +/-HH.hhh or +/-HH:MM:SS. The maximum adjustment is +/-99:59:59.

Page 127: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 127

Date and Time Functions

TIME2TOD - Time to Time-of-Day FunctionConverts an ordered or extended ordered format date and time value to a system STCK TOD stamp in either eight byte binary format or 16 byte hexadecimal format. Returns the TOD stamp in the requested format4.

Syntax

>>----TIME2TOD(datetime,format,gmt,time)----------<<

4. See IBM Corporation, Enterprise Systems Architecture/390 - Principles of Opera-tion, SA22-7201-02, (Poughkeepsie, NY:IBM, 1990,1994), for a complete descrip-tion of the Time-of-Day (TOD) clock.

datetime Date and time value, optional. Valid values are:

YY/MM/DD HH:MM:SS.SSSSSS

and extended ordered format date and time:

YYYY/MM/DD HH:MM:SS.SSSSSS

The default value for this argument is the current date and time; the current TOD stamp will be returned. If century is not specified, the century defaults to the current system century.

The time value can be qualified to any part of a second or omitted. Any part of the time value that is omitted will default to zero.

format Output format option, optional. Valid values are:� BINARY 8 byte binary TOD stamp� HEX 16 byte hexadecimal TOD stamp� X 16 byte hexadecimal TOD stamp

If format is not specified, it defaults to BINARY. Only the first character in the argument keyword is significant; all others are ignored.

Page 128: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Date and Time Functions

128 Integrated Resource Manager Functions and Other Facilities Version 500

Examplestime2tod() -> ????????

time2tod('02/06/11 15:30:00.000000') -> ????????

time2tod('2002/06/11 15:30:00.000000') -> ????????

time2tod('2002/06/11 15:30:00.000000','B') -> ????????

time2tod('2002/06/11 15:30:00.000000','H') -> B7C3C5A60EA00000

time2tod('2002/06/11 15:30:00.000000','X') -> B7C3C5A60EA00000

time2tod('2002/06/11 15:30:00.000000','X',0) -> B7C367C576E00000

time2tod('2002/06/11 15:30:00.000000','X',-8) -> B7C3D30F48E00000

time2tod('2002/06/11 15:30:00.000000','X',+8) -> B7C2FC7BA4E00000

time2tod('2002/06/11 15:30:00.000000','X',,-1)-> B7C3B83CD4600000

time2tod('2002/06/11 15:30:00.000000','X',,+1)-> B7C3D30F48E00000

gmt The Greenwich Mean Time differential to be used for time calculations, optional.

The argument must be numeric and in the form +/-HH.hhh or +/-HH:MM:SS; and in the range 00:00:00 to 23:59:59. If not specified, the argument defaults to the system-maintained GMT differential.

time Time value to add to or subtract from the date and time, optional. Time must be numeric and in the form +/-HH.hhh or +/-HH:MM:SS. The maximum adjustment is +/-99:59:59.

Page 129: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 129

Date and Time Functions

TOD - Time-of-Day FunctionReturns the current system TOD stamp in either eight byte binary format or 16 byte hexadecimal format.

Syntax

>>----TOD(format)----------<<

Examplestod() -> ????????

tod(B) -> ????????

tod('H') -> B7C3CEBF3E1A8F22

tod('X') -> B7C3CEBF3E1EA102

format Output format option, optional. Valid values are:� BINARY 8 byte binary TOD stamp� HEX 16 byte hexadecimal TOD stamp� X 16 byte hexadecimal TOD stamp

If format is not specified, it defaults to BINARY. Only the first character in the argument keyword is significant; all others are ignored.

Page 130: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Date and Time Functions

130 Integrated Resource Manager Functions and Other Facilities Version 500

TOD2BDS - Time-of-Day to BDS FunctionConverts a Time-of-Day value to a Base-in-Seconds value. Returns the Base Date in seconds in eight byte binary format, 16 byte hexadecimal format or 12 byte numeric format. If the numeric format is specified, the resulting BDS value will be padded to the left with leading zeroes, if necessary, to form a 12 byte result.

Syntax

>>----TOD2BDS(tod,format)-----------<<

Notes

The Base Date value used by this function is equivalent to that produced by the built-in REXX function DATE(), using the Base option.

tod Eight byte binary or 16 byte hexadecimal system STCK TOD stamp, required.

format Output format, optional. Valid values are:� BINARY 8 byte binary BDS value� HEX 16 byte hexadecimal BDS value� X 16 byte hexadecimal BDS value� NUMERIC 12 byte numeric BDS value

If format is not specified, it defaults to BINARY. Only the first character in the argument keyword is significant; all others are ignored.

Page 131: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 131

Date and Time Functions

Examplestod2bds(????????) -> ????????

(TOD=2002/06/11 15:30:00)

tod2bds(????????,'H') -> 0000000EB49870E8 (TOD=2002/06/11 15:30:00)

tod2bds(????????,'X') -> 0000000EB49870E8(TOD=2002/06/11 15:30:00)

tod2bds(????????,'N') -> 063159431400(TOD=2002/06/11 15:30:00)

tod2bds('ADB68DD1F3C00000') -> ???????? (TOD=2002/06/11 15:30:00)

tod2bds('ADB68DD1F3C00000','H') -> 0000000EB49870E8 (TOD=2002/06/11 15:30:00)

tod2bds('ADB68DD1F3C00000','X') -> 0000000EB49870E8 (TOD=2002/06/11 15:30:00)

tod2bds('ADB68DD1F3C00000','N') -> 063159431400(TOD=2002/06/11 15:30:00)

Page 132: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Date and Time Functions

132 Integrated Resource Manager Functions and Other Facilities Version 500

TOD2TIME - Time-of-Day to Time FunctionConverts a system STCK TOD stamp to an Ordered or Extended Ordered format date and time value. The TOD stamp can be specified in either eight byte binary format or sixteen byte hexadecimal format. Returns the date and time value in the requested format.5

Syntax

>>----TOD2TIME(tod,format,gmt,time)----------<<

5. See IBM Corporation, Enterprise Systems Architecture/390 - Principles of Opera-tion, SA22-7201-02, (Poughkeepsie, NY.:IBM, 1990,1994), for a complete descrip-tion of the Time-of-Day (TOD) clock.

tod Eight byte binary or 16 byte hexadecimal system STCK TOD stamp, optional. If TOD is not specified, the current system TOD value will be used (STCK).

format Output format option, optional. Valid values are:� STANDARD YY/MM/DD HH:MM:SS.SSSSSS� EXTENDED YYYY/MM/DD HH:MM:SS.SSSSSS� X YYYY/MM/DD HH:MM:SS.SSSSSS

If format is not specified, it defaults to EXTENDED. Only the first character in the argument keyword is significant; all others are ignored.

gmt The Greenwich Mean Time differential to be used for time calculations, optional. The argument must be numeric and in the form +/-HH.hhh or +/-HH:MM:SS and in the range 00:00:00 to 23:59:59. If not specified, the argument defaults to the system-maintained GMT differential.

time Time value to add to or subtract from the date and time, optional. Time must be numeric and in the form +/-HH.hhh or +/-HH:MM:SS. The maximum adjustment is +/-99:59:59.

Page 133: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 133

Date and Time Functions

Examplestod2time() -> 2002/06/11 16:30:35.290280

tod2time(????????) -> 2002/06/11 15:30:00.000000

tod2time('B7C3C5A60EA00000') -> 2002/06/11 15:30:00.000000

tod2time('B7C3C5A60EA00000','S') -> 02/06/11 15:30:00.000000

tod2time('B7C3C5A60EA00000','E') -> 2002/06/11 15:30:00.000000

tod2time('B7C3C5A60EA00000','X') -> 2002/06/11 15:30:00.000000

tod2time('B7C3C5A60EA00000','X',0) -> 2002/06/11 22:30:00.000000

tod2time('B7C3C5A60EA00000','X',-8) -> 2002/06/11 14:30:00.000000

tod2time('B7C3C5A60EA00000','X',+8) -> 2002/06/12 06:30:00.000000

tod2time('B7C3C5A60EA00000','X',,-1) -> 2002/06/11 14:30:00.000000

tod2time('B7C3C5A60EA00000','X',,+1) -> 2002/06/11 16:30:00.000000

Page 134: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Date and Time Functions

134 Integrated Resource Manager Functions and Other Facilities Version 500

WEEKDAY - Date to Day-of-Week FunctionReturns the Day-of-Week, the English name for the day of the week in mixed case for the specified date, for example, Sunday. The date may be specified in USA or Extended USA format.

Syntax

>>----WEEKDAY(date)----------<<

Notes

The Base Date value used by this function is equivalent to that produced by the built-in REXX function DATE() using the Base option.

Examplesweekday('06/09/2002') -> Sunday

weekday('06/10/2002') -> Monday

weekday('06/11/2002') -> Tuesday

weekday('06/12/2002') -> Wednesday

weekday('06/13/2002') -> Thursday

weekday('06/14/2002') -> Friday

weekday('06/15/2002') -> Saturday

weekday('06/09/1902') -> Monday

weekday('06/09/2102') -> Friday

weekday('06/09/0000') -> Friday

weekday('06/09/9999') -> Wednesday

date USA format date, MM/DD/YY or MM/DD/YYYY, required. If not specified, the century defaults to the current system century.

Page 135: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 135

AF/OPERATOR Functions

AF/OPERATOR Functions

FINDLGN - Find Logon FunctionSearches for the specified AF/OPERATOR logon environment. Returns 1 if the environment is found and 0 if not.

Syntax

>>----FINDLGN(applname)----------<<

Examplesfindlgn('CICSA') -> 1

findlgn('cicsa') -> 1

findlgn('CICSA') -> 0

applname Application session name as used in the AF/OPERATOR ADDRESS command to identify the environment, required. Application session names can be a maximum of eight characters.

Page 136: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

AF/OPERATOR Functions

136 Integrated Resource Manager Functions and Other Facilities Version 500

FINDMAT - Find Match FunctionReturns the current match number for the specified trap. If no match is found, returns a null value. If more than one match is found, all match numbers are returned as a string of words, each separated by a blank, sorted in ascending match number order.

Syntax

>>----FINDMAT(trapname,traptype)----------<<

trapname Name of the trap that created the match, required. The trapname can be a maximum of 24 characters. A pattern using a high-level qualifier followed by an asterisk can be specified for the trap name. For example, a trap name search pattern of ABCDE* will match any trap name start-ing with the five characters: ABCDE.

traptype Type of trap that created the match, optional. Valid values are:� * Any trap� Any Any trap� Cmd Command trap� Dom DOM event trap� Tod Time-of-Day trap� Nvi NetView interface trap� Omm APPC Communication trap� Wto Write-to-Operator trap� XOM OMEGAMON/MVS exception trap� XOC OMEGAMON/CIC exception trap� XOI OMEGAMON/IMS exception trap� XO2 OMEGAMON/DB2 exception trap

If not specified, traptype will default to Tod. Only the captialized letter(s) is significant; all others are ignored.

Page 137: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 137

AF/OPERATOR Functions

Examplesfindmat('@R1494Q') -> 7978

findmat('@R1494Q','T') -> 7978

findmat('@r1494q','t') -> 7978

findmat('@R1494Q') -> '' (null value - match not found)

findmat('@R1491Q','W') -> '' (null value - WTO match not found)

Page 138: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

AF/OPERATOR Functions

138 Integrated Resource Manager Functions and Other Facilities Version 500

LOGMSG - Log Message FunctionWrites a message to the AF/OPERATOR message log or to the SYSTSPRT DD in a non-AF/OPERATOR REXX environment. Returns 1 if the message was successfully written to the log and 0 if not.

Syntax

>>----LOGMSG(msg,log)----------<<

Exampleslogmsg('Write to message log') -> 1

logmsg('Write to message log','M') -> 1

logmsg('Write to the user log','U')-> 1 (message written to user log)

logmsg('User logs not defined','U')-> 0 (msg not written to user log)

msg Message text, required. A maximum of 480 characters is allowed for message text. If more than 480 characters are specified, the text will be truncated.

log Log to write the message to, optional. Valid values are:� MSG1 AF/OPERATOR Message Log� USER AF/OPERATOR User Message Log

If log is not specified, it defaults to MSG1. Only the first character in the argument keyword is significant; all others are ignored.In a non-AF/OPERATOR environment, this argument is ignored. The message will always be written to the SYSTSPRT DD.

Page 139: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 139

AF/OPERATOR Functions

P2PCOM1 - Peer-to-Peer COM1 Active FunctionDetermines whether or not the Peer-to-Peer COM1 facility is active. Returns 1 if COM1 is active and 0 if not.

Syntax

>>----P2PCOM1()----------<<

There are no arguments for this function.

Examplesp2pcom1() -> 1

p2pcom1() -> 0

Page 140: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

AF/OPERATOR Functions

140 Integrated Resource Manager Functions and Other Facilities Version 500

P2PLINK - Peer-to-Peer Link Active FunctionDetermines whether or not the specified Peer-to-Peer link is active. Returns 1 if the specified link is active and 0 if the link is inactive, or can not be found.

Syntax

>>----P2PLINK(linkid)----------<<

Examplesp2plink('S090') -> 1

p2plink('S090') -> 0 (link is inactive)

p2plink('JUNK') -> 0 (linkid not found)

linkid The local system and/or subsystem name of the remote peer AF/OPERATOR address space, required. The linkid specified here is the same value as is used in a PEERLINK command for the remote peer.

The linkid is defined via the LINKID() parameter in the remote peer's parameter member. The linkid can be a maximum of eight characters.

Page 141: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 141

IMS Functions

IMS Functions

IMSDCRDY - IMS DC Ready FunctionDetermines if the specified IMS control region Data Communication facility is initialized and processing VTAM logons. Returns a 1 if IMS DC is active and 0 if not.

Syntax

>>----IMSDCRDY(ssid)----------<<

Notes

The IMSDCRDY() function supports the following versions/releases of IMS/ESA:� IMS/ESA Release 3.1� IMS/ESA Release 4.1� IMS/ESA Release 5.1� IMS/ESA Release 6.1� IMS/ESA Release 7.1

This function must be invoked in an authorized REXX environment. Calling this function while running unauthorized results in a syntax error.

Examplesimsdcrdy('IMS5') -> 1

imsdcrdy('ims5') -> 1

imsdcrdy('IMSN') -> 0 (DC not active)

imsdcrdy('JUNK') -> 0 (SSID not found)

ssid Specifies the subsystem ID of the IMS control region, required. A maximum of four characters is allowed.

Page 142: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

IMS Functions

142 Integrated Resource Manager Functions and Other Facilities Version 500

IMSREADY - IMS Ready FunctionDetermines if the specified IMS control region subsystem is active, initialized, and ready to accept dependent regions. Returns a 1 if the IMS control region is ready and 0 if not.

Syntax

>>----IMSREADY(ssid)----------<<

Notes

The IMSREADY() function supports the following versions/releases of IMS/ESA:� IMS/ESA Release 3.1� IMS/ESA Release 4.1� IMS/ESA Release 5.1� IMS/ESA Release 6.1� IMS/ESA Release 7.1

This function must be invoked in an authorized REXX environment. Calling this function while running unauthorized results in a syntax error.

Examplesimsdcrdy('IMS5') -> 1

imsdcrdy('ims5') -> 1

imsdcrdy('IMSN') -> 0 (IMS not ready)

imsdcrdy('JUNK') -> 0 (SSID not found)

ssid Specifies the subsystem ID of the IMS control region, required. A maximum of four characters is allowed.

Page 143: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 143

JES3 Functions

JES3 Functions

J3ACTIVE - JES3 Active FunctionDetermines if the JES3 task and subsystem are active. Returns 1 if the JES3 task/subsystem are both active and 0 if not.

Syntax

>>----J3ACTIVE()----------<<

There are no arguments for this function.

Examplesj3active() -> 1

j3active() -> 0

Page 144: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

JES3 Functions

144 Integrated Resource Manager Functions and Other Facilities Version 500

J3CLASS - JES3 Job Class FunctionDetermines if the user-supplied JES3 job class is active on the user supplied JES3 main name. Returns 1 if the class is active and 0 if not.

Syntax

>>----J3CLASS(class,mainid)----------<<

Notes

This function can be called only when running on the JES3 global processor.

The J3CLASS() function supports the following versions/releases of JES3:� MVS/ESA Release 5.2.1 (HJS5521)� MVS/ESA Release 5.2.2 (OS39013)� OS/390 Release 1.1.0 (HJS6601)� OS/390 Release 1.3.0 (HJS6603)� OS/390 Release 2.4.0 (HJS6604)� OS/390 Release 2.5.0 (HJS6605)� OS/390 Release 2.6.0 (HJS6606)� OS/390 Release 2.8.0 (HJS6608)� OS/390 Release 2.9.0 (HJS6609)� OS/390 Release 2.10.0 (HJS7703)� z/OS Release 1.1.0 (HJS7703)� z/OS Release 1.2.0 (HJS7705)� z/OS Release 1.3.0 (HJS7705)

This function must be invoked in an authorized REXX environment. Calling this function while running unauthorized results in a syntax error.

class JES3 job class, required. A maximum of eight characters is allowed.

mainid JES3 main name, required. A maximum of eight charac-ters is allowed.

Page 145: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 145

JES3 Functions

Examplesj3class('A','SF') -> 1

j3class('a','sf') -> 1

j3class('5','SF') -> 0 (class not active)

j3class('JUNK','SF') -> 0 (class not defined)

j3class('A','JUNK') -> 0 (mainid not defined)

Page 146: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

JES3 Functions

146 Integrated Resource Manager Functions and Other Facilities Version 500

J3DEVICE - JES3 Device FunctionDetermines if the user-specified device is a JES3 device. Returns 1 if the device is controlled by JES3 and 0 if not.

Syntax

>>----J3DEVICE(devaddr)----------<<

Examplesj3device(440) -> 1

j3device(0440) -> 1

j3device(0B41) -> 1 (TAPE device)

j3device(001C) -> 0 (COMM device)

j3device(050C) -> 0 (CTC device)

j3device(08D0) -> 0 (DASD device)

j3device(0410) -> 0 (DISP device)

j3device(003C) -> 1 (UREC device)

devaddr Address, or hexadecimal number, of the device, required. A maximum of four characters is allowed. If necessary, this argument is padded with leading zeros to form a four char-acter device address.

Page 147: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 147

JES3 Functions

J3GLBID - JES3 Global Main ID FunctionReturns the JES3 main name of the global processor.

Syntax

>>----J3GLBID()----------<<

There are no arguments for this function.

Notes

This function can be called when running on a JES3 global or local processor.

The J3GLBID() function supports the following versions/releases of JES3:� MVS/ESA Release 5.2.1 (HJS5521)� MVS/ESA Release 5.2.2 (OS39013)� OS/390 Release 1.1.0 (HJS6601)� OS/390 Release 1.3.0 (HJS6603)� OS/390 Release 2.4.0 (HJS6604)� OS/390 Release 2.5.0 (HJS6605)� OS/390 Release 2.6.0 (HJS6606)� OS/390 Release 2.8.0 (HJS6608)� OS/390 Release 2.9.0 (HJS6609)� OS/390 Release 2.10.0 (HJS7703)� z/OS Release 1.1.0 (HJS7703)� z/OS Release 1.2.0 (HJS7705)� z/OS Release 1.3.0 (HJS7705)

This function must be invoked in an authorized REXX environment. Calling this function while running unauthorized results in a syntax error.

Examplesj3glbid() -> SF

j3glbid() -> CF

Page 148: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

JES3 Functions

148 Integrated Resource Manager Functions and Other Facilities Version 500

J3GLOBAL - JES3 Global FunctionDetermines if this system is the JES3 Global Main processor. Returns 1 if this is the JES3 global processor and 0 if not. If JES3 is inactive when this function is invoked, a 0 will be returned.

Syntax

>>----J3GLOBAL()----------<<

There are no arguments for this function.

Notes

This function can be called when running on a JES3 global or local processor.

Examplesj3global() -> 1

j3global() -> 0

Page 149: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 149

JES3 Functions

J3GROUP - JES3 Job Group FunctionDetermines if the user-supplied JES3 job group is active on the user-supplied JES3 main name. Returns 1 if the group is active and 0 if not.

Syntax

>>----J3GROUP(group,mainid)----------<<

Notes

This function can be called only when running on the JES3 global processor.

The J3GROUP() function supports the following versions/releases of JES3:� MVS/ESA Release 5.2.1 (HJS5521)� MVS/ESA Release 5.2.2 (OS39013)� OS/390 Release 1.1.0 (HJS6601)� OS/390 Release 1.3.0 (HJS6603)� OS/390 Release 2.4.0 (HJS6604)� OS/390 Release 2.5.0 (HJS6605)� OS/390 Release 2.6.0 (HJS6606)� OS/390 Release 2.8.0 (HJS6608)� OS/390 Release 2.9.0 (HJS6609)� OS/390 Release 2.10.0 (HJS7703)� z/OS Release 1.1.0 (HJS7703)� z/OS Release 1.2.0 (HJS7705)� z/OS Release 1.3.0 (HJS7705)

This function must be invoked in an authorized REXX environment. Calling this function while running unauthorized results in a syntax error.

group JES3 job group, required. A maximum of eight characters is allowed.

mainid JES3 main name, required. A maximum of eight charac-ters is allowed.

Page 150: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

JES3 Functions

150 Integrated Resource Manager Functions and Other Facilities Version 500

Examplesj3group('GIMS','SF') -> 1

j3group('gims','sf') -> 1

j3group('GIMS','SF') -> 0 (group not active)

j3group('JUNK','SF') -> 0 (group not defined)

j3group('GIMS','JUNK') -> 0 (mainid not defined)

Page 151: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 151

JES3 Functions

J3INITS - JES3 Job Initiators FunctionReturns the number of defined initiators for the user-supplied JES3 job group on the user-supplied JES3 main name. If the job group or main name is not found, a null value will be returned.

Syntax

>>----J3INITS(group,mainid)----------<<

Notes

This function can only be called when running on the JES3 global processor.

The J3INITS() function supports the following versions/releases of JES3:� MVS/ESA Release 5.2.1 (HJS5521)� MVS/ESA Release 5.2.2 (OS39013)� OS/390 Release 1.1.0 (HJS6601)� OS/390 Release 1.3.0 (HJS6603)� OS/390 Release 2.4.0 (HJS6604)� OS/390 Release 2.5.0 (HJS6605)� OS/390 Release 2.6.0 (HJS6606)� OS/390 Release 2.8.0 (HJS6608)� OS/390 Release 2.9.0 (HJS6609)� OS/390 Release 2.10.0 (HJS7703)� z/OS Release 1.1.0 (HJS7703)� z/OS Release 1.2.0 (HJS7705)� z/OS Release 1.3.0 (HJS7705)

This function must be invoked in an authorized REXX environment. Calling this function while running unauthorized results in a syntax error.

group JES3 job group, required. A maximum of eight characters is allowed.

mainid JES3 main name, required. A maximum of eight charac-ters is allowed.

Page 152: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

JES3 Functions

152 Integrated Resource Manager Functions and Other Facilities Version 500

Examplesj3inits('GIMS','SF') -> 4

j3inits('gims','sf') -> 4

j3inits('JUNK','SF') -> '' (null value - group not defined)

j3inits('GIMS','JUNK') -> '' (null value - mainid not defined)

Page 153: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 153

JES3 Functions

J3NJECNS - JES3 NJE Console FunctionDetermines if JES3 NJE console support is active. Returns 1 if NJECONS is active and 0 if not.

Syntax

>>----J3NJECNS()----------<<

There are no arguments for this function.

Notes

This function can be called only when running on the JES3 global processor.

The J3NJECNS() function supports the following versions/releases of JES3:� MVS/ESA Release 5.2.1 (HJS5521)� MVS/ESA Release 5.2.2 (OS39013)� OS/390 Release 1.1.0 (HJS6601)� OS/390 Release 1.3.0 (HJS6603)� OS/390 Release 2.4.0 (HJS6604)� OS/390 Release 2.5.0 (HJS6605)� OS/390 Release 2.6.0 (HJS6606)� OS/390 Release 2.8.0 (HJS6608)� OS/390 Release 2.9.0 (HJS6609)� OS/390 Release 2.10.0 (HJS7703)� z/OS Release 1.1.0 (HJS7703)� z/OS Release 1.2.0 (HJS7705)� z/OS Release 1.3.0 (HJS7705)

This function must be invoked in an authorized REXX environment. Calling this function while running unauthorized results in a syntax error.

Examplesj3njecns() -> 1

j3njecns() -> 0

Page 154: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

JES3 Functions

154 Integrated Resource Manager Functions and Other Facilities Version 500

J3RJPWS - JES3 SNA/RJP Workstation FunctionDetermines if the user-supplied SNA/RJP device, for the user-supplied JES3 SNA/RJP workstation, is active. Returns 1 if the SNA/RJP device is active and 0 if not.

Syntax

>>----J3RJPWS(wsname,wsdevice)----------<<

Notes

This function can be called only when running on the JES3 global processor.

The J3RJPWS() function supports the following versions/releases of JES3:� MVS/ESA Release 5.2.1 (HJS5521)� MVS/ESA Release 5.2.2 (OS39013)� OS/390 Release 1.1.0 (HJS6601)� OS/390 Release 1.3.0 (HJS6603)� OS/390 Release 2.4.0 (HJS6604)� OS/390 Release 2.5.0 (HJS6605)� OS/390 Release 2.6.0 (HJS6606)� OS/390 Release 2.8.0 (HJS6608)� OS/390 Release 2.9.0 (HJS6609)� OS/390 Release 2.10.0 (HJS7703)� z/OS Release 1.1.0 (HJS7703)� z/OS Release 1.2.0 (HJS7705)� z/OS Release 1.3.0 (HJS7705)

This function must be invoked in an authorized REXX environment. Calling this function while running unauthorized results in a syntax error.

wsname JES3 SNA/RJP workstation name, required. A maximum of five characters is allowed.

wsdevice Device name for the SNA/RJP workstation, required. A maximum of eight characters is allowed.

Page 155: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 155

JES3 Functions

Examplesj3rjpws('T02J1','T02J1PR1')-> 1

j3rjpws('t02j1','t02j1pr1')-> 1

j3rjpws('T02J1','T02J1PR1')-> 0 (wsname not active)

j3rjpws('JUNK1','T02J1PR1')-> 0 (wsname not defined)

j3rjpws('T02J1','JUNK1PR1')-> 0 (device not defined)

Page 156: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

JES3 Functions

156 Integrated Resource Manager Functions and Other Facilities Version 500

J3SEQNO - JES3 Sequence Number FunctionReturns a two character JES3 main sequence number for the user-supplied JES3 main processor name or 00 if the specified processor cannot be found.

Syntax

>>----J3SEQNO(mainid)----------<<

Notes

This function can be called only when running on the JES3 global processor.

The J3SEQNO() function supports the following versions/releases of JES3:� MVS/ESA Release 5.2.1 (HJS5521)� MVS/ESA Release 5.2.2 (OS39013)� OS/390 Release 1.1.0 (HJS6601)� OS/390 Release 1.3.0 (HJS6603)� OS/390 Release 2.4.0 (HJS6604)� OS/390 Release 2.5.0 (HJS6605)� OS/390 Release 2.6.0 (HJS6606)� OS/390 Release 2.8.0 (HJS6608)� OS/390 Release 2.9.0 (HJS6609)� OS/390 Release 2.10.0 (HJS7703)� z/OS Release 1.1.0 (HJS7703)� z/OS Release 1.2.0 (HJS7705)� z/OS Release 1.3.0 (HJS7705)

This function must be invoked in an authorized REXX environment. Calling this function while running unauthorized results in a syntax error.

mainid JES3 Main name, required. A maximum of eight charac-ters is allowed.

Page 157: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 157

JES3 Functions

Examplesj3seqno('SF') -> 01

j3seqno('sf') -> 01

j3seqno('JUNK') -> 00

Page 158: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Functions

158 Integrated Resource Manager Functions and Other Facilities Version 500

REXX Functions

EXECDROP - Drop an EXEC FunctionDrops an exec from storage. Returns 1 if the exec was successfully dropped, or was already dropped, and 0 if the drop was unsuccessful.

Syntax

>>----EXECDROP(execnm,execdd)----------<<

Examplesexecdrop('@RCFMAIN')-> 1

execdrop('@rcfmain')-> 1

execdrop('@TDP@OMV')-> 0 (drop unsuccessful)

execdrop('GARBAGE') -> 0 (exec not in storage)

execnm Name of the exec to drop, required. The exec name can be a maximum of eight characters.

execdd The DD name from which the exec was loaded, optional. The DD name can be a maximum of eight characters.

If the execdd argument is not specified, the DD name specified in the LOADDD field of the Module Names Table will be used.

Page 159: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 159

REXX Functions

EXECLOAD - Load an EXEC FunctionLoads an exec into storage. Returns 1 if the exec was successfully loaded, or was already in storage, and 0 if the load was unsuccessful.

Syntax

>>----EXECLOAD(execnm,execdd,option)----------<<

execnm Name of the exec to load, required. The exec name can be a maximum of eight characters.

execdd The DD name from which to load the exec, optional. The DD name can be a maximum of eight characters.

If the execdd argument is not specified, the DD name specified in the LOADDD field of the Module Names Table will be used.

If the execdd argument is specified, the dataset which contains the exec must be allocated to the DD prior to the call to this function.

option Valid value is:� FORCE

The Force option may be used to bypass the status check and force the exec to be loaded, or re-loaded, into storage.

If the option is omitted, the status of the exec is checked before the exec is loaded. If the exec is already loaded, the load will be bypassed and a 1 will be returned.

The FORCE option will bypass the status check and cause the function to attempt to load the exec even if it is already in storage. The FORCE option may be used to reload an exec or to increase the in-use count for an exec running under AF/OPERATOR.

F is an acceptable abbreviation for FORCE.

Page 160: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Functions

160 Integrated Resource Manager Functions and Other Facilities Version 500

Examplesexecload('@RCFMAIN') -> 1

execload('@rcfmain') -> 1

execload('@RCFMAIN',,'F') -> 1

execload('GARBAGE') -> 0

Page 161: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 161

REXX Functions

EXECSTAT - EXEC Status FunctionChecks the current load status of a REXX exec. Returns 1 if the exec is loaded and 0 if not.

Syntax

>>----EXECSTAT(execnm,execdd)----------<<

Examplesexecstat('@RCFMAIN') -> 1

execstat('@rcfmain') -> 1

execstat('GARBAGE') -> 0

execnm Name of the exec to check, required. The execnm can be a maximum of eight characters.

execdd DD name from which the exec was loaded, optional. The DD name can be a maximum of eight characters.

If the execdd argument is not specified, the DD name specified in the LOADDD field of the Module Names Table will be used.

Page 162: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Functions

162 Integrated Resource Manager Functions and Other Facilities Version 500

NOVALU - No Value FunctionTests a variable for a NOVALUE condition. Returns 1 if the named variable has no value and 0 if the variable has been assigned a value.

Syntax

>>----NOVALU(varname)----------<<

Examplesnovalu('VAR_NAME') -> 1

novalu('VAR_NAME') -> 0

varname Name of the variable to test, required. This argument must specify a valid REXX variable name. If an invalid REXX variable name is specified, a syntax error will be generated.

Page 163: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 163

REXX Functions

REXXIC - Immediate Command FunctionIssues the specified REXX immediate command via a call to the IRXIC REXX routine. Returns 1 if the command was successful and 0 if not.

Syntax

>>----REXXIC(rexxcmd)----------<<

Examplesrexxic('HI') -> 1

rexxic('HT') -> 1

rexxic('RT') -> 1

rexxic('TS') -> 1

rexxic('TE') -> 1

rexxic('ht') -> 0 (case sensitive)

rexxic('ZZ') -> 0 (command not valid)

rexxcmd Valid REXX immediate command, required. Valid values are:� HI Halt interpretation� HT Halt typing� RT Resume typing� TS Trace start� TE Trace end

Page 164: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Functions

164 Integrated Resource Manager Functions and Other Facilities Version 500

REXXVGET - Variable Get FunctionCreates, or updates, a REXX variable. The name of the variable to get and the name of the new variable to create are required. Returns 1 if the new REXX variable is created and 0 if not.

Syntax

>>----REXXVGET(name,newname)----------<<

Examplesrexxvget('VAR_NAME','NEW_VAR') -> 1

rexxvget('var_name','new_var') -> 1

rexxvget('NOTFOUND','NEW_VAR') -> 0 (variable not found)

rexxvget('GAR BAGE','NEW_VAR') -> 0 (variable name invalid)

name Name of the REXX variable to fetch, required.

newname Name of the new variable to create, or update, required.

Page 165: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 165

REXX Functions

REXXVPUT - Variable Put FunctionSets a REXX variable value. The name and the value of the variable are required arguments. Returns 1 if the variable is set and 0 if not.

Syntax

>>----REXXVPUT(name,value)----------<<

Examplesrexxvput('VAR_NAME','SOMETHING') -> 1

rexxvput('GAR BAGE','SOMETHING') -> 0

name Name of the REXX variable, required.

value Value of the REXX variable, required.

Page 166: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Functions

166 Integrated Resource Manager Functions and Other Facilities Version 500

SUBCOM - Subcommand Environment FunctionSearches for the specified External Host Command environment, also known as a REXX Subcommand Environment. Returns 1 if the environment is found and 0 if not.

Syntax

>>----SUBCOM(addrname)----------<<

Examplessubcom('AFHOST') -> 1

subcom('GARBAGE') -> 0

addrname External Host Command environment name as used in the REXX ADDRESS command to identify the environment, required. A Host Command environment name can be a maximum of eight characters.

Page 167: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 167

Table Functions

Table Functions

TABLE - Manager InterfaceProvides an interface to request REXX Table Manager functions. Returns 1 if the requested function was successful and 0 if not.

Syntax

>>----TABLE(table,function)----------<<

Notes

After a successful START request, this module will store the address of the KAUTABLE module in the FVT_BLOCK.

After a successful STOP request, this module will clear the address of the KAUTABLE module from the FVT_BLOCK.

table Name of the REXX table, required. A maximum of 32 characters is allowed.

function Requested table function, required. Valid values are:� FIND Find an in-storage table� LOAD Load a table from a dataset� PURGE Delete an in-storage table� REFRESH Refresh an in-storage table� ORDER Order an in-storage table� UNSORT Unsort an in-storage table� LOCK Lock an in-storage table� UNLOCK Unlock an in-storage table� START Start REXX Table Manager� STOP Shutdown REXX Table Manager

Page 168: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Table Functions

168 Integrated Resource Manager Functions and Other Facilities Version 500

Examplestable('@RCFCNTL','FIND') -> 1

table('@RCFCNTL','LOAD') -> 1

table('@RCFCNTL','PURGE') -> 1

table('@RCFCNTL','REFRESH') -> 1

table('@RCFCNTL','ORDER') -> 1

table('@RCFCNTL','START') -> 1

table('@RCFCNTL','STOP') -> 1

table('GARBAGE','STOP') -> 0

Page 169: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 169

Table Functions

TBADD - Add a RowAdds the specified row to a created REXX table. Returns 1 if the row was successfully added and 0 if not.

Syntax

>>----TBADD(table,row)----------<<

Upon successful completion of the function, the special variable, TBCSR, is created in the REXX environment, which contains the row name/row ID of the current row.

Examplestbadd('@CICCNTL','CICSA') -> 1

tbadd('@ciccntl','cicsa') -> 1

tbadd('@OVICNTL','LG90') -> 0

table Name of the REXX table, required. A maximum of 32 characters is allowed.

row Name of the row to add to the table. The row name argument is required for non-keyed tables and must be unique.

For keyed tables, the row argument is not used; instead, the current values of the key variables will be used for the new row's keys and the row's name, or ID, will be chosen internally. If the argument is specified for a keyed table, row will be checked for proper syntax but will not be used.

Page 170: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Table Functions

170 Integrated Resource Manager Functions and Other Facilities Version 500

TBAPPEND - Append RowsAppends rows from a separate dataset, or member, to a previously loaded table. The row data in the appended dataset must have the same format as the data in the original table dataset. The appended table dataset must not contain duplicate control or header records. Returns 1 if the dataset was successfully appended and 0 if not.

Syntax

>>----TBAPPEND(table,append)----------<<

Examplestbappend('MYTABLE','MORE') -> 1

tbappend('MYTABLE','MORE') -> 0 (unsuccessful append)

tbappend('GARBAGE','MORE') -> 0 (table was not found)

table Name of the REXX table, required. A maximum of 32 characters is allowed.

append DD name of the dataset containing the rows to append to the table, required. A maximum of eight characters is allowed.

Page 171: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 171

Table Functions

TBARRAY - Create Row ArraysScans a table looking for search table matches. Returns 1 if a match is found and 0 if no match is found. When a search table match is found, a set of variables containing the row information is created in the REXX environment.

Upon successful completion of this function, a set of variable arrays is created; one for each column in the table, using the column name as the array stem, and one for the row names, using the row array stem as defined in the table control information. For example:� ROW.N Row name for the row

� COLUMN.N Column value for the row

Each element in a column value array contains the value of the column for a row which matched the specified search criteria. Each element in the row name array contains the name of the row which matched the specified search criteria.

An index variable is also created for each array, which contains the number of elements that are in the array:� ROW.0 Row name array element count

� COLUMN.0 Column value array element count

Syntax

>>----TBARRAY(table,tbarg)----------<<

Examplestbarray('@RCFSTRT',tbarg) -> 1

tbarray('@RCFSTRT',tbarg) -> 0 (match not found)

tbarray('GARBAGE',tbarg) -> 0 (table was not found)

table Name of the REXX table, required. A maximum of 32 characters is allowed.

tbarg Search table as created by the TBSARG function, required.

Page 172: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Table Functions

172 Integrated Resource Manager Functions and Other Facilities Version 500

TBCOLUMN - Get Column NamesLocates the user-specified table and returns the table's column names as a string of words, where each word in the string is the name of a column. Returns a null value if the user-specified table cannot be found.

Syntax

>>----TBCOLUMN(table)----------<<

Examplestbcolumn('@RCFCNTL')-> TASK_ALIAS TASK_# LOG KEYWORD ….

tbcolumn('@rcfcntl')-> TASK_ALIAS TASK_# LOG KEYWORD ….

tbcolumn('GARBAGE') -> '' (null value - table not found)

table Name of the REXX table, required. A maximum of 32 characters is allowed.

Page 173: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 173

Table Functions

TBCREATE - Create a TableCreates the structure for an in-storage REXX table. Returns 1 if the table was successfully created and 0 if not.

Syntax

>>----TBCREATE(table,cols,keys,stems,rows,chkp,ordr,xpnd,nchk)----------<<

table Name of the table to create, required. The table name can be a maximum of 32 characters and must be unique. Table names may not include imbedded blanks.

cols Names of the columns in the table. This argument should consist of a string of words, where each word in the string is the name of a column in the table. The column name string can be a maximum of 8191 bytes in length and is required. The minimum number of columns that can be defined is 1. The maximum number of columns allowed in a table is 256.

keys The number of columns to use as keys. This is an optional argument which is used to declare a keyed table, and to specify how many columns to treat as keys, starting with the first column. The default is 0, a non-keyed table.

stems The array stem control information for the table, optional. If specified, the argument must consist of a string of three words which are to be used for column, row, and cell array stems. The default array stems are: COLUMN., ROW., and CELL..

rows The maximum number of rows allowed in the table. This is an optional argument. The default maximum rows for a table is 32. If the table will have more than 32 rows, specify the maximum row count for the table with this argument. The maximum number of rows that can be defined is 65535.

Page 174: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Table Functions

174 Integrated Resource Manager Functions and Other Facilities Version 500

Examplestbcreate('ABC','C1') -> 1 (non-keyed table)

tbcreate('ABC','C1 C2',1) -> 1 (one keyed table)

tbcreate('ABC','C1 C2',,'C R L') -> 1 (set array stems)

tbcreate('ABC','C1 C2',,,512) -> 1 (maximum rows)

tbcreate('ABC','C1 C2',,,,'C') -> 1 (checkpointed)

tbcreate('ABC','C1 C2',,,,,'O') -> 1 (ordered)

tbcreate('ABC','C1 C2',,,,,,'X') -> 1 (expandable)

tbcreate('ABC','C1 C2',,,,,,,'N') -> 1 (not checked)

chkp Checkpoint option. Specify CHKP to have the table checkpointed. Only the first character of the argument keyword is significant; all other characters are ignored.

ordr Ordered table option. Specify ORDR to declare the table as ordered. Defining a table as ordered causes all rows to be added in ascending row name, or row key, sequence. Only the first character of the argument keyword is significant; all other characters are ignored.

xpnd Expand table option. Specify EXPAND to declare the table as expandable. The EXPAND option will cause the table to be expanded if the maximum row count is encountered when adding a row. Only the first character of the argument keyword is significant; all other characters are ignored. An 'X' may also be used to specify this option.

nchk Bypass column name verification option, optional. Specify NCHK to skip column name verification. Column name verification ensures that all column names are also valid REXX variable names. If the table uses column names that are not valid REXX variable names, this option must be specified to avoid column name verification errors. Only the first character of the argument keyword is significant; all other characters are ignored.

Note: If the table's column names are not valid REXX variable names, certain data retrieval functions will not work properly.

Page 175: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 175

Table Functions

TBDELETE - Delete a RowDeletes the specified row from a created REXX table. Returns 1 if the row was successfully deleted and 0 if not.

For keyed tables, when the row argument is not supplied, the table is searched for the row to be accessed by using the current values of the table key variables (REXX variables corresponding to the key columns) as the search criteria. The key variables are fetched from the current REXX environment and must be established prior to the invocation of this function.

Syntax

>>----TBDELETE(table,row)----------<<

Examplestbdelete('CICSTBL','CICSA')-> 1

tbdelete('CICSTBL','cicsa')-> 1

tbdelete('CICSTBL','JUNKA')-> 0 (row not found)

tbdelete('JUNKTBL','CICSA')-> 0 (tbl not found)

table Name of the REXX table, required. A maximum of 32 characters is allowed.

row Name, or ID, of the row. This argument is required for non-keyed tables. For keyed tables, the argument is optional. If this argument is omitted, the table key variables will be fetched from the REXX environment to be used as the row search criteria.

Page 176: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Table Functions

176 Integrated Resource Manager Functions and Other Facilities Version 500

TBEXIST - Locate a RowSearches for a row in the specified REXX table. Returns 1 if the specified row is found in the table and 0 if not.

For keyed tables, when the row argument is not supplied, the table is searched for the row to be accessed by using the current values of the table key variables (REXX variables corresponding to the key columns) as the search criteria. The key variables are fetched from the current REXX environment and must be established prior to the invocation of this function.

Upon successful completion of the function, the special variable, TBCSR, is created in the REXX environment, which contains the row name/row ID of the current row.

Syntax

>>----TBEXIST(table,row)----------<<

Examplestbexist('CICSTBL','CICSA')-> 1

tbexist('cicstbl','cicsa')-> 1

tbexist('CICSTBL','JUNKA')-> 0 (row not found)

tbexist('JUNKTBL','CICSA')-> 0 (tbl not found)

table Name of the REXX table, required. A maximum of 32 characters is allowed.

row Name, or ID, of the row. This argument is required for non-keyed tables. For keyed tables, the argument is optional. If this argument is omitted, the table key variables will be fetched from the REXX environment to be used as the row search criteria.

Page 177: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 177

Table Functions

TBFETCH - Fetch a CellReturns the value of the specified table cell. If the specified table, column or row is not found, a 'not found' condition will be raised. A not found condition will result in a syntax error unless the NOTFOUND argument has been specified; in which case, the value specified for the NOTFOUND argument will be returned in place of the cell value.

Syntax

>>----TBFETCH(table,column,row,notfound)----------<<

Examplestbfetch('@RCFCNTL','TASK_#','CICSA') -> 1001

tbfetch('JUNKCNTL','TASK_#','CICSA','OOPS')-> OOPS (tbl not found)

tbfetch('@RCFCNTL','JUNK_#','CICSA','OOPS')-> OOPS (col not found)

tbfetch('@RCFCNTL','TASK_#','JUNKA','OOPS')-> OOPS (row not found)

table Name of the REXX table, required. A maximum of 32 characters is allowed.

column Name of the column of the cell to be fetched, required.

row Name, or ID, of the row of the cell to be fetched. This argument is required for non-keyed tables. For keyed tables, the argument is optional. If the argument is omitted, the current values of the key variables will be fetched from the REXX environment to be used as the row search criteria.

notfound A value to be returned if a 'not found' condition is encountered, optional. The value specified for this argument will be returned instead of the cell value if the specified table, column, or row is not found.

Page 178: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Table Functions

178 Integrated Resource Manager Functions and Other Facilities Version 500

TBGET - Get a RowLocates the specified row in the specified table and stores the cell data for the row in the REXX environment. Returns 1 if the row data was successfully transferred to REXX. Returns 0 if the table cannot be found, the row cannot be found, or if the data transfer was not successful.

For keyed tables, when the row argument is not supplied, the table is searched for the row to be accessed by using the current values of the table key variables (REXX variables corresponding to the key columns) as the search criteria. The key variables are fetched from the current REXX environment and must be established prior to the invocation of this function.

Upon successful completion of the function, the special variable, TBCSR, is created in the REXX environment, which contains the row name/row ID of the current row.

Syntax

>>----TBGET(table,row)----------<<

Examplestbget('CICSTBL','CICSA') -> 1

tbget('cicstbl','cicsa') -> 1

tbget('CICSTBL','JUNKA') -> 0 (row not found)

tbget('JUNKTBL','CICSA') -> 0 (tbl not found)

table Name of the REXX table, required. A maximum of 32 characters is allowed.

row Name, or ID, of the row. This argument is required for non-keyed tables. For keyed tables, the argument is optional. If this argument is omitted, the table key variables will be fetched from the REXX environment to be used as the row search criteria.

Page 179: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 179

Table Functions

TBIDS - Get Row IDsLocates the user-specified table and returns the table's row IDs as a string of words, where each word in the string is the ID of a row in the form ‘R||c2x(id)’, for example: R000001. Returns a null value if the user-specified table is not found.

Syntax

>>----TBIDS(table)----------<<

Comments

The formatted row IDs produced by this function are equivalent to those produced by the TBSELECT() function using the Ivariable option.

Row IDs produced by this function are formatted for use as variable names and cannot be used as input for any table function row argument.

Examplestbids('@XRFCNTL') -> SYSA SYSB SYSC SYSD ...

tbids('@xrfcntl') -> SYSA SYSB SYSC SYSD ...

tbids('GARBAGE') -> '' (null value - table not found)

table Name of the REXX table, required. A maximum of 32 characters is allowed.

Page 180: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Table Functions

180 Integrated Resource Manager Functions and Other Facilities Version 500

TBKEYS - Get KeysLocates the user-specified table and returns the table's keys (column names) as a string of words, where each word in the string is the column name for a key. Returns a null value if the user-specified table cannot be found, or if the table is not a keyed table.

Syntax

>>----TBKEYS(table)--------<<

Examplestbkeys('@DEVCNTL') -> DEV_OBJ DEV_SYS DEV_CPU

tbkeys('@devcntl') -> DEV_OBJ DEV_SYS DEV_CPU

tbkeys('@RCFCNTL') -> '' (null value - table not keyed)

tbkeys('GARBAGE') -> '' (null value - table not found)

table Name of the REXX table, required. A maximum of 32 characters is allowed.

Page 181: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 181

Table Functions

TBMOD - Modify a RowModifies a row in a created REXX table. If the row is found in the table, the row data will be deleted and replaced with a new set of row data retrieved from the REXX environment. If the row is not found, a new row will be added using the row data retrieved from the REXX environment. Returns 1 if the row was successfully modified or added, and 0 if not.

For keyed tables, when the row argument is not supplied, the table is searched for the row to be accessed by using the current values of the table key variables (REXX variables corresponding to the key columns) as the search criteria. The key variables are fetched from the current REXX environment and must be established prior to the invocation of this function.

Upon successful completion of the function, the special variable, TBCSR, is created in the REXX environment, which contains the row name/row ID of the current row.

Syntax

>>----TBMOD(table,row)----------<<

table Name of the REXX table, required. A maximum of 32 characters is allowed.

row Name of the table row to be modified. The row name argument is required for non-keyed tables, and must be unique, for a row to be added to the table.

For keyed tables, this argument is optional. If this argument is omitted, the table key variables will be fetched from the REXX environment to be used as the row search criteria.

If the row name argument is specified for a keyed table and the row cannot be found, it will be ignored when the row is added to the table. The values of the key variables will be used for the new row's keys and the row's name, or ID, will be chosen internally. If the row argument is specified in this situation, it will be used during the search process, but not used when the row is added to the table.

Page 182: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Table Functions

182 Integrated Resource Manager Functions and Other Facilities Version 500

Examplestbmod('CICSTBL','CICSA') -> 1

tbmod('cicstbl','cicsa') -> 1

tbmod('JUNKTBL','CICSA') -> 0

Page 183: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 183

Table Functions

TBNAMES - Get Table NamesReturns the names of the currently available, in-storage REXX tables. Returns a null value if no tables are found.

Syntax

>>----TBNAMES()----------<<

There are no arguments for this function.

Examplestbnames() -> @APLAOCM @APLCMDS @APLCNTL...

tbnames() -> '' (no tables found)

Page 184: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Table Functions

184 Integrated Resource Manager Functions and Other Facilities Version 500

TBPUT - Put a RowModifies a row in a created REXX table. If the row is found in the table, the row data will be deleted and replaced with a new set of row data retrieved from the REXX environment. If the row is not found in the table, no further action is taken and the function returns a result of zero. Returns 1 if the row was successfully modified and 0 if not.

For keyed tables, when the row argument is not supplied, the table is searched for the row to be accessed by using the current values of the table key variables (REXX variables corresponding to the key columns) as the search criteria. The key variables are fetched from the current REXX environment and must be established prior to the invocation of this function.

Upon successful completion of the function, the special variable TBCSR is created in the REXX environment, which contains the row name/row ID of the current row.

Syntax

>>----TBPUT(table,row)----------<<

Examplestbput('CICSTBL','CICSA') -> 1

tbput('cicstbl','cicsa') -> 1

tbput('CICSTBL','JUNKA') -> 0 (row not found)

tbput('JUNKTBL','CICSA') -> 0 (tbl not found)

table Name of the REXX table, required. A maximum of 32 characters is allowed.

row Name, or ID, of the row. This argument is required for non-keyed tables. For keyed tables, the argument is optional. If this argument is omitted, the table key variables will be fetched from the REXX environment to be used as the row search criteria.

Page 185: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 185

Table Functions

TBQUERY - Table InformationLocates the user-specified table and returns the information requested via the variable argument. If the table cannot be found, a null value will be returned.

Syntax

>>----TBQUERY(table,variable)----------<<

table Name of the REXX table, required. A maximum of 32 characters is allowed.

Page 186: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Table Functions

186 Integrated Resource Manager Functions and Other Facilities Version 500

variable Name of the table variable, required. This argument is used to specify what table information to retrieve. Valid values are:

Binary argument keywords, returns a 1 or 0:� APPENDS Appended table� CHKP Checkpointed table� CREATED Created table� DCBRECV Dataset is RECFM=V� DELETED Delete in-progress� EXPAND Expandable table� EXPANDS Expanded table� GETCELL Acquired a cell table� GETDATA Acquired a data cell� GETROW Acquired a row table� HDRXTRA Received a 2nd header� KEYED Keyed table� LOADED Loaded table� LONGVAR Long variable names� MAXRLEN Maximum record length� NOCHECK Names not verified� OPENED Table dataset is open� ORDERED Ordered table� PREORDR Pre-ordered table� RECCNTL Received control record� RECDATA Received data record(s)� RECHEAD Received header record� REFRESH Refreshed table� SORTDSC Descending sort� SORTED Sorted table� SORTSCN Sort column name cell� UPDATED Updated table

Page 187: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 187

Table Functions

variablecont.

Numeric argument keywords, returns a whole number:� CELL_TABLEC# Cell table CPOOL number� COLUMN_TOTAL Number of columns� COLUMNS Number of columns� ROW_MRECL Maximum record length� ROW_SEQUENCE Row table sequence

number� ROW_TABLEC# Row table CPOOL number� ROW_TOTAL Number of rows� ROWS Number of rows� TABLE_ACCESS Table access count� TABLE_ADDCOUNT Row add count� TABLE_APPENDS Table append count� TABLE_BLOCKL Table block length� TABLE_DELCOUNT Row delete count� TABLE_KEYS Number of keys� TABLE_LOCK Number of locks� TABLE_LRECL Loaded table LRECL� TABLE_NAMEL Table name length� TABLE_PUTCOUNT Row modify count� TABLE_ROWMAX Maximum number of rows� TABLE_SORTC Sort column number� TABLE_UPDATE Cumulative update count� TABLE_UPDATES Current update count

Address argument keywords, returns an address (8 byte hexadecimal):� CELL_TABLE Cell table start� CELL_TABLEC Cell table CPID� CELL_TABLEE Cell table end� CELL_TABLEL Cell table length� CELL_TABLEN Cell table next

Page 188: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Table Functions

188 Integrated Resource Manager Functions and Other Facilities Version 500

variablecont.

� COLUMN_TABLE Column table start� COLUMN_TABLEC Column table CPID� COLUMN_TABLEE Column table end� COLUMN_TABLEL Column table length� COLUMN_TABLEN Column table next� ROW_DCCID Row data cell CPID� ROW_DCLEN Row data cell length� ROW_TABLE Row table start� ROW_TABLEC Row table CPID� ROW_TABLEE Row table end� ROW_TABLEL Row table length� ROW_TABLEN Row table next� TABLE_APPENDC Address of 1st KAUTABLK� TABLE_APPENDL Address of last KAUTABLK� TABLE_BLOCK Address of this KAUTBLOK� TABLE_CONTROL Address of control record� TABLE_CTLCPID CPID of control record� TABLE_DCB Address of dataset DCB� TABLE_EXCL Exclusive access lock� TABLE_FREEROW Address of 1st free row� TABLE_HDRCPID CPID of 1st hdr record� TABLE_HDRXCID CPID of 2nd hdr record� TABLE_HDRXTRA Address of 2nd hdr record� TABLE_HEADER Address of 1st hdr record� TABLE_IDCOUNT Current unique row ID� TABLE_NEXT Address of next KAUTBLOK� TABLE_OFFSET Hex offset to next row� TABLE_SHVCLEN SHVBLOCK cell length� TABLE_SHVPOOL SHVBLOCK cell pool ID� TABLE_SORTCCID Sort column name CPID� TABLE_SORTCENT Sort column table entry� TABLE_SORTCNAM Sort column name cell� TABLE_SORTCOFS Sort column cell offset� TABLE_SORTTBL Sort row table start� TABLE_SORTTBLC Sort row table CPID

Page 189: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 189

Table Functions

Examplestbquery('@RCFCNTL','APPENDS') -> 0

tbquery('@RCFCNTL','CHKP') -> 0

tbquery('@RCFCNTL','CREATED') -> 0

tbquery('@RCFCNTL','DCBRECV') -> 0

tbquery('@RCFCNTL','DELETED') -> 0

tbquery('@RCFCNTL','EXPAND') -> 0

tbquery('@RCFCNTL','EXPANDS') -> 0

tbquery('@RCFCNTL','GETCELL') -> 1

tbquery('@RCFCNTL','GETDATA') -> 0

tbquery('@RCFCNTL','GETROW') -> 1

tbquery('@RCFCNTL','HDRXTRA') -> 0

tbquery('@RCFCNTL','KEYED') -> 0

tbquery('@RCFCNTL','LOADED') -> 1

tbquery('@RCFCNTL','LONGVAR') -> 0

tbquery('@RCFCNTL','MAXRLEN') -> 0

tbquery('@RCFCNTL','NOCHECK') -> 0

tbquery('@RCFCNTL','OPENED') -> 0

tbquery('@RCFCNTL','ORDERED') -> 1

tbquery('@RCFCNTL','PREORDR') -> 1

tbquery('@RCFCNTL','RECCNTL') -> 1

tbquery('@RCFCNTL','RECDATA') -> 1

tbquery('@RCFCNTL','RECHEAD') -> 1

tbquery('@RCFCNTL','REFRESH') -> 0

tbquery('@RCFCNTL','SORTDSC') -> 0

variablecont.

� TABLE_SORTTBLE Sort row table end� TABLE_SORTTBLL Sort row table length� TABLE_TBID Unique table block ID

Character argument keywords, returns a character string:� CELL_STEM Cell array stem� COLUMN_STEM Column array stem� ROW_STEM Row array stem� TABLE_EXEC Create/Load exec name� TABLE_TOD Create/Load time (TOD)� TABLE_UPDTOD Last update time (TOD)

Page 190: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Table Functions

190 Integrated Resource Manager Functions and Other Facilities Version 500

tbquery('@RCFCNTL','SORTED') -> 0

tbquery('@RCFCNTL','SORTSCN') -> 0

tbquery('@RCFCNTL','UPDATED') -> 1

tbquery('@RCFCNTL','CELL_TABLEC#') -> 9

tbquery('@RCFCNTL','COLUMN_TOTAL') -> 23

tbquery('@RCFCNTL','COLUMNS') -> 23

tbquery('@RCFCNTL','ROW_MRECL') -> 1023

tbquery('@RCFCNTL','ROW_SEQUENCE') -> 1964

tbquery('@RCFCNTL','ROW_TABLEC#') -> 7

tbquery('@RCFCNTL','ROW_TOTAL') -> 1848

tbquery('@RCFCNTL','ROWS') -> 1848

tbquery('@RCFCNTL','TABLE_ACCESS') -> 59604

tbquery('@RCFCNTL','TABLE_ADDCOUNT') -> 0

tbquery('@RCFCNTL','TABLE_APPENDS') -> 0

tbquery('@RCFCNTL','TABLE_BLOCKL') -> 512

tbquery('@RCFCNTL','TABLE_DELCOUNT') -> 0

tbquery('@RCFCNTL','TABLE_KEYS') -> 0

tbquery('@RCFCNTL','TABLE_LOCK') -> 0

tbquery('@RCFCNTL','TABLE_LRECL') -> 1023

tbquery('@RCFCNTL','TABLE_NAMEL') -> 8

tbquery('@RCFCNTL','TABLE_PUTCOUNT') -> 0

tbquery('@RCFCNTL','TABLE_ROWMAX') -> 2048

tbquery('@RCFCNTL','TABLE_SORTC') -> 0

tbquery('@RCFCNTL','TABLE_UPDATE') -> 18

tbquery('@RCFCNTL','TABLE_UPDATES') -> 6

tbquery('@RCFCNTL','CELL_TABLE') -> 0B750F18

tbquery('@RCFCNTL','CELL_TABLEC') -> 09DC3F00

tbquery('@RCFCNTL','CELL_TABLEE') -> 0B7F6F97

tbquery('@RCFCNTL','CELL_TABLEL') -> 00100000

tbquery('@RCFCNTL','CELL_TABLEN') -> 0B7F6F98

tbquery('@RCFCNTL','COLUMN_TABLE') -> 0B643F18

tbquery('@RCFCNTL','COLUMN_TABLEC') -> 00000000

tbquery('@RCFCNTL','COLUMN_TABLEE') -> 0B644087

tbquery('@RCFCNTL','COLUMN_TABLEL') -> 00000400

tbquery('@RCFCNTL','COLUMN_TABLEN') -> 00000800

tbquery('@RCFCNTL','ROW_DCCID') -> 09671F00

tbquery('@RCFCNTL','ROW_DCLEN') -> 00000000

tbquery('@RCFCNTL','ROW_TABLE') -> 0B982F18

tbquery('@RCFCNTL','ROW_TABLEC') -> 0957DF00

Page 191: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 191

Table Functions

tbquery('@RCFCNTL','ROW_TABLEE') -> 0B991617

tbquery('@RCFCNTL','ROW_TABLEL') -> 00100000

tbquery('@RCFCNTL','ROW_TABLEN') -> 0B991617

tbquery('@RCFCNTL','TABLE_APPENDC') -> 00000000

tbquery('@RCFCNTL','TABLE_APPENDL') -> 00000000

tbquery('@RCFCNTL','TABLE_BLOCK') -> 0B63CB18

tbquery('@RCFCNTL','TABLE_CONTROL') -> 0BB07518

tbquery('@RCFCNTL','TABLE_CTLCPID') -> 095DFF00

tbquery('@RCFCNTL','TABLE_DCB') -> 00000000

tbquery('@RCFCNTL','TABLE_EXCL') -> 00000000

tbquery('@RCFCNTL','TABLE_FREEROW') -> 00000000

tbquery('@RCFCNTL','TABLE_HDRCPID') -> 095DFF00

tbquery('@RCFCNTL','TABLE_HDRXCID') -> 00000000

tbquery('@RCFCNTL','TABLE_HDRXTRA') -> 00000000

tbquery('@RCFCNTL','TABLE_HEADER') -> 0BB07618

tbquery('@RCFCNTL','TABLE_IDCOUNT') -> 0000073F

tbquery('@RCFCNTL','TABLE_NEXT') -> 0B63CC98

tbquery('@RCFCNTL','TABLE_OFFSET') -> 00000170

tbquery('@RCFCNTL','TABLE_SHVCLEN') -> 00000000

tbquery('@RCFCNTL','TABLE_SHVPOOL') -> 095BDF00

tbquery('@RCFCNTL','TABLE_SORTCCID') -> 00000000

tbquery('@RCFCNTL','TABLE_SORTCENT') -> 00000000

tbquery('@RCFCNTL','TABLE_SORTCNAM') -> 00000000

tbquery('@RCFCNTL','TABLE_SORTCOFS') -> 00000000

tbquery('@RCFCNTL','TABLE_SORTTBL') -> 00000000

tbquery('@RCFCNTL','TABLE_SORTTBLC') -> 00000000

tbquery('@RCFCNTL','TABLE_SORTTBLE') -> 00000000

tbquery('@RCFCNTL','TABLE_SORTTBLL') -> 00000000

tbquery('@RCFCNTL','TABLE_TBID') -> 00000029

tbquery('@RCFCNTL','CELL_STEM') -> CELL.

tbquery('@RCFCNTL','COLUMN_STEM') -> COLUMN.

tbquery('@RCFCNTL','ROW_STEM') -> TASK_NAME

tbquery('@RCFCNTL','TABLE_EXEC') -> @TBLMAIN

tbquery('@RCFCNTL','TABLE_TOD') -> ????????

tbquery('@RCFCNTL','TABLE_UPDTOD' -> ????????

tbquery('GARBAGE','TABLE_EXEC') -> ''

Page 192: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Table Functions

192 Integrated Resource Manager Functions and Other Facilities Version 500

TBREAD - Read a RowScans a table looking for search table matches. Returns 1 if a match is found and 0 if no match is found. When a search table match is found, a set of variables containing the row information, for each column in the table, is created in the REXX environment.

Upon successful completion of the function, the special variable TBCSR is created in the REXX environment, which contains the row name/row ID of the current row.

Upon successful completion of the function, the special variable TBPOS is created in the REXX environment. The TBPOS variable contains table position information for the row that was read.

Each time TBREAD() is invoked, an attempt is made to retrieve the TBPOS special variable. If the variable is found, and valid, the table scan is resumed at the row following the input value of the variable. By making repeated calls to this function each row in the table that matches the specified search criteria can be read.

If the TBPOS special variable is not found, the read scan begins at the beginning of the table. If, in the middle of a TBREAD() loop process, it becomes necessary to go back to the top of the table, issue a REXX DROP command for the TBPOS variable and the next call to TBREAD() will once again start at the beginning of the table.

Syntax

>>----TBREAD(table,tbarg,tbpos)----------<<

table Name of the REXX table, required. A maximum of 32 characters is allowed.

tbarg Search table as created by the TBSARG() function, required.

tbpos User-supplied name for the tbpos variable, optional. The value specified must be a valid REXX variable name. A maximum of 32 characters is allowed.

This argument can be used to override the default name for the tbpos special variable. If a user-supplied name is specified, the variable will be named using that name instead of tbpos.

Page 193: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 193

Table Functions

Examplestbread('@RCFSTRT',tbarg) -> 1

tbread('TBL',tbarg,'VAR') -> 1 (VAR set to position)

tbread('GARBAGE',tbarg) -> 0

Page 194: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Table Functions

194 Integrated Resource Manager Functions and Other Facilities Version 500

TBRECORD - Record NumberLocates the specified row in the specified table and, for loaded tables, returns the table dataset record number for that row. For a created table, the internal row number is returned. If the row, or the table, cannot be found, zero is returned in place of the row record number.

Syntax

>>----TBRECORD(table,row)----------<<

Examplestbrecord('CICSTBL','CICSA')-> 8

tbrecord('cicstbl','cicsa')-> 8

tbrecord('CICSTBL','JUNKA')-> 0 (row not found)

tbrecord('JUNKTBL','CICSA')-> 0 (tbl not found)

table Name of the REXX table, required. A maximum of 32 characters is allowed.

row Name, or ID, of the row. This argument is required for non-keyed tables. For keyed tables, the argument is optional. If this argument is omitted, the table key variables will be fetched from the REXX environment to be used as the row search criteria.

Page 195: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 195

Table Functions

TBRESTOR - Restore a CellRestores a previously updated in-storage table cell to its original value. Returns a 1 if the cell was successfully restored. Returns a 0 if the table, the column, or the row cannot be found, or if the restore was not successful.

Syntax

>>----TBRESTOR(table,column,row)----------<<

Examplestbrestor('@RCFCNTL','LOG','CICSA')-> 1

tbrestor('@rcfcntl','log','cicsa')-> 1

tbrestor('JUNKCNTL','LOG','CICSA')-> 0 (tbl not found)

tbrestor('@RCFCNTL','JNK','CICSA')-> 0 (col not found)

tbrestor('@RCFCNTL','LOG','JUNKA')-> 0 (row not found)

table Name of the REXX table, required. A maximum of 32 characters is allowed.

column Name of the column of the cell to be restored, required.

row Name, or ID, of the row of the cell to be restored. This argument is required for non-keyed tables. For keyed tables, the argument is optional. If this argument is omitted, the current values of the key variables will be fetched from the REXX environment to be used as the row search criteria.

Page 196: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Table Functions

196 Integrated Resource Manager Functions and Other Facilities Version 500

TBROW - Get Row NamesLocates the user-specified table and returns the table's row names, or ID's, as a string of words, where each word in the string is the name, or ID, of a row. Returns a null value if the user-specified table cannot be found.

Syntax

>>----TBROW(table)----------<<

Examplestbrow('@XRFCNTL') -> SYSA SYSB SYSC SYSD ...

tbrow('@xrfcntl') -> SYSA SYSB SYSC SYSD ...

tbrow('GARBAGE') -> '' (null value - table not found)

table Name of the REXX table, required. A maximum of 32 characters is allowed.

Page 197: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 197

Table Functions

TBSARG - Search ArgumentBuilds a search argument table to be used with the TBSCAN() or TBREAD() functions. Processes a formatted search string and sets the special variable TBARG with the results. Returns a 1 if the search argument table has been successfully built and the variable TBARG has been set. Returns a 0 if the table cannot be found or if there is a format error in the user-specified search string.

Syntax

>>----TBSARG(table,srchstr)----------<<

table Name of the REXX table, required. A maximum of 32 characters is allowed.

srchstr A formatted search string, optional. If a null search string is specified, a null search argument table will be created and a 1 will be returned. The general format for this argument is:

/column cond{value} /column cond{value} ...

where:�/ Delimits an entry in the search string. Each

entry in the string must start with a '/'. �COLUMN Name of the column table.�COND Matching condition. Valid values are:

– EQ Equal– NE Not Equal– LT Less Than– GT Greater Than

�{VALUE} Search value for the column. The search value may end with an '*' for a generic search.

Page 198: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Table Functions

198 Integrated Resource Manager Functions and Other Facilities Version 500

Examplestbsarg('@RCFCNTL') -> 1

tbsarg('@RCFCNTL','/TASK_# eq{1001}') -> 1

tbsarg('@RCFCNTL','/TASK_# gt{2000}') -> 1

tbsarg('JUNKCNTL','/TASK_# eq{1001}') -> 0 (tbl not found)

tbsarg('@RCFCNTL','/JUNK_# eq{1001}') -> 0 (col not found)

tbsarg('@RCFCNTL','/TASK_# JU{1001}') -> 0 (string errors)

Page 199: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 199

Table Functions

TBSCAN - Scan a TableScans a table looking for search table matches. Returns 1 if a match is found and 0 if no match is found. If a search table match is found, the special variable TBROW will be set to the row name(s)/row ID(s) of the matching row(s).

Syntax

>>----TBSCAN(table,tbarg)----------<<

Examplestbscan('@RCFCNTL',tbarg)-> 1

tbscan('JUNKCNTL',tbarg)-> 0

table Name of the REXX table, required. A maximum of 32 characters is allowed.

tbarg Search table as created by the TBSARG() function, required.

Page 200: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Table Functions

200 Integrated Resource Manager Functions and Other Facilities Version 500

TBSEARCH - Search a TableSearches a table for the specified row name or row key values. Returns 1 if a match is found and 0 if no match is found. If a row match is found, the special variable TBROW will be set to the row name(s)/ID(s) of the matching row(s).

A simple pattern, using a high-level qualifier followed by an asterisk, can be specified for the row name or row key search values. A table search using a row name pattern of ABCD* will match any row name starting with the four characters ABCD.

Syntax

>>----TBSEARCH(table,row)----------<<

Examplestbsearch('@RCFCNTL','TDP1')-> 1

tbsearch('@rcfcntl','TDP1')-> 1

tbsearch('@RCFCNTL','TDP*')-> 1

tbsearch('JUNKCNTL','TDP1')-> 0 (tbl not found)

tbsearch('@RCFCNTL','JUNK')-> 0 (row not found)

tbsearch('@RCFCNTL','tdp1')-> 0 (row not found)

table Name of the REXX table, required. A maximum of 32 characters is allowed.

row Name of the row to search the table for. This argument is required for non-keyed tables. For keyed tables, this argument is optional. If the argument is omitted, the table key variables will be fetched from the REXX environment to be used as the row search criteria.

A simple search pattern can be specified for this argument (ex: AB*). If a search pattern is specified, the TBROW variable will contain the names of all rows which match the pattern, with the name of each row separated by a blank.

Page 201: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 201

Table Functions

TBSELECT - Data SelectionLocates the requested information in the user-specified REXX table and returns that data to the calling REXX environment. The data can be returned either as the result of the function or in a set of REXX variables. If the data is returned via variables, the variables created by the function can be either array variables or standard REXX variables.

For keyed tables, when the row argument is not supplied, the table is searched for the row to be accessed by using the current values of the table key variables (REXX variables corresponding to the key columns) as the search criteria. The key variables are fetched from the current REXX environment and must be established prior to the invocation of this function.

Syntax

>>----TBSELECT(table,column,row,option)----------<<

-or-

>>----TBSELECT(table,keyword,option)----------<<

table Name of the REXX table, required. A maximum of 32 characters is allowed.

column Name of the column of the cell to be located, required. Specify the ALL keyword to return all cell data in a row.

row Name, or ID, of the row of the cell to be located. This argument is required for non-keyed tables. For keyed tables, the argument is optional. If the argument is omitted, the current values of the key variables will be fetched from the REXX environment to be used as the row search criteria. Specify the ALL keyword to return all cell data in the column.

Page 202: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Table Functions

202 Integrated Resource Manager Functions and Other Facilities Version 500

Notes

TBSELECT() called as a function will return data to the REXX instruction that invoked the function as the result of the function. If TBSELECT is called as a subroutine, the result will be placed in the REXX special variable RESULT.

TBSELECT called using the Array option results in the creation of a set of arrays within the user's exec which contain the information to be returned. The names of the array variables are derived from the array stem information specified in the table control record or, in lieu of control information, the default stems: COLUMN., ROW., and CELL.. The array count is returned as the function result.

An index variable is created for each array which contains the count, or number, of elements in the array: COLUMN.0, ROW.0, and CELL.0.

When TBSELECT is called using the Variable option, variables will be created, within the user's exec, that contain the data to be returned. The column name or row name will be used as the name of the variable. The variable count will be returned as the result of the function.

If column data is requested, using the V option, and a row name that is not a valid REXX variable name is encountered, a syntax error will be generated. Use the Ivariable option, instead of the Variable option, to avoid this situation.

options Use the ARRAY keyword to have the data returned in the form of REXX arrays. Using the ARRAY option results in the function creating a set of REXX variables to return column and cell, row and cell, or just column/row information in array format. The names of the array variables are derived from the table's array stems. For example COLUMN.n, ROW.n, and/or CELL.n.

Use the VARIABLE keyword to have data returned in the form of REXX variables. Using the VARIABLE option results in the creation of REXX variables for cell data. The variables are named using column/row names.

Use the IVARIABLE keyword to have data returned in the form of REXX variables. Using the IVARIABLE option results in the creation of REXX variables for cell data. The variables are named using column names or formatted row ID's: 'R'||c2x(id).

Only the first character of the argument keyword is significant; all characters following are ignored.

keyword COLUMN or ROW keywords, required. Use the COLUMN or ROW keyword to have column name or row name data returned.

Page 203: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 203

Table Functions

If a set of column data is requested from a keyed table using the V option, the variable names will be derived from the row ID as if the Ivariable option had been specified. The derived names will be in the form 'R'||c2x(id). For example, the name derived for row '000001'x will be R000001.

TBSELECT called with a keyword option will return column/row name data in place of cell data.

If TBSELECT is called to return data for a single table cell then Array, Variable, and Ivariable options are ignored and data is returned as the result of the function.

The reserved keywords ALL, COLUMN, and ROW must not be used for column and/or row names.

The ALL keyword may not be specified for both the column and row arguments at the same time.

Examplestbselect('@XRFCNTL','CTL_JOB','SYSA') -> DBM02CTL

tbselect('@XRFCNTL','CTL_JOB','SYSA','A')-> DBM02CTL

tbselect('@XRFCNTL','CTL_JOB','SYSA','V')-> DBM02CTL

tbselect('@XRFCNTL','CTL_JOB','SYSA','I')-> DBM02CTL

tbselect('@XRFCNTL','CTL_JOB','ALL') -> DBM02CTL DBM02CTL...

tbselect('@XRFCNTL','CTL_JOB','ALL','A') -> 8

tbselect('@XRFCNTL','CTL_JOB','ALL','V') -> 8

tbselect('@XRFCNTL','CTL_JOB','ALL','I') -> 8

tbselect('@XRFCNTL','ALL','SYSA') -> 2 DBM02CTL DBM02DBR...

tbselect('@XRFCNTL','ALL','SYSA','A') -> 18

tbselect('@XRFCNTL','ALL','SYSA','V') -> 18

tbselect('@XRFCNTL','ALL','SYSA','I') -> 18

tbselect('@XRFCNTL','COLUMN') -> HSBID CTL_JOB DBRC_JOB...

tbselect('@XRFCNTL','COLUMN','A') -> 18

tbselect('@XRFCNTL','COLUMN','V') -> 18

tbselect('@XRFCNTL','COLUMN','I') -> 18

tbselect('@XRFCNTL','ROW') -> SYSA SYSB SYSC SYSD...

tbselect('@XRFCNTL','ROW','A') -> 8

tbselect('@XRFCNTL','ROW','V') -> 8

tbselect('@XRFCNTL','ROW','I') -> 8

Page 204: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Table Functions

204 Integrated Resource Manager Functions and Other Facilities Version 500

TBSORT - Sort a TableSorts the rows in the specified table by the value of the specified column. The sort can be performed in ascending or descending order. Returns a 1 if the table was successfully sorted and a 0 if not.

Syntax

>>----TBSORT(table,column,order)----------<<

Examplestbsort('@RCFCNTL','KEYWORD') -> 1

tbsort('@rcfcntl','keyword') -> 1

tbsort('@RCFCNTL','KEYWORD','D') -> 1

tbsort('@RCFCNTL','KEYWORD','A') -> 1

tbsort('JUNKCNTL','KEYWORD') -> 0 (tbl not found)

tbsort('@RCFCNTL','JUNKORD') -> 0 (col not found)

table Name of the REXX table, required. A maximum of 32 characters is allowed.

column Name of the column which is to be used to sort the table, required.

order Sort direction, optional. Valid values are:� ASCENDING Sort in ascending order� DESCENDING Sort in descending order

If order is not specified, it defaults to ASCENDING. Only the capitalized letter of the option keyword is needed; all characters following are ignored.

Page 205: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Function Package Assembler Functions 205

Table Functions

TBUPDATE - Update a CellUpdates an in-storage table cell. Returns 1 if the cell was successfully updated. Returns 0 if the table, column, or row cannot be found or if the update was not successful.

Syntax

>>----TBUPDATE(table,column,row,update)----------<<

Examplestbupdate('@RCFCNTL','LOG','CICSA','1')-> 1

tbupdate('@rcfcntl','LOG','cicsa','1')-> 1

tbupdate('JUNKCNTL','LOG','CICSA','1')-> 0 (tbl not found)

tbupdate('@RCFCNTL','JNK','CICSA','1')-> 0 (col not found)

tbupdate('@RCFCNTL','LOG','JUNKA','1')-> 0 (row not found)

table Name of the REXX table, required. A maximum of 32 characters is allowed.

column Name of the column of the cell to be updated, required.

row Name, or ID, of the row of the cell to be updated. This argument is required for non-keyed tables. For keyed tables, the argument is optional. If this argument is omitted, the current values of the key variables will be fetched from the REXX environment to be used as the row search criteria.

update Cell update value, required. The new cell information may be a null value or any data string up to the maximum update cell size of 65520 bytes.

Page 206: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Table Functions

206 Integrated Resource Manager Functions and Other Facilities Version 500

Page 207: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Functions 207

REXX Functions

IntroductionThe REXX functions have been written to extend the function capabilities of the REXX language provided by the built-in functions and TSO/E extended functions.

The functions are written in REXX and each of the individual compiled function modules is link edited into the function package directory, KAURXFPD1.

Chapter ContentsActive Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208Application Call Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230CA7 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242IRM Utility Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254

1. Refer to Chapter 1 Introduction beginning on page 19 for further information on the REXX Function Package.

2

Page 208: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Active Functions

208 Integrated Resource Manager Functions and Other Facilities Version 500

Active Functions

@AFRACTV - AF/REMOTE Active FunctionChecks the state of the AF/OPERATOR<=>AF/REMOTE communication link. Returns 1 if communication is active and 0 if not.

Syntax

>>-----@AFRACTV(cons)----------<<

Notes

All execution errors force termination of this exec as well as the calling exec via a call to the ABEND function specifying a user 222 abend.

This function is a component of a separately billable item and cannot be executed without the proper authentication from Candle Corporation.

Examples@afractv('0624') -> 1

@afractv('XYZ') -> 0

cons AF/REMOTE console address, optional. If not specified, the default is the value of the @AFRAFRC system variable.

Page 209: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Functions 209

Active Functions

@BDTACTV - BDT Node Active FunctionDetermines the current state of the specified BDT node. Returns 1 if the node is active and 0 if not.

Syntax

>>-----@BDTACTV(bdt_node)----------<<

Notes

All execution errors force termination of this exec as well as the calling exec via a call to the ABEND function specifying a user 222 abend.

Examples@bdtactv('MIAMIDBT') -> 1

@bdtactv('BDTNODE2') -> 0

bdt_node Name of the BDT node, required.

Page 210: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Active Functions

210 Integrated Resource Manager Functions and Other Facilities Version 500

@DB2DACT - DB2 Database Active FunctionChecks the status of a DB2 database. Returns 1 if the database is active and 0 if not.

Syntax

>>-----@DB2DACT(database,state)----------<<

Notes

All execution errors force termination of this exec as well as the calling exec via a call to the ABEND function specifying a user 222 abend.

This function is a component of a separately billable item and cannot be executed without the proper authentication from Candle Corporation.

Examples@db2dact('DB2DB1') -> 1

@db2dact('DB2DB0') -> 0

database Name of the DB2 database, required.

state Desired state of the database, required. Valid values are:� ACTIVE Database is active� INACTIVE Database is inactiveIf not specified, the default is ACTIVE. Only the first character of the argument is significant; all others are ignored.

Page 211: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Functions 211

Active Functions

@DB2SACT - DB2 Tablespace Active FunctionChecks the status of a DB2 tablespace. Returns 1 if the tablespace is active and 0 if not.

Syntax

>>-----@DB2DACT(tablespace,state)----------<<

Notes

All execution errors force termination of this exec as well as the calling exec via a call to the ABEND function specifying a user 222 abend.

This function is a component of a separately billable item and cannot be executed without the proper authentication from Candle Corporation.

Examples@db2sact('DB2TS1') -> 1

@db2sact('DB2TS0') -> 0

tablespace Name of the DB2 tablespace, required.

state Desired state of the database, required. Valid values are:� ACTIVE Database is active� INACTIVE Database is inactiveIf not specified, the default is ACTIVE. Only the first character of the argument is significant; all others are ignored.

Page 212: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Active Functions

212 Integrated Resource Manager Functions and Other Facilities Version 500

@IMSAACT - IMS APPC Active FunctionDetermines the current state of the APPC resource for an IMS control region. Returns 1 if IMS/APPC is active and 0 if not.

Syntax

>>-----@IMSAACT(ims_regn)----------<<

Notes

All execution errors force termination of this exec as well as the calling exec via a call to the ABEND function specifying a user 222 abend.

This function is a component of a separately billable item and cannot be executed without the proper authentication from Candle Corporation.

Examples@imsaact('IMS71CTL') -> 1

@imsaact('IMS5') -> 0

ims_regn IMS control region name, required. A region alias or an IMS subsystem ID can be specified instead of the IMS control region name. A maximum of eight characters is allowed.

The name of the control region can be specified in a system or global AF/OPERATOR variable by specifying the variable name - prefaced by an ampersand - instead of the control region name:

call @imsaact '&CTLREGN'

Page 213: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Functions 213

Active Functions

@IMSDACT - IMS Database Active FunctionDetermines the current state of an IMS database. Returns 1 if the database is active and 0 if not.

Syntax

>>-----@IMSDACT(ims_regn,ims_db)----------<<

Notes

All execution errors force termination of this exec as well as the calling exec via a call to the ABEND function specifying a user 222 abend.

This function is a component of a separately billable item and cannot be executed without the proper authentication from Candle Corporation.

Examples@imsdact('IMS71CTL','IMS71DB1') -> 1

@imsdact('IMS5','IMS71DB2') -> 0

ims_regn IMS control region name, required. A region alias or an IMS subsystem ID can be specified instead of the IMS control region name. A maximum of eight characters is allowed.

The name of the control region can be specified in a system or global AF/OPERATOR variable by specifying the variable name - prefaced by an ampersand - instead of the control region name:

call @imsdact '&CTLREGN','DATABASE'

ims_db Name of the IMS database, required.

Page 214: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Active Functions

214 Integrated Resource Manager Functions and Other Facilities Version 500

@IMSLACT - IMS Link Active FunctionDetermines the current state of an IMS link. Returns 1 if the link is active and 0 if not.

Syntax

>>-----@IMSLACT(ims_regn,ims_link)----------<<

Notes

All execution errors force termination of this exec as well as the calling exec via a call to the ABEND function specifying a user 222 abend.

This function is a component of a separately billable item and cannot be executed without the proper authentication from Candle Corporation.

Examples@imslact('IMS71CTL','IMS71MSC') -> 1

@imslact('IMS5','IMS71MSC') -> 0

ims_regn IMS control region name, required. A region alias or an IMS subsystem ID can be specified instead of the IMS control region name. A maximum of eight characters is allowed.

The name of the control region can be specified in a system or global AF/OPERATOR variable by specifying the variable name - prefaced by an ampersand - instead of the control region name:

call @imslact '&CTLREGN','LINK'

ims_link Name of the IMS link, required.

Page 215: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Functions 215

Active Functions

@IMSNACT - IMS Node Active FunctionDetermines the current state of an IMS node. Returns 1 if the node is active and 0 if not.

Syntax

>>-----@IMSNACT(ims_regn,ims_node)----------<<

Notes

All execution errors force termination of this exec as well as the calling exec via a call to the ABEND function specifying a user 222 abend.

This function is a component of a separately billable item and cannot be executed without the proper authentication from Candle Corporation.

Examples@imsnact('IMS71CTL','IMS71DC') -> 1

@imsnact('IMS5','IMS71DC') -> 0

ims_regn IMS control region name, required. A region alias or an IMS subsystem ID can be specified instead of the IMS control region name. A maximum of eight characters is allowed.

The name of the control region can be specified in a system or global AF/OPERATOR variable by specifying the variable name - prefaced by an ampersand - instead of the control region name:

call @imsnact '&CTLREGN','NODE'

ims_node Name of the IMS node, required.

Page 216: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Active Functions

216 Integrated Resource Manager Functions and Other Facilities Version 500

@IMSRACT - IMS Area Active FunctionDetermines the current state of an IMS area. Returns 1 if the area is active and 0 if not.

Syntax

>>-----@IMSRACT(ims_regn,ims_area)-----------<<

Notes

All execution errors force termination of this exec as well as the calling exec via a call to the ABEND function specifying a user 222 abend.

This function is a component of a separately billable item and cannot be executed without the proper authentication from Candle Corporation.

Examples@imsract('IMS71CTL','IMS71DBA') -> 1

@imsract('IMS5','IMS71DBA') -> 0

ims_regn IMS control region name, required. A region alias or an IMS subsystem ID can be specified instead of the IMS control region name. A maximum of eight characters is allowed.

The name of the control region can be specified in a system or global AF/OPERATOR variable by specifying the variable name - prefaced by an ampersand - instead of the control region name:

call @imsract '&CTLREGN','AREA'

ims_area Name of the IMS area, required.

Page 217: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Functions 217

Active Functions

@IMSSACT - IMS Subsystem Active FunctionDetermines the current state of the specified IMS subsystem. Returns 1 if the subsystem is active and 0 if not.

Syntax

>>-----@IMSSACT(ims_regn,ims_ssys)----------<<

Notes

All execution errors force termination of this exec as well as the calling exec via a call to the ABEND function specifying a user 222 abend.

This function is a component of a separately billable item and cannot be executed without the proper authentication from Candle Corporation.

Examples@imssact('IMS71CTL','IMS71DB2') -> 1

@imssact('IMS5','IMS71DB2') -> 0

ims_regn IMS control region name, required. A region alias or an IMS subsystem ID can be specified instead of the IMS control region name. A maximum of eight characters is allowed.

The name of the control region can be specified in a system or global AF/OPERATOR variable by specifying the variable name - prefaced by an ampersand - instead of the control region name:

call @imssact '&CTLREGN','SUBSYS'

ims_ssys IMS subsystem name, required. A maximum of eight characters is allowed.

Page 218: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Active Functions

218 Integrated Resource Manager Functions and Other Facilities Version 500

@IMSTACT - IMS Transaction Active FunctionDetermines the current state of an IMS transaction. Returns 1 if the transaction is active and 0 if not.

Syntax

>>-----@IMSTACT(ims_regn,ims_tran)----------<<

Notes

All execution errors force termination of this exec as well as the calling exec via a call to the ABEND function specifying a user 222 abend.

This function is a component of a separately billable item and cannot be executed without the proper authentication from Candle Corporation.

Examples@imstact('IMS71CTL','IMS71TRN') -> 1

@imstact('IMS5','IMS71TRN') -> 0

ims_regn IMS control region name, required. A region alias or an IMS subsystem ID can be specified instead of the IMS control region name. A maximum of eight characters is allowed.

The name of the control region can be specified in a system or global AF/OPERATOR variable by specifying the variable name - prefaced by an ampersand - instead of the control region name:

call @imstact '&CTLREGN','TRAN'

ims_tran Name of the IMS transaction, required.

Page 219: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Functions 219

Active Functions

@IMSTAFA - IMS TAF Session Active FunctionDetermines the current state of an IMS TAF session. Returns 1 if the session is active and 0 if not.

Syntax

>>-----@IMSTAFA(ims_regn,session)----------<<

Notes

All execution errors force termination of this exec as well as the calling exec via a call to the ABEND function specifying a user 222 abend.

This function is a component of a separately billable item and cannot be executed without the proper authentication from Candle Corporation.

Examples@imstafa('IMS71CTL','IMS71TAF') -> 1

@imstafa('IMS5','IMS71TAF') -> 0

ims_regn IMS control region name, required. A region alias or an IMS subsystem ID can be specified instead of the IMS control region name. A maximum of eight characters is allowed.

The name of the control region can be specified in a system or global AF/OPERATOR variable by specifying the variable name - prefaced by an ampersand - instead of the control region name:

call @imstafa '&CTLREGN','SESSION'

session Name of the Netview Session ID, required.

Page 220: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Active Functions

220 Integrated Resource Manager Functions and Other Facilities Version 500

@JES2LGN - JES2 VTAM Interface Active FunctionDetermines if the specified JES2 VTAM interface is active. Returns 1 if the interface is active and 0 if not.

Syntax

>>-----@JES2LGN(jes_lgn,jes_chr)----------<<

Notes

All execution errors force termination of this exec as well as the calling exec via a call to the ABEND function specifying a user 222 abend.

Examples@jes2lgn('LOGON2','?') -> 1

@jes2lgn('LGNN') -> 0

jes_lgn Name of the JES2 VTAM interface (LGNn or LOGONn), required.

jes_chr JES2 command character, optional. If the default JES2 command character is not used by the target JES2 subsystem, specify an override command character with this argument. The default JES2 command character is a $.

Page 221: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Functions 221

Active Functions

@JES2LNE - JES2 RJE/NJE Line Active FunctionDetermines if the specified JES2 RJE/NJE line is active. Returns 1 if the line is active and 0 if not.

Syntax

>>-----@JES2LNE(jes_lne,jes_chr)-----------<<

Notes

All execution errors force termination of this exec as well as the calling exec via a call to the ABEND function specifying a user 222 abend.

Examples@jes2lne('LINE2','?') -> 1

@jes2lne('LNE') -> 0

jes_lne Name of the JES2 RJE/NJE line (LINEn or LNEn), required.

jes_chr JES2 command character, optional. If the default JES2 command character is not used by the target JES2 subsystem, specify an override command character with this argument. The default JES2 command character is a $.

Page 222: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Active Functions

222 Integrated Resource Manager Functions and Other Facilities Version 500

@MQUCACT - MQ Channel Active FunctionChecks the status of an MQ channel. Returns 1 if the channel is active and 0 if not.

Syntax

>>-----@MQUCACT(channel,state)----------<<

Notes

All execution errors force termination of this exec as well as the calling exec via a call to the ABEND function specifying a user 222 abend.

This function is a component of a separately billable item and cannot be executed without the proper authentication from Candle Corporation.

Examples@mqucact('MQCH1') -> 1

@mqucact('MQCH0') -> 0

channel Name of the MQ channel, required.

state Desired state of the channel, required. Valid values are:� ACTIVE Channel is active� INACTIVE Channel is inactiveIf not specified, the default is ACTIVE. Only the first character of the argument is significant; all others are ignored.

Page 223: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Functions 223

Active Functions

@MQULACT - MQ Listener Active FunctionChecks the status of an MQ listener. Returns 1 if the listener is active and 0 if not.

Syntax

>>-----@MQULACT(listener,state)----------<<

Notes

All execution errors force termination of this exec as well as the calling exec via a call to the ABEND function specifying a user 222 abend.

This function is a component of a separately billable item and cannot be executed without the proper authentication from Candle Corporation.

Examples@mqulact('MQLIST1') -> 1

@mqulact('MQLIST0') -> 0

listener Name of the MQ listener, required.

state Desired state of the listener, required. Valid values are:� ACTIVE Listener is active� INACTIVE Listener is inactiveIf not specified, the default is ACTIVE. Only the first character of the argument is significant; all others are ignored.

Page 224: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Active Functions

224 Integrated Resource Manager Functions and Other Facilities Version 500

@MQUSACT - MQ Command Server Active FunctionChecks the status of an MQ Command server. Returns 1 if the command server is active and 0 if not.

Syntax

>>-----@MQUSACT(server,state)----------<<

Notes

All execution errors force termination of this exec as well as the calling exec via a call to the ABEND function specifying a user 222 abend.

This function is a component of a separately billable item and cannot be executed without the proper authentication from Candle Corporation.

Examples@mqusact('MQCS1') -> 1

@mqusact('MQCS0') -> 0

server Name of the MQ command server, required.

state Desired state of the command server, required. Valid values are:� ACTIVE Command server is active� INACTIVE Command server is inactiveIf not specified, the default is ACTIVE. Only the first character of the argument is significant; all others are ignored.

Page 225: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Functions 225

Active Functions

@P2PCOM1 - Peer-to-Peer COM1 Active FunctionChecks the status of the COM1 facility against a supplied desired state. Returns 1 if the condition is true and 0 if not.

Syntax

>>-----@P2PCOM1(state)----------<<

Notes

All execution errors force termination of this exec as well as the calling exec via a call to the ABEND function specifying a user 222 abend.

Examples@p2pcom1('A') -> 1

@p2pcom1('I') -> 0

state Desired state of COM1, required. Valid values are:� ACTIVE COM1 is active� INACTIVE COM1 is inactiveIf not specified, the default is ACTIVE. Only the first character of the argument is significant; all others are ignored.

Page 226: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Active Functions

226 Integrated Resource Manager Functions and Other Facilities Version 500

@P2PLNKA - Peer-to-Peer Link Active FunctionChecks the status of a peer link against a supplied desired state. Returns 1 if the peer link is in the desired state and 0 if not.

Syntax

>>-----@P2PLNKA(linkid,state)----------<<

Notes

All execution errors force termination of this exec as well as the calling exec via a call to the ABEND function specifying a user 222 abend.

Examples@p2plnka('LINKSP23','A') -> 1

@p2plnka('LINKMVSA','U') -> 0

linkid Name of the link to check, required.

state Desired state of the link, required. Valid values are:� ACTIVE Link is active� DEFINED Link is defined� INACTIVE Link is inactive� UNDEFINEDLink is undefinedIf not specified, the default is ACTIVE. Only the first character of the argument is significant; all others are ignored.

Page 227: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Functions 227

Active Functions

@RCFACTV - Started Task Manager Active FunctionChecks the status of a Started Task Manager object against a supplied desired state. Returns 1 if the condition is true and 0 if it is not.

Syntax

>>-----@RCFACTV(object,state)----------<<

For a simple active check, a resource is considered active if one of the following conditions is true: the active routine for the resource defined by the user indicates that the resource is active or the AF/OPERATOR ACTIVE() function indicates that the resource is active.

For a general active check, a resource is considered active if one of the following conditions is true: the active routine for the resource defined by the user indicates that the resource is active, the AF/OPERATOR ACTIVE() function indicates that the resource is active, or if the resource has been defined as a subtask or an IPL only task.

For an extended active check, a resource is considered active if the Started Task Manager status variable indicates the resource is active and one of the following conditions is true: the active routine for the resource defined by the user indicates that the resource is active, the AF/OPERATOR ACTIVE() function indicates that the resource is active, or if the resource has been defined as a subtask or an IPL only task.

object Name of the Started Task Manager object, required.

state Desired state of the object, required. Valid values are:

� ACTIVE Simple active check� GACTIVE General active check� XACTIVE Extended active check� INACTIVE Simple inactive check� GINACTIVE General inactive check� XINACTIVE Extended inactive check

Page 228: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Active Functions

228 Integrated Resource Manager Functions and Other Facilities Version 500

Notes

All execution errors force termination of this exec as well as the calling exec via a call to the ABEND function specifying a user 222 abend.

Examples@rcfactv('JES3','A') -> 1

@rcfactv('NOTASK','A') -> 0

Page 229: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Functions 229

Active Functions

@RCFLACT - Started Task Manager List Active FunctionChecks the status of the objects in a Started Task Manager list. Returns 1 if all objects in the list are active and 0 if not.

Syntax

>>-----@RCFLACT(listname)----------<<

Notes

All execution errors force termination of this exec as well as the calling exec via a call to the ABEND function specifying a user 222 abend.

Examples@rcflact('IMS61') -> 0

@rcflact('IMS71') -> 1

listname Name of the Started Task Manager list, required.

Page 230: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Application Call Functions

230 Integrated Resource Manager Functions and Other Facilities Version 500

Application Call Functions

@AFRCALL - AF/REMOTE Manager Call FunctionProcesses a function request call to AF/REMOTE. Returns 1 if the requested function is successful and 0 if the function failed or timed out.

Syntax

>>--@AFRCALL(function,object,options,interval,cons)-<<

Notes

All execution errors force termination of this exec as well as the calling exec via a call to the ABEND function specifying a user 222 abend.

The AF/OPERATOR task name must be specified in the function request WTOR. AF/REMOTE will not accept the function request unless the WTOR is

function A keyword for the requested function, required. For example, specify 'INIT' to initialize automation controls and start the specified object. Any valid keyword abbreviation is allowed. For more information on function keywords, see the AFR command documentation.

object Name, or name pattern, of the objects to perform the function for, required. For more information on valid objects, see the AFR command documentation.

options Keywords for the options to be used on this call, optional. Multiple options can be specified by separating each of the option keywords with a blank. For more information on specifying options, see the AFR command documentation.

interval Timeout interval in military time format (hh:mm:ss), optional. If not specified, the default is 00:05:00, 5 minutes.

cons AF/REMOTE Console address, optional. If omitted, the default is the value of the @APLAFRC system variable.

Page 231: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Functions 231

Application Call Functions

generated by AF/OPERATOR. This requirement is used to prevent unauthorized access to AF/REMOTE services.

The AF/REMOTE object must be the system SMF ID. This requirement is used to ensure that function requests are received from the correct system.

This function is a component of a separately billable item and cannot be executed without the proper authentication from Candle Corporation.

Examples@afrcall('INIT','MVSA',,,'0624') -> 1

@afrcall('SHUTDOWN','MVSB') -> 0

Page 232: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Application Call Functions

232 Integrated Resource Manager Functions and Other Facilities Version 500

@APLCALL - Application Manager Call FunctionProcesses an internal call to the Application Manager. Returns 1 if the requested function is successful and 0 if not.

Syntax

>>-----@APLCALL(function,objects,options)---------<<

Notes

All execution erros force termination of this exec as well as the calling exec via a call to the ABEND function specifying a user 222 abend.

Examples@aplcall('START','RCF') -> 1

@aplcall('SET','VARIABLE','WTOR=##') -> 1

@aplcall('DISPLAY','VARIABLE','PFXA') -> 1

function A keyword for the requested function, required. For example, specify ‘INIT’ to initialize automation controls and start the specified object. Any valid keyword abbreviation is allowed. For more information on function keywords, see the APL command documentation.

objects Name, or name pattern, of the objects to perform the function for, required. For more information on valid objects, see the APL command documentation.

options Keywords for the options to be used on this call, optional. Multiple options can be specified by separating each of the option keywords with a blank. For more information on specifying options, see the APL command documentation.

Page 233: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Functions 233

Application Call Functions

@CCFCALL - Command Manager Call FunctionProcesses an internal call to the Command Manager. Returns 1 if the requested function is successful and 0 if not.

Syntax

>>-----@CCFCALL(function,object,options)----------<<

Notes

All execution errors force termination of this exec as well as the calling exec via a call to the ABEND function specifying a user 222 abend.

Examples@ccfcall('DISABLE','ABCCMD','CONSOLE=1 FORCE') -> 1

@ccfcall('DISABLE','GROUP','XRF=ACT CONSOLE=1')-> 1

function A keyword for the requested function, required. For example, specify ‘INIT’ to initialize automation controls and start the specified object. Any valid keyword abbreviation is allowed. For more information on function keywords, see the CCF command documentation.

object Name, or name pattern, of the objects to perform the function for, required. For more information on valid objects, see the CCF command documentation.

options Keywords for the options to be used on this call, optional. Multiple options can be specified by separating each of the option keywords with a blank. For more information on specifying options, see the CCF command documentation.

Page 234: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Application Call Functions

234 Integrated Resource Manager Functions and Other Facilities Version 500

@CNSCALL - Console Manager Call FunctionProcesses an internal call to the Console Manager. Returns 1 if the requested function is successful and 0 if not.

Syntax

>>------@CNSCALL(function,object,options)---------<<

Notes

All execution errors force termination of this exec as well as the calling exec via a call to the ABEND function specifying a user 222 abend.

Examples@cnscall('INIT','CONSOLE01') -> 1

@cnscall('STOP','NOCONS') -> 0

function A keyword for the requested function, required. For example, specify ‘INIT’ to initialize automation controls and start the specified object. Any valid keyword abbreviation is allowed. For more information on function keywords, see the CCF command documentation.

object Name, or name pattern, of the objects to perform the function for, required. For more information on valid objects, see the CNS command documentation.

options Keywords for the options to be used on this call, optional. Multiple options can be specified by separating each of the option keywords with a blank. For more information on specifying options, see the CNS command documentation.

Page 235: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Functions 235

Application Call Functions

@DEVCALL - Device Manager Call FunctionProcesses an internal call to the Device Manager. Returns 1 if the requested function is successful and 0 if not.

Syntax

>>-----@DEVCALL(function,object,options)----------<<

Notes

All execution errors force termination of this exec as well as the calling exec via a call to the ABEND function specifying a user 222 abend.

Examples@devcall('START','VTAMCTC1') -> 1

@devcall('START','VTAMCTC1','FORCE') -> 1

@devcall('STOP','NODEV') -> 0

function A keyword for the requested function, required. For example, specify 'INIT' to initialize automation controls and start the specified object. Any valid keyword abbreviation is allowed. For more information on function keywords, see the DEV command documentation

object Name, or name pattern, of the objects to perform the function for, required. For more information on valid objects, see the DEV command documentation.

options Keywords for the options to be used on this call, optional. Multiple options can be specified by separating each of the option keywords with a blank. For more information on specifying options, see the DEV command documentation

Page 236: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Application Call Functions

236 Integrated Resource Manager Functions and Other Facilities Version 500

@JESCALL - JES Manager Call FunctionProcesses an internal call to the JES Manager. Returns 1 if the requested function is successful and 0 if not.

Syntax

>>------@JESCALL(function,object,options)---------<<

Notes

All execution errors force termination of this exec as well as the calling exec via a call to the ABEND function specifying a user 222 abend.

Examples@jescall('INIT','GROUP','GIMS') -> 1

@jescall('INIT','GROUP','NONAME') -> 0

function A keyword for the requested function, required. For example, specify 'INIT' to initialize automation controls and start the specified object. Any valid keyword abbreviation is allowed. For more information on function keywords, see the JES command documentation

object Name, or name pattern, of the objects to perform the function for, required. For more information on valid objects, see the JES command documentation.

options Keywords for the options to be used on this call, optional. Multiple options can be specified by separating each of the option keywords with a blank. For more information on specifying options, see the JES command documentation

Page 237: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Functions 237

Application Call Functions

@MCFCALL - Message Manager Call FunctionProcesses an internal call to the Message Manager. Returns 1 if the requested function is successful and 0 if not.

Syntax

>>-----@MCFCALL(function,object,options)----------<<

Notes

All execution errors force termination of this exec as well as the calling exec via a call to the ABEND function specifying a user 222 abend.

Examples@mcfcall('DISABLE','IEF403I','CONSOLE=1 FORCE')-> 1

@mcfcall('DISABLE','GROUP','MS2=IMS') -> 1

@mcfcall('ENABLE','BADTRAPNAME') -> 0

function A keyword for the requested function, required. For example, specify 'INIT' to initialize automation controls and start the specified object. Any valid keyword abbreviation is allowed. For more information on function keywords, see the MCF command documentation.

object Name, or name pattern, of the objects to perform the function for, required. For more information on valid objects, see the MCF command documentation.

options Keywords for the options to be used on this call, optional. Multiple options can be specified by separating each of the option keywords with a blank. For more information on specifying options, see the MCF command documentation.

Page 238: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Application Call Functions

238 Integrated Resource Manager Functions and Other Facilities Version 500

@RCFCALL - Started Task Manager Internal Call FunctionProcesses an internal call to the Started Task Manager. Returns 1 if the requested function is successful and 0 if not

Syntax

>>-----@RCFCALL(function,object,options)----------<<

Notes

All execution errors force termination of this exec as well as the calling exec via a call to the ABEND function specifying a user 222 abend.

Examples@rcfcall('START','CICS*') -> 1

@rcfcall('STOP','CICS*','I') -> 1

@rcfcall('START','LIST','LIST=JES3DSI WAIT=00:30:00') -> 1

@rcfcall('BADFUNC','CICSREGN') -> 0

function A keyword for the requested function, required. For example, specify 'INIT' to initialize automation controls and start the specified object. Any valid keyword abbreviation is allowed. For more information on function keywords, see the RCF command documentation.

object Name, or name pattern, of the objects to perform the function for, required. For more information on valid objects, see the RCF command documentation.

options Keywords for the options to be used on this call, optional. Multiple options can be specified by separating each of the option keywords with a blank. For more information on specifying options, see the RCF command documentation.

Page 239: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Functions 239

Application Call Functions

@SCFCALL - Schedule Manager Internal Call FunctionProcesses an internal call to the Schedule Manager. Returns 1 if the requested function is successful and 0 if not.

Syntax

>>-----@SCFCALL(function,object,options)----------<<

Notes

All execution errors force termination of this exec as well as the calling exec via a call to the ABEND function specifying a user 222 abend.

Examples@scfcall('DISABLE','QPURGE') -> 1

@scfcall('ENABLE','BADCMDNAME') -> 0

function A keyword for the requested function, required. For example, specify 'INIT' to initialize automation controls and start the specified object. Any valid keyword abbreviation is allowed. For more information on function keywords, see the SCF command documentation.

object Name, or name pattern, of the objects to perform the function for, required. For more information on valid objects, see the SCF command documentation.

options Keywords for the options to be used on this call, optional. Multiple options can be specified by separating each of the option keywords with a blank. For more information on specifying options, see the SCF command documentation.

Page 240: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Application Call Functions

240 Integrated Resource Manager Functions and Other Facilities Version 500

@TBLCALL - Table Manager Call FunctionProcesses an internal call to the Table Manager. Returns 1 if the requested function is successful and 0 if not.

Syntax

>>-----@TBLCALL(function,objects,options)---------<<

Notes

All execution errors force termination of this exec as well as the calling exec via a call to the ABEND function specifying a user 222 abend.

Examples@tblcall('REFRESH','@RCF*') -> 1

@tblcall('DELETE','@APLMSGS') -> 1

@tblcall('LOAD','NOTBLNAME') -> 0

function A keyword for the requested function, required. For example, specify 'INIT' to initialize automation controls and start the specified object. Any valid keyword abbreviation is allowed. For more information on function keywords, see the TBL command documentation.

objects Name, or name pattern, of the objects to perform the function for, required. For more information on valid objects, see the TBL command documentation.

options Keywords for the options to be used on this call, optional. Multiple options can be specified by separating each of the option keywords with a blank. For more information on specifying options, see the TBL command documentation.

Page 241: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Functions 241

Application Call Functions

@VTMCALL - VTAM Manager Internal Call FunctionProcesses an internal call to the VTAM Manager. Returns 1 if the requested function is successful and 0 if not

Syntax

>>-----@VTMCALL(function,object,options)----------<<

Notes

All execution errors force termination of this exec as well as the calling exec via a call to the ABEND function specifying a user 222 abend.

Examples@vtmcall('START','LINE1') -> 1

@vtmcall('START','LINE1','FORCE') -> 1

@vtmcall('START','NOVTMNAME') -> 0

function A keyword for the requested function, required. For example, specify 'INIT' to initialize automation controls and start the specified object. Any valid keyword abbreviation is allowed. For more information on function keywords, see the VTM command documentation.

object Name, or name pattern, of the objects to perform the function for, required. For more information on valid objects, see the VTM command documentation.

options Keywords for the options to be used on this call, optional. Multiple options can be specified by separating each of the option keywords with a blank. For more information on specifying options, see the VTM command documentation.

Page 242: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

CA7 Functions

242 Integrated Resource Manager Functions and Other Facilities Version 500

CA7 Functions

@CA7DMD - CA7 Demand Job FunctionDemands a job into the CA7 request queue. Returns 1 if the demand is successful and 0 if not.

Syntax

>>-----@CA7DMD(job,sid,jid,opt,add)----------<<

job Name of the CA7 batch job to demand, required. A maximum of eight characters is allowed.

sid Job schedule ID, optional. Must be numeric and in the range of 1 to 255. The default schedule ID is 1.

jid CA7 JCL ID, optional. Must be numeric and in the range of 0 to 254. The default JCL ID is 0.

opt CA7 DEMAND command option, optional. Valid values are:� HOLD - Place on hold in the request queue

(DEMANDH command).� NTR - Disable the normal job triggering only for this

run of the job (SET=NTR option).� NDB - Bypass database update at job completion

(SET=NDB option).� SKP - Indicates this run of the job should take the

place of the next scheduled run of the job (SET=SKP option).

Only the capitalized letter(s) of the keyword is needed; all characters following are ignored.

Page 243: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Functions 243

CA7 Functions

Notes

All execution errors force termination of this exec as well as the calling exec via a call to the ABEND function specifying a user 222 abend.

Examples@ca7dmd('JOBNM','255',,'S','CLASS=N') -> 1

@ca7dmd('JOBNM',,,'ND') -> 1

@ca7dmd('JOBNM','0','255') -> 0

@ca7dmd('JOBNM',,,'I') -> 0

add Additional options to be added to the CA7 command, optional. Multiple command options may be specified by separating each option with a blank or a comma. For example, ‘DATE=99360 DOTM=1600’. Valid values are:� ARFSET=setname� CC=nnn� CLASS=x� DATE=+nn� DEPJOB=jobname� DOTM=hhmm� LEADTM=hhmm� PRTY=nnn� RO=rr� SET=SKP� SET=NTR� SET=NDB� TIME=hhmm� TIME=+hhmm� TYPE=RES

Page 244: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

CA7 Functions

244 Integrated Resource Manager Functions and Other Facilities Version 500

@CA7FCMP - CA7 Force Complete FunctionForce complete a job in CA7. Returns 1 if the force complete is successful and 0 if not.

Syntax

>>-----@CA7FCMP(job,reason)--------------<<

Notes

All execution errors force termination of this exec as well as the calling exec via a call to the ABEND function specifying a user 222 abend.

Examples@ca7fcmp('JOBNM','Abend OK') -> 1

@ca7fcmp('JOBNM') -> 1

@ca7fcmp('JOBNM','More than 40 characters') -> 0

job Name or number of the CA7 batch job to force complete, required. For a job name, a maximum of eight characters is allowed. For a job number, a maximum of four digits is allowed.

reason The reason for forced completion of the job, optional. If not specified, the default is ‘AF/Operator’. The reason parameter is case sensitive. A maximum of 40 characters is allowed.

Page 245: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Functions 245

CA7 Functions

@CA7HOLD - CA7 Hold Job FunctionPlaces a hold on a CA7 job. Returns 1 if the hold is successful and 0 if not

Syntax

>>-----@CA7HOLD(job)----------<<

Notes

All execution errors force termination of this exec as well as the calling exec via a call to the ABEND function specifying a user 222 abend.

Examples@ca7hold('JOBNM') -> 1

@ca7hold() -> 0

job Name or number of the CA7 batch job to place a hold on, required. For a job name, a maximum of eight characters is allowed. For a job number, a maximum of four digits is allowed.

Page 246: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

CA7 Functions

246 Integrated Resource Manager Functions and Other Facilities Version 500

@CA7LOGF - CA7 Console Logoff FunctionLogs off CA7 via an MCS console. Returns 1 if the logoff is successful and 0 if not.

Syntax

>>-----@CA7LOGF(task)----------<<

Notes

All execution errors force termination of this exec as well as the calling exec via a call to the ABEND function specifying a user 222 abend.

Examples@ca7logf('CA7') -> 1

@ca7logf() -> 0

task Name of the CA7 task, required. A maximum of eight characters is allowed.

Page 247: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Functions 247

CA7 Functions

@CA7LOGN - CA7 Console Logon FunctionLogs onto CA7 via an MCS console. Returns 1 if the logon is successful and 0 if not.

Syntax

>>-----@CA7LOGN(task)----------<<

Notes

All execution errors force termination of this exec as well as the calling exec via a call to the ABEND function specifying a user 222 abend.

Examples@ca7logn('CA7') -> 1

@ca7logn() -> 0

task Name of the CA7 task, required. A maximum of eight characters is allowed.

Page 248: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

CA7 Functions

248 Integrated Resource Manager Functions and Other Facilities Version 500

@CA7PDSN - CA7 Post Dataset Requirement FunctionPosts a CA7 external dataset requirement as satisfied. Returns 1 if the post is successful and 0 if not.

Syntax

>>-----@CA7PDSN(dsn)----------<<

Notes

All execution errors force termination of this exec as well as the calling exec via a call to the ABEND function specifying a user 222 abend.

Examples@ca7pdsn('MY.DATA.SET') -> 1

@ca7pdsn('') -> 0

dsn Name of the CA7 external dataset to be posted as satisfied, required. A maximum of 44 characters is allowed.

Page 249: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Functions 249

CA7 Functions

@CA7RLSE - CA7 Release Job FunctionReleases a CA7 job on hold. Returns 1 if the release is successful and 0 if not.

Syntax

>>-----@CA7RLSE(job)----------<<

Notes

All execution errors force termination of this exec as well as the calling exec via a call to the ABEND function specifying a user 222 abend.

Examples@ca7rlse('JOBNM') -> 1

@ca7rlse('') -> 0

job Name or number of the CA7 batch job to release the hold on, required. For a job name, a maximum of eight characters is allowed. For a job number, a maximum of four digits is allowed.

Page 250: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

CA7 Functions

250 Integrated Resource Manager Functions and Other Facilities Version 500

@CA7RUN - CA7 Run Job FunctionRuns a job defined to CA7. Returns 1 if the run is successful and 0 if not.

Syntax

>>-----@CA7RUN(job,sid,jid,opt,add)----------<<

job Name or number of the CA7 batch job to be run, required. A maximum of eight characters is allowed.

sid Job schedule ID, optional. Must be numeric and in the range of 1 to 255. The default schedule ID is 1.

jid CA7 JCL ID, optional. Must be numeric and in the range of 0 to 254. The default JCL ID is 0.

opt CA7 RUN command option, optional. Valid values are:� HOLD - Place on hold in the request queue (RUNH

command).

add Additional options to be added to the CA7 command, optional. Multiple command options may be specified by separating each option with a blank or a comma. For example, ‘LEADTM=1200 TYPE=RES’ or ’LEADTM=1200,TYPE=RES’. Valid values are:� ARFSET=setname� CLASS=x� DOTM=hhmm� LEADTM=hhmm� TIME=hhmm� TYPE=RES

Page 251: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Functions 251

CA7 Functions

Notes

All execution errors force termination of this exec as well as the calling exec via a call to the ABEND function specifying a user 222 abend.

Examples@ca7run('JOBNM','255',,'H','CLASS=N') -> 1

@ca7run('JOBNM',,,'DOTM=0945') -> 1

@ca7run('JOBNM','0','255') -> 0

@ca7run('JOBNM',,,'I') -> 0

Page 252: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

CA7 Functions

252 Integrated Resource Manager Functions and Other Facilities Version 500

@CA7SCMD - CA7 SVC Command FunctionIssues the specified CA7 command using the U7SVC. Returns 1 if the command is successfully sent to CA7 via the U7SVC and 0 if not.

Syntax

>>-----@CA7SCMD(cmd)----------<<

Notes

All execution errors force termination of this exec as well as the calling exec via a call to the ABEND function specifying a user 222 abend.

Examples@ca7scmd('/RUN,JOB=MYJOB') -> 1

cmd Valid CA7 command text, required. Any command that can be processed via the U7SVC is allowed. The CA7 /LOGON and /LOGOFF commands need not be added to the command text as they will be automatically added by this function. A maximum of 200 characters is allowed.

Note: This routine does not check the syntax of the CA7 command. It is the user’s responsibility to ensure that the command is syntactically correct.

Page 253: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Functions 253

CA7 Functions

@CA7PUSR - CA7 Post User Requirement FunctionPosts a CA7 external user requirement as satisfied. Returns 1 if the post is successful and 0 if not..

Syntax

>>-----@CA7PUSR(job,req)----------<<

Notes

All execution errors force termination of this exec as well as the calling exec via a call to the ABEND function specifying a user 222 abend.

Examples@ca7pusr('JOBNM','Some user reqt') -> 1

@ca7pusr('JOBNM') -> 0

job Name or number of the CA7 batch job for which this requirement is to be posted, required. For a job name, a maximum of eight characters is allowed. For a job number, a maximum of four digits is allowed.

req User defined description of the requirement to be posted as satisfied, required. User description text is case sensitive, and must match that specified to CA7 exactly. Up to 36 characters may be specified.

Page 254: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

IRM Utility Functions

254 Integrated Resource Manager Functions and Other Facilities Version 500

IRM Utility Functions

@APLCONS - Application Console FunctionValidates the specified MVS MCS console value. Returns the ID number of the console or a null value if the console is not found.

Syntax

>>-----@APLCONS(console)----------<<

Notes

All execution errors force termination of this exec as well as the calling exec via a call to the ABEND function specifying a user 222 abend.

console Name, device address, or ID of an MVS MCS console, required. The following message destination keywords are also allowed:� LOG AF/OPERATOR Message Log� SAY REXX Message Log� STK REXX Program Stack� SEND TSO Session - SEND� TPUT TSO Session - TPUT� NONE Message Bit Bucket� MLG System Message Log� MST MCS Master ConsoleNote: If a keyword value other than MST is specified, the

keyword value will be returned and not an MVS MCS console ID number.

Page 255: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Functions 255

IRM Utility Functions

Examples@aplcons('MST') -> 1

@aplcons('00E2') -> 1

@aplcons('AO000001') -> 50331712

@aplcons('SAY') -> SAY

@aplcons('SEND(LOGON)') -> SEND(LOGON)

@aplcons('TPUT') -> TPUT

@aplcons('LOG') -> LOG

@aplcons('NONE') -> NONE

@aplcons('MLG') -> MLG

@aplcons('STK') -> STK

@aplcons('NO_GOOD') -> (console not found)

Page 256: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

IRM Utility Functions

256 Integrated Resource Manager Functions and Other Facilities Version 500

@APLFMAT - Application Find Match FunctionReturns the match number for the specified trap name. If no matches are found, returns a null value. If multiple matches are found, all match numbers are returned as a string of words, each separated by a blank, sorted in ascending match number order.

Syntax

>>-----@APLFMAT(trapname)----------<<

Notes

All execution errors force termination of this exec as well as the calling exec via a call to the ABEND function specifying a user 222 abend.

Examples@aplfmat('@R1002Q') ->945

@aplfmat('@R1002Q') ->846 945 1020

@aplfmat('@R1002Q') -> (no match found)

trapname Name of the trap that created the match, required.

Page 257: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Functions 257

IRM Utility Functions

@APLLOGN - Application Logons FunctionDetermines if AF/OPERATOR is currently logged onto the specified VTAM application session. Returns 1 if AF/OPERATOR is currently logged on and 0 if not.

Syntax

>>-----@APLLOGN(applname)----------<<

Notes

All execution errors force termination of this exec as well as the calling exec via a call to the ABEND function specifying a user 222 abend.

Examples@apllogn('SYSAOMV') -> 1

@apllogn('SYSAPOV') -> 0

applname Name of the VTAM application session, as used in an AF/OPERATOR ADDRESS or AFADDR command, required. A maximum of eight characters is allowed.

Page 258: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

IRM Utility Functions

258 Integrated Resource Manager Functions and Other Facilities Version 500

@APLMSGS - Application Message FunctionRetrieves the user-specified application message from the application message table, formats the message for display, and sends it to the operator console via the WTO function. Returns the system message ID number for the WTO, which can be used to DOM the message from the operator console. If the specified application message is a WTOR, the operator’s reply will be returned instead of the system message ID number.

If the application message generates more than one WTO, a string of words will be returned where each word in the string is the system message ID number for a WTO that has been issued. If the application message is an MLWTO, which is issued as a single message even though it has multiple lines, a single system message ID number will be returned.

If the application message results in both a WTO and a WTOR being issued, and the message DOM’ing option is specified, the WTO will be DOM'ed once an operator reply is received and the reply will be returned. If the DOM option is not specified, both the system message ID number and the operator reply will be returned in the following format: ‘ids,reply'.

If the application message is issued in a manner that does not generate a WTO, a 0 will be returned instead of an actual system message ID number. Issuing an application message specifying any of the following options will result in a return of 0: LOG, SAY, STK, SEND, TPUT, or NONE.

Syntax

>>---@APLMSGS(msgid,frmt,subs,rout,desc,consid,consnm,jobnm,jobid,timeout,newsys)---<<

msgid Four character application message ID, as defined in the @APLMSGS Application Message Table, required.

frmt One or two character format number for the message, as defined in the message table, optional. If a format number is omitted, a default format number of 01 will be used. If a one character number is specified, the argument will be padded with a leading zero to form the two character number used in the table search

Page 259: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Functions 259

IRM Utility Functions

subs Optional text substitution values. If the text for the message is defined with substitution placeholders, each placeholder will be replaced with a word or a phrase from this argument. A maximum of 96 words/phrases is allowed.

Substitution placeholders are defined in the message text by coding an &n in the desired location (&1 &2 &3...&96).

During the message formatting process, each word or phrase, a string of words within quotes, specified with this argument is used to replace an &n in the message text (i.e. word 1 replaces &1, word 2 replaces &2,...). Any extra &n will be deleted. If a phrase is specified instead of a word, the phrase is used to replace &n. Words and phrases can be intermixed:

word1 'a phrase for word2' word3

&1 &2 &3

A phrase can be specified with either single or double quotes. The quotes used to define a phrase do not appear in the final message text; the quotes are deleted prior to the text formatting process. A pair of brackets can also be used to identify a phrase:

word1 {a phrase} [another phrase]

&1 &2 &3

The value of an AF/OPERATOR global or system variable can be used for a substitution value by including the name of the variable as a word in the argument string and prefacing the name of the variable with an ampersand:

word1 &glbvname &sysvname word4

&1 &2 &3 &4

Page 260: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

IRM Utility Functions

260 Integrated Resource Manager Functions and Other Facilities Version 500

rout Route codes for the message, optional. Route codes must be numeric and in the range: 1 to 128. Multiple route codes can be specified by separating each of the codes with a blank: '1 2 3 4' or a comma: '1,2,3'.

This argument overrides the route code coded in the application message table for this message. If this argument is omitted, and a route code is not coded in the application message table, the overall application default route code, defined by @APLROUT, will be used. If @APLROUT is not set, a route code of 2 will be used. If a 0 is specified, the message will be issued without a route code and will then be assigned the system default route code if one has been defined.

Note: Unauthorized callers are allowed to use route codes 1 to 28. If a code that is not in this range is specified by an unauthorized caller, an argument error condition will be raised.

desc Specifies the descriptor code for the message, optional. The descriptor code must be numeric and in the range: 0 to 13.

This argument overrides the descriptor code coded in the application message table for this message. If this argument is omitted, and a descriptor code is not coded in the application message table, the overall application default descriptor code, defined by @APLDESC, will be used. If @APLDESC is not set, a descriptor code of 6 will be used. If a 0 is specified, the message will be issued without a descriptor code (i.e. non-highlighted, non-held).

Page 261: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Functions 261

IRM Utility Functions

consid Specifies the ID of the console that is to receive the message, optional. Must be numeric and in the range: 00 to 2G-1 (2147483647). If console ID 00 is specified, the message will be issued to the MVS INTERNAL console.

Specifying the MLG keyword for consid will direct the message solely to the system hardcopy log; the message text will not be displayed on the operator console.

Specifying the LOG keyword for consid will direct the message solely to the AF/OPERATOR message log; message text will not be displayed on the operator console.

Specifying the SAY keyword for consid causes the message to be issued using the REXX SAY instruction; no WTO will be issued.

Specifying the STK keyword for consid causes the message to be put (queued) on the REXX program stack.

Specifying the SEND or SEND() keyword for consid causes the message text to be issued using the MVS SEND command. The message text will be forwarded to the userid specified in the jobnm argument. The NOW/LOGON options of the SEND command can be specified as follows: SEND(NOW) and SEND(LOGON). The TSO userid to receive the message can also be specified using the following format: SEND(userid), SEND(userid,NOW), or SEND(userid,LOGON).

Specifying the TPUT keyword for consid causes the message to be issued, using the AO TPUT command, to the TSO userid specified in the jobnm argument. The TSO userid to receive the message can also be specified using the following format: TPUT(userid).

Specifying the NONE keyword for consid causes the message not to be issued.

consnm Specifies the name of the console that is to receive the message, optional. A maximum of eight characters is allowed.

Page 262: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

IRM Utility Functions

262 Integrated Resource Manager Functions and Other Facilities Version 500

Notes

All execution errors force termination of this exec as well as the calling exec via a call to the ABEND() function specifying a user 222 abend.

Can be called in the TSO/E or ISPF environment. Internal error messages will be issued via the REXX SAY instruction rather than issuing a WTO.

Can be called in the MVS environment. Internal messages will be issued via WTO with route code 2 (Master console informational) and descriptor code 3 (Eventual action: highlighted, retained).

All execution errors force termination of this exec as well as the calling exec via a call to the REXXIC function specifying the HI (Halt Immediate) REXX command (in the TSO/E, ISPF, and MVS environments).

The TPUT and SEND console ID keywords are valid in the AFHOST environment only. Specifying TPUT or SEND in any other environment will result in a syntax error.

The JES jobnm & jobid arguments are valid in an authorized environment only. Specifying either argument in any non-authorized environment will result in a syntax error.

The newsys argument is valid for the AFHOST environment only. Specifying newsys in any other environment will result in a syntax error.

jobnm Specifies the job name associated with the WTO, optional. Job names can be a maximum of eight characters. The default is the job name of the issuer.

jobid Specifies a JES job ID associated with the WTO, optional. A JES job ID can be a maximum of eight characters. The default is the JES job ID of the issuer.

timeout Specifies a timeout value for the WTOR in seconds, optional. Must be numeric and in the range of 1 to 86400 (24 hours). A zero timeout value is not allowed.

newsys Specifies the destination LINKID for a message to be issued by a Peer-to-Peer partner. A maximum of eight characters is allowed.

Page 263: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Functions 263

IRM Utility Functions

Peer-to-Peer's cross system message support, invoked via the newsys argument, is available for a single line WTO only. The newsys argument is not supported for an MLWTO or a WTOR.

Arguments not used for a message output process are ignored. As an example, specifying a route code for a message that is to be TPUT, to a TSO user, has no effect and causes no harm.

The Automation Application message fold flag is processed by this function. If the @APLFOLD flag is on, messages are translated to upper case before being displayed on the MCS console. After substitutions, messages are truncated to a maximum of 126 characters for a WTO, 122 characters for a WTOR, or 71 characters for each line of a multi-line WTO.

Examples@aplmsgs('A000',,'Table Manager') -> ASOA000I Table Manager

Initialization Started

@aplmsgs('A040') -> ASOA040I TBL Function argument missing

@aplmsgs('A040','02') -> ASOA040I TBL Objects argument missing

@aplmsgs('A070','05') -> ## ASOA070A Reply A to Abort or C to Continue

Page 264: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

IRM Utility Functions

264 Integrated Resource Manager Functions and Other Facilities Version 500

@APLOPER - Application Command FunctionIssues the specified MVS command using OPER with RESPONSE. Returns 1 if the command was successfully issued and the response captured. Returns 0 if either the command failed or a response was not received.

Syntax

>>-----@APLOPER(command,retopts,console,timeout)---<<

command MVS command to issue to generate the response to be returned, required. A maximum of 126 characters is allowed.

retopts Response return option, optional. If not specified the return option defaults to Line. Valid values are:� LINE - Store the response in standard line variables:

LINE# and LINE1 through LINEnnnn. The prefix for the name is controlled by AOLINPFX and defaults to LINE.

� RESP - Concatenate line data from the response and return it as the result of this function (instead of a 1 or 0).

� STACK - Store the response in the REXX program stack.

console Name, or ID number, of an AF/OPERATOR EMCS console to direct the command to, optional. This argument is only valid for an AF/OPERATOR address space that uses EMCS consoles. If subsystem consoles are in use, specifying this argument will result in a syntax error.

timeout Number of seconds to wait after a WTO response before assuming that the response is complete, optional. Timeout must be numeric and in the range of 1 to 3600. If not specified, timeout will default to the value set by MAXTVAL() in OGPARMS.

Page 265: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Functions 265

IRM Utility Functions

Notes

All execution errors force termination of this exec as well as the calling exec via a call to the ABEND() function specifying a user 222 abend.

Examples@aploper('D T','LINE','AO000001',5) -> 1

@aploper('D T','RESP',, '00:00:05') -> D T IEE136I LOCAL:TIME=14.04.22DATE=2002.192GMT: TIME=21.04.22DATE=2002.192

@aploper('D T','STACK',,5) -> 1

Page 266: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

IRM Utility Functions

266 Integrated Resource Manager Functions and Other Facilities Version 500

@APLOPTS - Application Options FunctionParses the specified option string and returns the option keyword and value and the remainder of the option string. The keyword, value, and remainder are separated in the result with the ‘FF’x character: keyword.value.remainder.

Syntax

>>-----@APLOPTS(options)----------<<

Notes

All execution errors force termination of this exec as well as the calling exec via a call to the ABEND() function specifying a user 222 abend.

The @APLOPTS() function can be called using the VALUE format of the REXX PARSE command to invoke the function and parse its' result in a single statement as in the following example:

parse value @aplopts(opts) with option 'ff'x value 'ff'x opts

Examples@aplopts('TABLE(mytbl,my.data.set,dasd01,3390)'->

TABLE.mytbl,my.data.set,dasd01,3390.

options Option string to parse, required. The argument is case sensitive; the values will be returned as specified, without translation to upper case. The following option formats are supported: � KEYWORD� KEYWORD=VALUE� KEYWORD=VALUE(VALVAL)� KEYWORD(VALUE WITH IMBEDDED BLANKS)

Page 267: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Functions 267

IRM Utility Functions

@APLPTRN - Application Pattern FunctionParses the specified string and returns a pattern value which will match the string. The resulting pattern will have a not sign inserted in front of each AF/OPERATOR pattern character in the string.

Syntax

>>-----@APLPTRN(string,skipch)----------<<

Notes

All execution errors force termination of this exec as well as the calling exec via a call to the ABEND() function specifying a user 222 abend.

Examples@aplptrn('VTAM') -> VTAM

@aplptrn('SU#AOGL1') -> SU^#AOGL1

@aplptrn('&@RNAME') -> ^&@RNAME

@aplptrn('&@RNAME','&') -> &@RNAME

string A text string to parse, required. A maximum of 256 characters is allowed.

skipch Pattern characters to skip, optional. The default string of pattern characters used by the function is: ?#*¬.&. To change the pattern characters used in parsing, specify the characters to not use with this argument. The value specified for this argument must contain only characters from the default string and must not contain imbedded blanks.

Page 268: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

IRM Utility Functions

268 Integrated Resource Manager Functions and Other Facilities Version 500

@APLSSCN - Application Subsystem Console FunctionRetrieves AF/OPERATOR subsystem console information and returns that data to the caller. A list of console ID's, console names, or a keyword for the type of consoles currently in use - EMCS for extended MCS consoles or SUBSYSTEM for subsystem consoles - can be returned.

Syntax

>>-----@APLSSCN(option)----------<<

Notes

All execution errors force termination of this exec as well as the calling exec via a call to the ABEND() function specifying a user 222 abend.

The @APLSSCN() function can be called using the VALUE format of the REXX PARSE command to invoke the function and parse its' result in a single statement as in the following example:

parse value @aplsscn('A') with cons_ids';'cons_nms';'cons_typ

option Specifies what type of subsystem console information to return, optional. By default this function will return a list of subsystem console ID's. To override the default result, specify a value from the following list:� ID List of console ID's� NAME List of console names� TYPE The type of consoles in use by this

address space (EMCS or SUBSYSTEM).� ALL A list of console IDs, console names,

and the type of consoles in use. Values are separated in the result by semicolons.

Page 269: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Functions 269

IRM Utility Functions

Examples@aplsscn() -> '50331712 16777285 33554500'

@aplsscn('ID ') -> '50331712 16777285 33554500'

@aplsscn('NAME') -> 'AO000001 AO000002 AO000003'

@aplsscn('TYPE') -> 'EMCS'

@aplsscn('ALL') -> ''50331712 16777285 33554500;AO000001AO000002 AO000003;EMCS'

Page 270: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

IRM Utility Functions

270 Integrated Resource Manager Functions and Other Facilities Version 500

@APLVDCL - Application Variable Definition FunctionDefines the specified AF/OPERATOR system or global variable. Returns 1 if the variable was successfully defined and 0 if not.

Syntax

>>-@APLVDCL(name,type,length,scope,init,dupok,notr)-<<

name Name of the AF/OPERATOR variable to define, or declare, required. A maximum of eight characters is allowed.

type Type of variable to define, optional. The default type is CHAR. Valid values are:� CHAR� INT� HEX

length Length of the variable, optional. The length must be numeric. For character variables, the length must be in the range of 1 to 255. The default is 8. For integer or hexadecimal variables, the length is always 4.

scope The scope of the variable, optional. The default scope is GLOBAL. Valid values are:� GLOBAL� SYSTEM

init The initial value of the variable, optional. If specified, the initial value must match the data type of the variable that is being defined.

dupok Duplicate variable definition option, optional. Specify the dupok keyword to avoid error conditions should the variable already exist.

notr Prevent truncation option, optional. Specify the notr keyword to avoid truncation of trailing blanks in the value of the variable.

Page 271: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Functions 271

IRM Utility Functions

Notes

All execution errors force termination of this exec as well as the calling exec via a call to the ABEND() function specifying a user 222 abend.

Examples@aplvdcl('MYSYSVAR','CHAR',25,'GLOBAL','THIS IS A GLOBAL VARIABLE') -> 1

@aplvdcl('ZMSGLOG',,44,'SYSTEM',,'DUPOK','NOTRUNC') -> 1

@aplvdcl('MYPORT','INT',,'SYSTEM',2010) -> 1

@aplvdcl('MYJOB') -> 1

Page 272: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

IRM Utility Functions

272 Integrated Resource Manager Functions and Other Facilities Version 500

@APLVLET - Application Variable Assignment FunctionSets the specified AF/OPERATOR system or global variable to the specified value. Returns 1 if the variable was successfully set and 0 if not.

Syntax

>>-----@APLVLET(name,valu)-----------<<

Notes

All execution errors force termination of this exec as well as the calling exec via a call to the ABEND() function specifying a user 222 abend.

Examples@aplvlet('MYAORO','4') -> 1

@aplvlet('CPUSER','83076') -> 1

@aplvlet('NOVAR','NONE') -> 0

name Name of the AF/OPERATOR variable to assign the value to, required. A maximum of eight characters is allowed.

valu String or expression, including quotes as necessary, to use to set the value of the variable, required. A maximum of 240 characters is allowed.

Page 273: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Functions 273

IRM Utility Functions

@APLVSUB - Application Variable Substitute FunctionResolves the AF/OPERATOR variables within the specified text string and returns the updated value of the text string.

Syntax

>>-----@APLVSUB(string,passes)----------<<

Notes

All execution errors force termination of this exec as well as the calling exec via a call to the ABEND() function specifying a user 222 abend.

The variables used in the examples listed below have the following values:

� sub0 = 'AAA'

� sub1 = '&sub0'

� sub2 = '&sub1'

Examples@aplvsub('&SUB2',1) -> &sub1

@aplvsub('&SUB2',2) -> &sub0

@aplvsub('&SUB2',3) -> AAA

string Text string which contains one or more AF/OPERATOR system or global variables to be resolved, required. AF/OPERATOR variables within the text string must be identified using standard notation; prefaced by an ampersand (&), and if needed, delimited with a period. A maximum of 240 characters is allowed.

passes Number of passes to use to resolve all of the variables, optional. The number must be numeric and in the range of 1 to 8. The default is 1.

Page 274: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

IRM Utility Functions

274 Integrated Resource Manager Functions and Other Facilities Version 500

@COMGLNK - COM Manager Get Active Link FunctionChecks for an active link and returns the name of the first active link found for the requested link type. A null value is returned if no active link is found.

Syntax

>>-----@COMGLNK(system,linktype)----------<<

Notes

All execution errors force termination of this exec as well as the calling exec via a call to the ABEND function specifying a user 222 abend.

Examples@comglnk('MVSA','ALL') -> XCFMVSA

@comglnk('MVSA') -> XCFMVSA

@comglnk('MVSA','T') -> IPMVSA

@comglnk('MVSX') -> (no active link)

system SMF ID of the system to which an active communication link is desired, required.

linktype Communication protocol of the link, optional. Valid values are:� ALL Check for all link types� XCF Check for XCF links only� TCPIP Check for TCP/IP links only� APPC Check for APPC links onlyIf not specified, the default is ALL. If ALL is specified, the search order for link type will be: XCF, TCP/IP, then APPC. Only the capitalized letter(s) of the keyword is needed; all characters following are ignored.

Page 275: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Functions 275

IRM Utility Functions

@DEVVARY - Device Manager Vary FunctionVaries a device online or offline. Returns 1 if the vary command was successful and 0 if not.

Syntax

>>----@DEVVARY(dev_add,state,dev_parm,interval)----<<

Notes

All execution errors force termination of this exec as well as the calling exec via a call to the ABEND function specifying a user 222 abend.

Examples@devvary('A24','ON','S') -> 1

@devvary('B0C','OF') -> 0

dev_add A three or four character device address.

state Desired state of the device, required. Valid values are:

� ONline Vary device online� Offline Vary device offlineONly the capitalized letter(s) of the keyword is needed; all characters following are ignored.

dev_parm Vary Command options:

� UNCOND Brings a device online, even if there are no paths to it.

� SHR Allows a 3480 device to be shared among other processors.

� FORCE Puts a device into pending-offline status immediately, even it it is currently active, allocated or reserved.

interval Timeout interval in military time format (hh:mm:ss), optional. If not specified, the default is 00:00:30, 30 seconds.

Page 276: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

IRM Utility Functions

276 Integrated Resource Manager Functions and Other Facilities Version 500

@JOBEDIT - Job Edit FunctionReads in the specified JCL skeleton source member from the RKAUSAMP dataset, updates the source JCL with substitution values, to create an executable copy of the JCL, and submits that job through the AF/RDR started task. Returns 1 if the source JCL was successfully edited and the job submitted and 0 if not.

Syntax

>>-----@JOBEDIT(member,subs)----------<<

member Name of the JCL skeleton source member to edit, required. A maximum of eight characters is allowed. The JCL member must reside in the RKAUSAMP dataset.

subs Substitution values, for placeholders in the skeleton, optional. Each placeholder will be replaced with a word or a phrase from this argument. A maximum of 48 words/phrases is allowed.

Substitution placeholders are defined in the JCL skeleton by coding an &n in the desired location (&1 &2 &3...&48).

During the editing/formatting process, each word or phrase, a string of words within quotes, specified with this argument is used to replace an &n in the JCL skeleton (i.e. word 1 replaces &1, word 2 replaces &2,...). Any extra &n will be deleted. If a phrase is specified instead of a word, the phrase is used to replace &n. Words and phrases can be intermixed:

word1 'a phrase for word2'word3

&1 &2 &3

Substitution values, for placeholders in the skeleton, optional. Each placeholder will be replaced with a word or a phrase from this argument. A maximum of 48 words/phrases is allowed.

Page 277: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Functions 277

IRM Utility Functions

Notes

All execution errors force termination of this exec as well as the calling exec via a call to the ABEND() function specifying a user 222 abend.

Examples@jobedit('JOB1','DATA.SET.NAME DASD01 3390')-> 1

Substitution placeholders are defined in the JCL skeleton by coding an &n in the desired location (&1 &2 &3...&48).

During the editing/formatting process, each word or phrase, a string of words within quotes, specified with this argument is used to replace an &n in the JCL skeleton (i.e. word 1 replaces &1, word 2 replaces &2,...). Any extra &n will be deleted. If a phrase is specified instead of a word, the phrase is used to replace &n. Words and phrases can be intermixed:

word1 'a phrase for word2'word3&1 &2 &3

A phrase can be specified with either single or double quotes. The quotes used to define a phrase do not appear in the final edited output; the quotes are deleted prior to the text formatting process. A pair of brackets can also be used to identify a phrase:

word1 {a phrase} [another phrase]&1 &2 &3

The value of an AF/OPERATOR global or system variable can be used for a substitution value by including the name of the variable as a word in the argument string and prefacing the name of the variable with an ampersand:

word1 &glbvname &sysvnameword4&1 &2 &3 &4

Page 278: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

IRM Utility Functions

278 Integrated Resource Manager Functions and Other Facilities Version 500

@JOBSMIT - Job Submit FunctionSubmits a batch job via the AF/RDR started task. Returns 1 if the job submit was successful and 0 if not.

Syntax

>>-----@JOBSMIT(member,dsname)----------<<

Notes

All execution errors force termination of this exec as well as the calling exec via a call to the ABEND() function specifying a user 222 abend.

Examples@jobsmit('JOB1','DATA.SET.NAME') -> 1

member Job submit member name, required. A maximum of eight characters is allowed.

dsname Job submit dataset name, optional. The default job submit dataset is the RKAUSAMP application dataset.

Page 279: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Functions 279

IRM Utility Functions

@RCFQSCH - Started Task Manager Schedule Query FunctionReturns various information related to a Started Task Manager schedule for a resource.

Syntax

>>-----@RCFQSCH(task,schedule,option)-----<<

Notes

All execution errors force termination of this exec as well as the calling exec via a call to the ABEND function specifying a user 222 abend.

Examples@rcfqsch('LLA','STATE') -> 0

@rcfqsch('AFTCI','SCHED') -> 1

task Name of the Started Task Manager resource, required.

schedule Number of the schedule for the resource, required.

option Requested information, optional. Valid values are:� SCHED Valid schedule (0/1)� STATE Schedule status (0/1)� CSO Start-Only Calendar (0/1)� CPO Stop-Only Calendar (0/1)� SWARN Start warning time� SWEXT Start warning extension � PWARN Stop warning time� PWEXT Stop warning extensionIf not specified, SCHED is the default.

Page 280: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

IRM Utility Functions

280 Integrated Resource Manager Functions and Other Facilities Version 500

@RCFSCHD - Started Task Manager Schedule FunctionSets scheduled event traps for a Started Task Manager resource defined to run on a schedule. Returns the following seven words of information for a scheduled Started Task Manager resource:

� Current Schedule Number (0 if not a scheduled resource)

� Start Only (1/0)

� Stop Only (1/0)

� Start Warn Now (1/0)

� Start Now (1/0)

� Stop Warn Now (1/0)

� Stop Now (1/0)

Syntax

>>--__@RCFSCHD(task,schedule,day,time,option,nochkp,parm)----------<<

task Name of the Started Task Manager resource, required.

schedule Number of the schedule for the resource, required. If the schedule argument is not specified, all of the schedules defined for the resource are interrogated.

day Specific day-of-week, optional. This argument is used with the update and restore options to specify the day-of-week of the event to be altered. Valid values are:� SUN Sunday� MON Monday� TUE Tuesday� WED Wednesday� THU Thursday� FRI Friday� SAT Saturday

Page 281: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Functions 281

IRM Utility Functions

Notes

All execution errors force termination of this exec as well as the calling exec via a call to the ABEND function specifying a user 222 abend.

Examples@rcfschd('AFTCI') -> 1 0 0 0 1 0 0

@rcfschd('AFTCI','1','TUE','09:00:00') -> Change sched 1 Tue start time to 9am

time Specific event time in military time format, hh:mm:ss, or one of the following special characters: '*', '+', or '-'. If not specified, the default is now. This argument is used with the update options to specify the new time for the scheduled event.

option Processing option, optional. Valid values are:� O Information only Query� US Update start event� RS Restore start event� UP Update stop event� RP Restore stop event

nochkp Override checkpointing of the updates, optional. If specified, it must be a binary value, 0 or 1. The default is 0; all updates will be checkpointed.

parm Parameter(s) to add to the schedule trap Started Task Manager (RCF) command, optional. Parameters may be added to the default command by updating the schedule via an MCS console command. For more information on specifying parameters, see the RCF command documentation.

Page 282: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

IRM Utility Functions

282 Integrated Resource Manager Functions and Other Facilities Version 500

@RCFSCHQ - Started Task Manager Resource Schedule FunctionReturns various information related to a Started Task Manager schedule for a resource.

Syntax

>>-----@RCFSCHQ(task,schedule,option)----------<<

Notes

All execution errors force termination of this exec as well as the calling exec via a call to the ABEND function specifying a user 222 abend.

Examples@rcfqsch('LLA','STATE') -> 0

@rcfqsch('AFTCI','SCHED') -> 1

task Name of the Started Task Manager resource, required.

schedule Number of the schedule for the resource, required.

option Requested information, optional. Valid values are:

� SCHED Valid schedule (0/1)� STATE Schedule status (0/1)� CSO Start-Only Calendar (0/1)� CPO Stop-Only Calendar (0/1)� SWARN Start warning time� SWEXT Start warning extension� PWARN Stop warning time� PWEXT Stop warning extensionIf not specified, SCHED is the default.

Page 283: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Functions 283

IRM Utility Functions

@RCFSTAT - Started Task Manager Get Status FunctionReturns status information for a Started Task Manager resource.

Syntax

>>-----@RCFSTAT(object,option)-----------<<

Notes

All execution errors force termination of this exec as well as the calling exec via a call to the ABEND function specifying a user 222 abend.

Examples@rcfstat('LLA','STATUS') -> 3

@rcfstat('LLA','NUMBER') -> 100

object Name of the Started Task Manager resource, required.

option Requested information, optional. Valid values are:

� STATUS Object status value� RECOVER Object recover count� SCHEDULE Object current schedule� RIP Object Recovery In-Progress Flag (0/1)� NUMBER Object number� ITEMNAME Object OmegaView Item Name� ITEMOPEN Object OmegaView Item Open� ITEMUPDT Object OmegaView Item UpdateIf not specified, STATUS is the default.

Page 284: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

IRM Utility Functions

284 Integrated Resource Manager Functions and Other Facilities Version 500

@RCFSUCC - Started Task Manager Successor FunctionReturns a list of resource names that are successors to the specified Started Task Manager resource.

Syntax

>>-----@RCFSUCC(object,subset)----------<<

Notes

All execution errors force termination of this exec as well as the calling exec via a call to the ABEND function specifying a user 222 abend.

Examples@rcfsucc('LLA') -> VLF

@rcfsucc('VLF') -> JES2

@rcfsucc('JES2') -> VTAM

object Name of the Started Task Manager resource, required.

subset Subset of successors, optional. Valid values are:

� ALL All successors� DEFINED Successors that are defined to the

system� NOTDEFINED Successors that are not defined to

the systemIf not specified, ALL is the default. Only the first character of the argument is significant; all others are ignored.

Page 285: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Functions 285

IRM Utility Functions

@TBLRGST - Table Manager Register FunctionRegisters or de-registers a created table with the Table Manager. Returns 1 if the requested register function is successful and 0 if not.

Syntax

>>-----@TBLRGST(table,function)----------<<

Notes

All execution errors force termination of this exec as well as the calling exec via a call to the ABEND function specifying a user 222 abend.

Examples@tblrgst('@APLSTAT','ADD') -> 1

table Name of the created table to register, required. A maximum of 16 characters is allowed.

function Requested register function, optional. Valid values are:� ADD� DELETEThe default value is ADD. Only the first character of the argument is significant; all other characters are ignored.

Page 286: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

IRM Utility Functions

286 Integrated Resource Manager Functions and Other Facilities Version 500

@TBLUTBL - Table Manager User Table FunctionRegisters or de-registers a user-defined loaded table with the Table Manager. Returns 1 if the requested register function is successful and 0 if not.

Syntax

>>-----@TBLUTBL(table,dsname,volume,unit,function)-----<<

Notes

All execution errors force termination of this exec as well as the calling exec via a call to the ABEND function specifying a user 222 abend.

Examples@tblutbl('@USERTBL','USER.DATA.SET(@USERTBL)','DASD01','3390','ADD') -> 1

table Name of the user-defined loaded table, required. A maximum of eight characters is allowed.

dsname Name of the dataset that contains the table, required. Dsname can specify a sequential dataset, DATA.SET, or a member of a PDS, DATA.SET(MBR).

volume Serial number of the volume where the dataset is located, optional. A maximum of six characters is allowed.

unit Specifies the unit type of the volume where the dataset is located. Unit is required if a volume argument is specified, otherwise unit is optional. A maximum of four characters is allowed.

function Requested register function, optional. Valid values are:� ADD� DELETEThe default value is ADD. Only the first character of the argument is significant; all other characters are ignored.

Page 287: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Functions 287

IRM Utility Functions

@TCIOPER - AF/TCI Command FunctionIssues the specified TSO command via the AF/TCI address space. Returns 1 if the TSO command was successfully processed by AF/TCI and 0 if not.

Syntax

>>-----@TCIOPER(command,retopts,console,timeout)----<<

command TSO command to issue via the AF/TCI address space, required. A maximum of 104 characters is allowed.

Note: The 104 character maximum assumes that the AF/TCI address space has an eight character job name (modify ID). If the job name is less than eight characters, the maximum is adjusted accordingly.

retopts Response return option, optional. If not specified, the response from the AF/TCI address space, if any, is not returned. Valid values are:� LINE Store the response in standard line

variables: LINE# and LINE1 through LINEnnnn. The prefix for the name is controlled by AOLINPFX and defaults to LINE.

� RESP Concatenate line data from the response and return it as the result of this function (instead of a 1 or 0).

� STACK Store the response in the REXX program stack.

console Name, or ID number, of an MVS console to use to issue the command, optional.

Note: If the AF/TCI command response is requested via the retopts argument, the console argument must specify the name, or ID number, of an AF/OPERATOR EMCS console or must not be specified.

Page 288: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

IRM Utility Functions

288 Integrated Resource Manager Functions and Other Facilities Version 500

Notes

All execution errors force termination of this exec as well as the calling exec via a call to the ABEND function specifying a user 222 abend.

Examples@tcioper('HELP','LINE','A0000001','00:00:10')-> 1

timeout Number of seconds to wait for the command complete message, optional. The default is 120 seconds. Timeout must be numeric and in the range 1 to 3600. A timeout value may also be specified in HH:MM:SS format.

Note: If the AF/TCI command response is requested via the retopts argument, timeout is used to specify the number of seconds to wait after the last WTO before assuming that the response has completed. If not specified, timeout defaults to the value of MAXTVAL() in OGPARMS.

Page 289: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

REXX Functions 289

IRM Utility Functions

@VTMDNET - VTAM Manager Display FunctionIssues a VTAM display command to determine the status of a VTAM node against a supplied desired state. Returns 1 if the condition is true and 0 if not.

Syntax

>>-----@VTMDNET(node,state,sessid,interval)-----<<

Notes

All execution errors force termination of this exec as well as the calling exec via a call to the ABEND function specifying a user 222 abend.

Example@vtmdnet('A15MOMVS','A',,'00:00:45') -> 1

@vtmdnet('A15MOMVS','C') -> 0

node Name of the VTAM node, required

state Desired VTAM node state, optional. Valid values are:� ACTIVE Node is active� INACTIVE Node is inactive� CONCT Node is contactable� UP Node is active or contactable� SESSION Node is active and in-session� NOSESSION Node is active and not in-session� LINKACT Link station is active� LINKINACT Link station is inactiveIf not specified, the default is ACTIVE. Only the capitalized letter(s) of the keyword is needed; all characters following are ignored.

sessid Specifies an in-session VTAM application name, optional

interval Specifies a timeout interval in military time format (hh:mm:ss), optional. If not specified, the default is 00:00:30, 30 seconds.

Page 290: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

IRM Utility Functions

290 Integrated Resource Manager Functions and Other Facilities Version 500

@VTMVNET - VTAM Manager Vary FunctionVaries a VTAM node active or inactive. Returns 1 if the vary was successful and 0 if not.

Syntax

>>-----@VTMVNET(node,state,option,inverval)-----<<

Notes

All execution errors force termination of this exec as well as the calling exec via a call to the ABEND function specifying a user 222 abend.

Examples@vtmvnet('IMS71DC','A') -> 1

@vtmvnet('A16MOMII','A','SCOPE=ALL') -> 1

@vtmvnet('A16MOMV','A') -> 0

node Name of the VTAM node, required.

state Desired VTAM node state, required. Valid values are:� ACT Vary node active� INACT Vary node inactiveOnly the first character of the argument is significant; all other characters are ignored.

option VTAM Vary Command option, optional.

interval Specifies a timeout interval in military time format (hh:mm:ss), optional. If not specified, the default is 00:00:30, 30 seconds.

Page 291: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Miscellaneous Exits and Routines 291

Miscellaneous Exitsand Routines

IntroductionThe miscellaneous exits and routines have been written to extend task management capabilities.

The exits and routines are written in REXX and are members of the AF/OPERATOR command library dataset. Access to the exits and routines is automatically provided by AF/OPERATOR. The exits and routines are only available in the AF/OPERATOR environment, unless otherwise indicated.

Chapter ContentsBatch Job Utilities. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292CA Utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301DB2 Utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315MQ Utilities. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 316Network Task Utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318OMEGAMON and OmegaView Utilities . . . . . . . . . . . . . . . . . . . . . . . . . 321TSO Utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 338

3

Page 292: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Batch Job Utilities

292 Integrated Resource Manager Functions and Other Facilities Version 500

Batch Job Utilities

A set of exits and routines are provided as tools, such as an interface between batch processing and the IRM Started Task Manager, a Syslog scanning facility, etc.

@JOB@RCF - Batch Job/Started Task Manager Interface Issue an RCF command from a batch job. Used to forward a task management request from a batch job to the Started Task Manager and return the result of the request via condition code.

Syntax

>>-----@JOB@RCF----------<<

Parameters

There are no arguments for this routine.

Notes

This exec should be invoked in batch, via IRXJCL, to request Started Task Management services for a job. It is used to start/stop Started Task Manager resources as part of a batch job stream.

RCF commands are specified via the SYSTSIN DD. Each record from SYSTSIN should contain a valid RCF command. Each RCF command will be passed to the Started Task Manager for processing. Should any command fail, the process will stop and this routine will end with a non-zero return code.

Refer to member KAU$@JOB and KAUR@JOB in the hilev.RKAUSAMP library for an example of the batch JCL and procedure required for this interface.

Only specifically authorized system tasks are allowed access to the STM services offered by this routine. Access is controlled by userid; the USERID option is specified on the Message Manager trap that forwards the command to the Started Task Manager. Code the Message Manager trap as follows:

TRAP ADD(trapname) WTO('&aplwtor ASOA849A * RCF *PARM')

ACTION('EXEC @RCFWTOR ''&PARM''')

USERID(authorized userid)

Page 293: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Miscellaneous Exits and Routines 293

Batch Job Utilities

One of the following return codes will be returned from the routine:

� 0 Command executed successfully

� 4 Parameter error

� 8 Command not executed successfully

� 32 Invalid environment

Page 294: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Batch Job Utilities

294 Integrated Resource Manager Functions and Other Facilities Version 500

@LOGSCAN - MVS Syslog Scanning Utility Analyze and report on MVS syslog for automation.

Syntax

>>-----@LOGSCAN----------<<

Parameters

Parameters are specified in control dataset form using the SYSIN DD. A SYSIN dataset may contain as many records as are necessary to specify the parameters for an invocation of this program. A parameter may be placed anywhere in columns 1-71 in the SYSIN dataset. Multiple instances of each parameter are allowed. The effects of multiple instances of a parameter are cumulative.

PRINT() The PRINT parameter specifies what log records to print, if any. Valid values are:� COMMANDS Command Records � LOGRECORD General Records � DISPLAYED Displayed Messages� IPLRECORD IPL Record Messages� SOLICITED Solicited Messages� SUPPRESSED Suppressed Messages� UNKNOWN Unknown Messages

REPORT() The REPORT parameter specifies what Syslog reports to generate, if any. Valid values are:� COMMANDS Command Report � MESSAGES Message Report � STATISTICS Message Statistics

Page 295: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Miscellaneous Exits and Routines 295

Batch Job Utilities

INCLUDE() The INCLUDE parameter specifies what Syslog records to include in report and print processing. Valid values are:� DATE(yyddd)� DATE(mm/dd/yy)� DATE(yyddd,yyddd)� DATE(mm/dd/yy,mm/dd/yy)� TIME(hhmm)� TIME(hhmms)� TIME(hhmmss)� TIME(hhmmsss)� TIME(hh:mm:ss)� TIME(hhmm,hhmm)� TIME(hhmms,hhmms)� TIME(hhmmss,hhmmss)� TIME(hhmmsss,hhmmsss)� TIME(hh:mm:ss,hh:mm:ss)� ROUTE(xx)� ROUTE(xx xx)� ROUTE(xx,xx)� ROUTE(xx xx ... xx)� ROUTE(xx,xx,...,xx)� CONSOLE(name)� CONSOLE(cnsid)� CONSOLE(CN(##))� CONSOLE(name name)� CONSOLE(cnsid cnsid)� CONSOLE(CN(##) CN(##))� CONSOLE(name,name) � CONSOLE(cnsid,cnsid) � CONSOLE(CN(##),CN(##))� CONSOLE(name ... name) � CONSOLE(cnsid ... cnsid) � CONSOLE(CN(##) ... CN(##))

Page 296: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Batch Job Utilities

296 Integrated Resource Manager Functions and Other Facilities Version 500

INCLUDE()cont.

� CONSOLE(name,...,name)� CONSOLE(cnsid,...,cnsid) � CONSOLE(CN(##),...,CN(##))� SYSID(sys) � SYSID(sys sys) � SYSID(sys,sys) � SYSID(sys ... sys) � SYSID(sys,...,sys) � JOBNAME(job) � JOBNAME(job job) � JOBNAME(job,job) � JOBNAME(job ... job) � JOBNAME(job,...,job) � IDPTRN(ASOA*) � IDPTRN(ASOA###E) � IDPTRN(ASOA???E) � IDPTRN(ASOA###E) � CMDID(cmd) � CMDID(cmd cmd) � CMDID(cmd,cmd) � CMDID(cmd ... cmd) � CMDID(cmd,...,cmd) � CMDTEXT(text) � MSGID(msg) � MSGID(msg msg) � MSGID(msg,msg) � MSGID(msg ... msg) � MSGID(msg,...,msg) � MSGTEXT(text)� TEXT(text)

Page 297: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Miscellaneous Exits and Routines 297

Batch Job Utilities

EXCLUDE() he EXCLUDE parameter specifies what Syslog records to exclude from report and print processing. Valid values are:� DATE(yyddd) � DATE(mm/dd/yy) � DATE(yyddd,yyddd) � DATE(mm/dd/yy,mm/dd/yy) � TIME(hhmm) � TIME(hhmms) � TIME(hhmmss) � TIME(hhmmsss) � TIME(hh:mm:ss) � TIME(hhmm,hhmm) � TIME(hhmms,hhmms) � TIME(hhmmss,hhmmss) � TIME(hhmmsss,hhmmsss) � TIME(hh:mm:ss,hh:mm:ss) � ROUTE(xx) � ROUTE(xx xx) � ROUTE(xx,xx) � ROUTE(xx xx ... xx) � ROUTE(xx,xx,...,xx) � CONSOLE(name) � CONSOLE(cnsid) � CONSOLE(CN(##)) � CONSOLE(name name) � CONSOLE(cnsid cnsid) � CONSOLE(CN(##) CN(##))� CONSOLE(name,name) � CONSOLE(cnsid,cnsid) � CONSOLE(CN(##),CN(##)) � CONSOLE(name ... name)� CONSOLE(cnsid ... cnsid) � CONSOLE(CN(##) ... CN(##))

Page 298: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Batch Job Utilities

298 Integrated Resource Manager Functions and Other Facilities Version 500

EXCLUDE()cont.

� CONSOLE(name,...,name) � CONSOLE(cnsid,...,cnsid) � CONSOLE(CN(##),...,CN(##))� SYSID(sys) � SYSID(sys sys) � SYSID(sys,sys) � SYSID(sys ... sys) � SYSID(sys,...,sys)� JOBNAME(job) � JOBNAME(job job) � JOBNAME(job,job) � JOBNAME(job ... job) � JOBNAME(job,...,job) � IDPTRN(ASOA*) � IDPTRN(ASOA###E) � IDPTRN(ASOA???E) � IDPTRN(ASOA###E) � CMDID(cmd) � CMDID(cmd cmd) � CMDID(cmd,cmd) � CMDID(cmd ... cmd) � CMDID(cmd,...,cmd) � CMDTEXT(text) � MSGID(msg) � MSGID(msg msg) � MSGID(msg,msg)� MSGID(msg ... msg) � MSGID(msg,...,msg) � MSGTEXT(text) � TEXT(text)

Page 299: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Miscellaneous Exits and Routines 299

Batch Job Utilities

AND The AND parameter specifies that the INCLUDE options should be ANDed when filtering Syslog records.

For example, if the following INCLUDE options are specified:

INCLUDE(DATE(02024,02024))

INCLUDE(JOBN(NDM))

both the date and the job name in the record must match the values specified for the DATE() & JOBNAME() options for the record to be included.

Note: Multiple values specified for an INCLUDE option will each be ORed with the ANDed INCLUDE option.

For example, if the following INCLUDE options are specified:

INCLUDE(DATE(02024,02024))

INCLUDE(JOBN(NDM JES3))

any records for 01/24/02 and job name NDM or JES3 will be included.

OR The OR parameter specifies that the INCLUDE options should be ORed when filtering Syslog records.

For example, if the following INCLUDE options are specified:

INCLUDE(DATE(02024,02024))

INCLUDE(JOBN(NDM))

any records for 01/24/02 or any record for job name NDM, even if it is not on 01/24/02, will be included. OR is the default filtering option.

FIRST() The FIRST parameter specifies where to start processing the log dataset, by record number. This parameter is optional. The default is the first record in the Syslog dataset.

Page 300: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Batch Job Utilities

300 Integrated Resource Manager Functions and Other Facilities Version 500

Notes

This exec should be invoked in batch, via IRXJCL, it cannot be executed in the AF/OPERATOR address space.

Refer to member KAU$LSCN and KAUZLSCN in the hilev.RKAUSAMP library for an example of the batch JCL and procedure required for this utility.

One of the following return codes will be returned from the routine:

� 0 Command executed successfully

� 4 Parameter errors

� 8 Functional errors

� 32 Invalid environment

LAST() The LAST parameter specifies where to stop processing the log dataset, by record number. This parameter is optional. The default is the last record in the Syslog dataset.

Page 301: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Miscellaneous Exits and Routines 301

CA Utilities

CA Utilities

A set of exits and routines are provided to aid in the management of the CA7 and ICOM started tasks. A set of routines are provided to invoke the CA7 functions by alternate means, such as inclusion in the Action field of an AF/OPERATOR trap.

@ICMSTOP - CA ICOM Stop RoutineIssue commands to shutdown the CA ICOM started task.

Syntax

>>-----@ICMSTOP_jobname----------<<

Notes

This exec can be used in the stop command field in the Started Task Manager to stop the CA ICOM started task.

EX @ICMSTOP ''JOBNAME'' **AL - 2 single quotes

A 0, indicating successful shutdown, will be returned to the Started Task Manager if message CA-7.578 or +CA-7.578 is received as a result of the shutdown command. A 4 will be returned for all parameter errors.

jobname CA ICOM started task name, required.

Page 302: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

CA Utilities

302 Integrated Resource Manager Functions and Other Facilities Version 500

KAUZ7SHU - CA7 Stop RoutineIssue commands to shutdown the CA7 started task. Returns 0 if the shutdown is successful and 8 if not.

Syntax

>>-----KAUZ7SHU_option----------<<

Notes

This exec can be used in the stop command field in the Started Task Manager to stop the CA7 started task. To use the default shutdown option of Z5, code the following in the stop command field:

EX KAUZ7SHU

To use a shutdown option other than the default, such as Z3, code the following in the stop command field:

EX KAUZ7SHU ''Z3''

option CA7 shutdown method, optional. Valid values are:� DMPQ Unload the CA7 queues during the

shutdown process and wait for both the batch and online terminals

� Z1 Fast shutdown; wait for the batch terminals, do not wait for the online terminals

� Z2 Fast shutdown; wait for the online terminals, do not wait for the batch terminals

� Z3 Fast shutdown; do not wait for either type of terminal

� Z4 A combination of Z1 and DMPQ� Z5 A combination of Z3 and DMPQIf not specified, the default shutdown option is Z5.

Page 303: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Miscellaneous Exits and Routines 303

CA Utilities

If a userid and password are required for logon to CA7, ensure the Application Manager CA7 variables have been initialized prior to the execution. This exec automatically invokes the CA7 logon function, if required.

A 0, indicating successful shutdown, will be returned to the Started Task Manager if message CA-7.003 or IEF404I is received as a result of the shutdown command. Otherwise, an 8 will be returned to the Started Task Manager indicating the shutdown process was not successful. A stop verification WTOR will be issued to the operator console indicating the shutdown was unsuccessful. .

Page 304: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

CA Utilities

304 Integrated Resource Manager Functions and Other Facilities Version 500

KAUZ7VRA - CA7 VTAM Post-Recovery ExitRecover CA7 terminals after a VTAM failure. Returns 0 if the recovery is successful.

Syntax

>>-----KAUZ7VRA_group----------<<

Notes

To utilize this exit, define the CA7 ACB to the VTAM Manager as an internal resource. Code this exec name in the VTAM Manager Post-Recovery Exit field.

If the KAUZ7VRA exit is enabled and the name of the first group of 3270V VTAM terminals is not VGROUP, you will either need to create a system variable called @APLCA7G with the name of the group or a user exit that calls KAUZ7VRA passing the group name as a parm, for example:

EXEC KAUZ7VRA 'MYGROUP'

A return code of 20 will be returned for all exit errors.

group Name of the first group of 3270V VTAM terminals defined to CA-7 in the CA-7 initialization file, UCC7IN, optional. The default group name is VGROUP.

Page 305: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Miscellaneous Exits and Routines 305

CA Utilities

KAUZ7$DM - CA7 Demand Job Routine Demands a job into the CA7 request queue. Returns 0 if the demand is successful.

Syntax

>>-----KAUZ7$DM__job__SID(sid)__JID(jid) OPT(opt)ADD(add)----------<<

job Name of the CA7 batch job to demand, required. A maximum of eight characters is allowed.

sid Job schedule ID, optional. Must be numeric and in the range of 1 to 255. The default schedule ID is 1.

jid CA7 JCL ID, optional. Must be numeric and in the range of 0 to 254. The default JCL ID is 0.

opt CA7 DEMAND command option, optional. Valid values are:� Hold Place on hold in the request queue

(DEMANDH command).� Ntr Disable the normal job triggering only for

this run of the job (SET=NTR option).� NDb Bypass database update at job completion

(SET=NDB option).� Skp Indicates this run of the job should take the

place of the next scheduled run of the job (SET=SKP option).

Only the capitalized letter(s) of the keyword is needed; all characters following are ignored.

Page 306: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

CA Utilities

306 Integrated Resource Manager Functions and Other Facilities Version 500

Notes

If a userid and password are required for logon to CA7, ensure the Application Manager CA7 variables have been initialized prior to the execution. This exec automatically invokes the CA7 logon function, if required.

A 4 will be returned for all exit or parameter errors and an 8 for a bad function call.

add Additional options to be added to the CA7 command, optional. Multiple command options may be specified by separating each option with a blank or a comma. For example, 'DATE=99360 DOTM=1600'. Valid values are:� ARFSET=setname� CC=nnn� CLASS=x� DATE=+nn� DEPJOB=jobname� DOTM=hhmm� LEADTM=hhmm� PRTY=nnn� RO=rr� SET=SKP� SET=NTR� SET=NDB� TIME=hhmm� TIME=+hhmm� TYPE=RES

Page 307: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Miscellaneous Exits and Routines 307

CA Utilities

KAUZ7$FC - CA7 Force Complete RoutineForce complete a job in CA7. Returns 0 if the force complete is successful.

Syntax

>>-----KAUZ7$FC_job_RSN(reason)----------<<

Notes

If a userid and password are required for logon to CA7, ensure the Application Manager CA7 variables have been initialized prior to the execution. This exec automatically invokes the CA7 logon function, if required.

A 4 will be returned for all exit or parameter errors and an 8 for a bad function call.

job Name or number of the CA7 batch job to force complete, required. For a job name, a maximum of eight characters is allowed. For a job number, a maximum of four digits is allowed.

reason The reason for forced completion of the job, optional. If not specified, the default is 'AF/OPERATOR'. The reason parameter is case sensitive. A maximum of 40 characters is allowed.

Page 308: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

CA Utilities

308 Integrated Resource Manager Functions and Other Facilities Version 500

KAUZ7$HO - CA7 Hold Job RoutinePlaces a hold on a CA7 job. Returns 0 if the hold is successful.

Syntax

>>-----KAUZ7$HO_job----------<<

Notes

If a userid and password are required for logon to CA7, ensure the Application Manager CA7 variables have been initialized prior to the execution. This exec automatically invokes the CA7 logon function, if required.

A 4 will be returned for all exit or parameter errors and an 8 for a bad function call.

job Name or number of the CA7 batch job to place a hold on, required. For a job name, a maximum of eight characters is allowed. For a job number, a maximum of four digits is allowed.

Page 309: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Miscellaneous Exits and Routines 309

CA Utilities

KAUZ7$PD - CA7 Post Dataset Requirement RoutinePosts a CA7 external dataset requirement as satisfied. Returns 0 if the post is successful.

Syntax

>>-----KAUZ7$PD_dsn----------<<

Notes

If a userid and password are required for logon to CA7, ensure the Application Manager CA7 variables have been initialized prior to the execution. This exec automatically invokes the CA7 logon function, if required.

A 4 will be returned for all exit or parameter errors and an 8 for a bad function call.

dsn Name of the CA7 external dataset to be posted as satisfied, required. A maximum of 44 characters is allowed.

Page 310: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

CA Utilities

310 Integrated Resource Manager Functions and Other Facilities Version 500

KAUZ7$PU - CA7 Post User Requirement RoutinePosts a CA7 external user requirement as satisfied. Returns 0 if the post is successful.

Syntax

>>-----KAUZ7$PU__job__REQ(req)----------<<

Notes

If a userid and password are required for logon to CA7, ensure the Application Manager CA7 variables have been initialized prior to the execution. This exec automatically invokes the CA7 logon function, if required.

A 4 will be returned for all exit or parameter errors and an 8 for a bad function call.

job Name or number of the CA7 batch job for which this requirement is to be posted, required. For a job name, a maximum of eight characters is allowed. For a job number, a maximum of four digits is allowed.

req User-defined description of the requirement to be posted as satisfied, required. User description text is case sensitive, and must match that specified to CA7 exactly. Up to 36 characters may be specified.

Page 311: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Miscellaneous Exits and Routines 311

CA Utilities

KAUZ7$RL - CA7 Release Job RoutineReleases a CA7 job on hold. Returns 0 if the release is successful.

Syntax

>>-----KAUZ7$RL_job----------<<

Notes

If a userid and password are required for logon to CA7, ensure the Application Manager CA7 variables have been initialized prior to the execution. This exec automatically invokes the CA7 logon function, if required.

A 4 will be returned for all exit or parameter errors and an 8 for a bad function call.

job Name or number of the CA7 batch job to release the hold on, required. For a job name, a maximum of eight characters is allowed. For a job number, a maximum of four digits is allowed.

Page 312: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

CA Utilities

312 Integrated Resource Manager Functions and Other Facilities Version 500

KAUZ7$RU - CA7 Run Job RoutineRuns a job defined to CA7. Returns 0 if the run is successful.

Syntax

>>-----KAUZ7$RU_job_SID(sid)_JID(jid)_OPT(opt)_ADD(add)----------<<

job Name of the CA7 batch job to be run, required. A maximum of eight characters is allowed.

sid Job schedule ID, optional. Must be numeric and in the range of 1 to 255. The default schedule ID is 1.

jid CA7 JCL ID, optional. Must be numeric and in the range of 0 to 254. The default JCL ID is 0.

opt CA7 RUN command option, optional. Valid values are:� Hold Place on hold in the request queue (RUNH

command).

add Additional options to be added to the CA7 command, optional.

Multiple command options may be specified by separating each option with a blank or a comma. For example:

'LEADTM=1200 TYPE=RES'

or

'LEADTM=1200,TYPE=RES'

Valid values are:� ARFSET=setname� CLASS=x� DOTM=hhmm� LEADTM=hhmm� TIME=hhmm� TYPE=RES

Page 313: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Miscellaneous Exits and Routines 313

CA Utilities

Notes

If a userid and password are required for logon to CA7, ensure the Application Manager CA7 variables have been initialized prior to the execution. This exec automatically invokes the CA7 logon function, if required.

A 4 will be returned for all exit or parameter errors and an 8 for a bad function call.

Page 314: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

CA Utilities

314 Integrated Resource Manager Functions and Other Facilities Version 500

KAUZ7$SC - CA7 SVC Command RoutineIssues the specified CA7 command using the U7SVC. Returns 0 if the command is successfully sent to CA7 via the U7SVC.

Syntax

>>-----KAUZ7$SC_cmd----------<<

Notes

If a userid and password are required for logon to CA7, ensure the Application Manager CA7 variables have been initialized prior to the execution. This exec automatically invokes the CA7 logon function, if required.

A 4 will be returned for all exit or parameter errors and an 8 for a bad function call.

cmd Valid CA7 command text, required. Any command that can be processed via the U7SVC is allowed. The CA7 /LOGON and /LOGOFF commands need not be added to the command text as they will be automatically added by this function. A maximum of 200 characters is allowed.

Note: This routine does not check the syntax of the CA7 command. It is the user's responsibility to ensure that the command is syntactically correct.

Page 315: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Miscellaneous Exits and Routines 315

DB2 Utilities

DB2 Utilities

A set of exits and routines are provided to aid in the management of the DB2 started task.

@DB2XPW2 - DB2 Stop WTOR ExitIf the DB2 subsystem does not come down within the stop verification interval, inactivate the ACB.

Syntax

>>-----@DB2XPW2----------<<

There are no arguments for this exit.

Notes

To utilize the exit for a DB2 resource, code the exit name in the Stop WTOR Exit field in the Started Task Manager resource definition. Define the VTAM ACB as an internal resource in the VTAM Manager.

Page 316: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

MQ Utilities

316 Integrated Resource Manager Functions and Other Facilities Version 500

MQ Utilities

A set of exits and routines are provided to aid in the management of the MQ started tasks.

@MQSXPW1 - MQ Series Stop WTOR ExitIf MQ Series does not come down with the first stop command, issue a second stop command.

Syntax

>>-----@MQSXPW1----------<<

There are no arguments for this exit.

Notes

To utilize the exit for an MQ resource, code the exit name in the Stop WTOR Exit field in the Started Task Manager resource definition.

Page 317: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Miscellaneous Exits and Routines 317

MQ Utilities

@MQSXRB1 - MQ Series Pre-Recovery ExitIf the TCPIP task fails, stop and re-start the MQ Series Channel Initiator task.

Syntax

>>-----@MQSXRB1----------<<

There are no arguments for this exit.

Notes

To utilize the exit for an MQ resource, code the exit name in the Pre-Exit Recovery field in the Started Task Manager resource definition.

Page 318: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Network Task Utilities

318 Integrated Resource Manager Functions and Other Facilities Version 500

Network Task Utilities

A set of exits and routines are provided to aid in the management of network started tasks, such as NetView and NetView Access.

@NETVSTP - NetView Stop RoutineIssue commands to shutdown NetView.

Syntax

>>-----@NETVSTP_jobname----------<<

Notes

This exec can be used in the stop command field in the Started Task Manager to stop the NetView started task.

EX @NETVSTP ''JOBNAME''

A 0, indicating successful shutdown, will be returned to the Started Task Manager if message DSI111I or DSI135I is received as a result of the shutdown command. A 4 will be returned for all parameter errors.

jobname NetView started task name, required.

Page 319: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Miscellaneous Exits and Routines 319

Network Task Utilities

@NVASTOP - NetView Access Stop RoutineIssue commands to shutdown NetView Access.

Syntax

>>-----@NVASTOP----------<<

There are no arguments for this routine.

Notes

This exec can be used in the stop command field in the Started Task Manager to stop the NetView Access started task.

EX @NVASTOP

A 0, indicating successful shutdown, will be returned to the Started Task Manager if message EMS0991E and IEF404I is received as a result of the shutdown command.

Page 320: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Network Task Utilities

320 Integrated Resource Manager Functions and Other Facilities Version 500

@TCPXPW1 - TCP/IP Stop WTOR ExitIf TCP/IP does not come down with the first stop command, issue another command to bring it down.

Syntax

>>-----@TCPXPW1----------<<

There are no arguments for this exit.

Notes

To utilize the exit for TCP/IP, code the exit name in the Stop WTOR Exit field in the Started Task Manager resource definition.

A 0 will be returned if the stop is successful. A 4 will be returned if the stop did not complete successfully; the stop verification WTOR will be issued to the operator console.

Page 321: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Miscellaneous Exits and Routines 321

OMEGAMON and OmegaView Utilities

OMEGAMON and OmegaView Utilities

A set of exits and routines are provided to aid in the management of the OMEGAMON and OmegaView started tasks.

@OMCVRA1 - OMEGAMON/CICS Post-VTAM Recovery ExitIssue commands to reconnect OMEGAMON/CICS after a VTAM failure.

Syntax

>>-----@OMCVRA1----------<<

There are no arguments for this exit.

Notes

To utilize the exit, define the OMEGAMON/CICS ACB to the VTAM Manager as an internal resource. Code the exec name in the VTAM Manager Post-Recovery Exit field.

Page 322: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

OMEGAMON and OmegaView Utilities

322 Integrated Resource Manager Functions and Other Facilities Version 500

@OMDVRA1 - OMEGAMON/DB2 Post-VTAM Recovery ExitIssue commands to reconnect OMEGAMON/DB2 after a VTAM failure.

Syntax

>>-----@OMDVRA1----------<<

There are no arguments for this exit.

Notes

To utilize the exit, define the OMEGAMON/DB2 ACB to the VTAM Manager as an internal resource. Code the exec name in the VTAM Manager Post-Recovery Exit field.

Page 323: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Miscellaneous Exits and Routines 323

OMEGAMON and OmegaView Utilities

@OMILOGF - AF/OPERATOR OMEGAMON/IMS Logoff RoutineSet global variables prior to AF/OPERATOR logoff command for OMEGAMON/IMS.

Syntax

>>-----@OMILOGF----------<<

There are no arguments for this routine.

Notes

To utilize the exit, code the exec name in the Started Task Manager resource definition Pre-Stop Exit field.

Page 324: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

OMEGAMON and OmegaView Utilities

324 Integrated Resource Manager Functions and Other Facilities Version 500

@OMILOGN - AF/OPERATOR OMEGAMON/IMS Logon RoutineSet global variables prior to AF/OPERATOR logon command for OMEGAMON/IMS.

Syntax

>>-----@OMILOGN----------<<

There are no arguments for this routine.

Notes

To utilize the exit, code the exec name in the Started Task Manager resource definition Pre-Start Exit field.

Page 325: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Miscellaneous Exits and Routines 325

OMEGAMON and OmegaView Utilities

@OMIXRBL - OMEGAMON/IMS Logon Pre-Recovery ExitIssue a LOGOFF for the application prior to the recovery attempt to clear the old LOGON.

Syntax

>>-----@OMIXRBL----------<<

There are no arguments for this exit.

Notes

To utilize the exit, code the exec name in the Started Task Manager resource definition Pre-Recovery Exit field.

The resource name must begin with the 5 characters 'LOGON'. Any characters can be concatenated to the end of this string to form the resource name. For example, LOGONOMIMS would be a valid resource name.

Page 326: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

OMEGAMON and OmegaView Utilities

326 Integrated Resource Manager Functions and Other Facilities Version 500

@OMVLOGF - AF/OPERATOR OmegaView Logoff RoutineSet global variables prior to AF/OPERATOR logoff command for OmegaView.

Syntax

>>-----@OMVLOGF----------<<

There are no arguments for this routine.

Notes

To utilize the exit, code the exec name in the Started Task Manager resource definition Pre-Stop Exit field.

To utilize the exit, the resource name for OmegaView must be 'OMVIEW'.

Page 327: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Miscellaneous Exits and Routines 327

OMEGAMON and OmegaView Utilities

@OMVLOGN - AF/OPERATOR OmegaView Logon RoutineSet global variables prior to AF/OPERATOR logon command for OmegaView.

Syntax

>>-----@OMVLOGN----------<<

There are no arguments for this routine.

Notes

To utilize the exit, code the exec name in the Started Task Manager resource definition Pre-Start Exit field.

To utilize the exit, the resource name for OmegaView must be 'OMVIEW'.

Page 328: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

OMEGAMON and OmegaView Utilities

328 Integrated Resource Manager Functions and Other Facilities Version 500

@OMVVRA1 - OmegaView Post-VTAM Recovery ExitRecover OmegaView resources after VTAM node recovery.

Syntax

>>-----@OMVVRA1----------<<

There are no arguments for this exit.

Notes

To utilize the exit, define the OmegaView ACB to the VTAM Manager as an internal resource. Code the exec name in the VTAM Manager Post-Recovery Exit field.

Page 329: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Miscellaneous Exits and Routines 329

OMEGAMON and OmegaView Utilities

@OMVXPWA - OmegaView Stop WTOR ExitIf OmegaView does not come down with the first stop command, issue another command to bring it down.

Syntax

>>-----@OMVXPWA----------<<

There are no arguments for this exit.

Notes

To utilize the exit for OmegaView, code the exit name in the Stop WTOR Exit field in the Started Task Manager resource definition.

Page 330: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

OMEGAMON and OmegaView Utilities

330 Integrated Resource Manager Functions and Other Facilities Version 500

@OMVXPW1 - OmegaView Stop WTOR ExitIf the OmegaView logon does not stop with the first stop command, verify if the session exists before issuing the stop verification message to the operator console.

Syntax

>>-----@OMVXPW1----------<<

There are no arguments for this exit.

Notes

To utilize the exit for OmegaView, code the exit name in the Stop WTOR Exit field in the Started Task Manager resource definition.

To utilize the exit, the resource name for OmegaView must be 'OMVIEW'.

A 0 will be returned if no session exists. A 4 will be returned if the stop did not complete successfully, i.e. a logon session still exists; the stop verification WTOR will be issued to the operator console.

Page 331: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Miscellaneous Exits and Routines 331

OMEGAMON and OmegaView Utilities

@OMVXRBL - OmegaView Logon Pre-Recovery ExitIssue a LOGOFF for the application prior to the recovery attempt to clear the old LOGON.

Syntax

>>-----@OMVXRBL----------<<

There are no arguments for this exit.

Notes

To utilize the exit, code the exec name in the Started Task Manager resource definition Pre-Recovery Exit field.

To utilize the exit, the resource name for OmegaView must be 'OMVIEW'.

Page 332: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

OMEGAMON and OmegaView Utilities

332 Integrated Resource Manager Functions and Other Facilities Version 500

@OM2LOGF - AF/OPERATOR OMEGAMON/MVS Logoff RoutineSet global variables prior to AF/OPERATOR logoff command for OMEGAMON/MVS.

Syntax

>>-----@OM2LOGF----------<<

There are no arguments for this routine.

Notes

To utilize the exit, code the exec name in the Started Task Manager resource definition Pre-Stop Exit field.

To utilize the exit, the resource name for the logon must be 'OMMVS'.

Page 333: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Miscellaneous Exits and Routines 333

OMEGAMON and OmegaView Utilities

@OM2LOGN - AF/OPERATOR OMEGAMON/MVS Logon RoutineSet global variables prior to AF/OPERATOR logon command for OMEGAMON/MVS.

Syntax

>>-----@OM2LOGN----------<<

There are no arguments for this routine.

Notes

To utilize the exit, code the exec name in the Started Task Manager resource definition Pre-Start Exit field.

To utilize the exit, the resource name for the logon must be 'OMMVS'.

Page 334: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

OMEGAMON and OmegaView Utilities

334 Integrated Resource Manager Functions and Other Facilities Version 500

@OM2VRA1 - OMEGAMON/MVS Post-VTAM Recovery ExitRecover OMEGAMON/MVS Epilog Zoom resources after a VTAM failure.

Syntax

>>-----@OM2VRA1----------<<

There are no arguments for this exit.

Notes

To utilize the exit, define the OMEGAMON/MVS Epilog Zoom ACB to the VTAM Manager as an internal resource. Code the exec name in the VTAM Manager Post-Recovery Exit field.

To utilize the exit, the resource name for the started task must be 'OMIIEPZM'.

Page 335: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Miscellaneous Exits and Routines 335

OMEGAMON and OmegaView Utilities

@OM2XRBL - OMEGAMON/MVS Logon Pre-Recovery ExitIssue a LOGOFF for the application prior to the recovery attempt to clear the old LOGON.

Syntax

>>-----@OM2XRBL----------<<

There are no arguments for this exit.

Notes

To utilize the exit, code the exec name in the Started Task Manager resource definition Pre-Recovery Exit field.

To utilize the exit, the resource name for OMEGAMON/MVS logon must be 'OMMVS'.

Page 336: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

OMEGAMON and OmegaView Utilities

336 Integrated Resource Manager Functions and Other Facilities Version 500

@OVIVRA1 - POVI Post-VTAM Recovery ExitRecover POVI resources after VTAM node recovery.

Syntax

>>-----@OVIVRA1----------<<

There are no arguments for this exit.

Notes

To utilize the exit, define the POVI ACB to the VTAM Manager as an internal resource. Code the exec name in the VTAM Manager Post-Recovery Exit field.

Page 337: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Miscellaneous Exits and Routines 337

OMEGAMON and OmegaView Utilities

@OVIXPW1 - POVI Stop WTOR ExitIf the POVI started task does not come down with the first stop command, issue another command to bring it down.

Syntax

>>-----@OVIXPW1----------<<

There are no arguments for this exit.

Notes

To utilize the exit for POVI, code the exit name in the Stop WTOR Exit field in the Started Task Manager resource definition.

A 0 will be returned if the stop is successful. A 4 will be returned if the stop did not complete successfully; the stop verification WTOR will be issued to the operator console.

Page 338: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

TSO Utilities

338 Integrated Resource Manager Functions and Other Facilities Version 500

TSO Utilities

A set of exits and routines are provided to interface with TSO.

AF/TCI - TSO Command Interface An interface to process TSO/E and ISPF commands issued by an operator via an MVS Modify command to the AF/TCI started task.

TCI routines can be used to invoke TSO/E clists, REXX execs, programs and TSO/E or ISPF commands. Upon completion of the command, the output from the command will be sent to the issuing console.

Format

TSO Commands

F TCI,tso command and parameters______________

TCI Commands

F TCI function objects options

/DSALLOC dsaparm

/DSDELETE dsdparm

/DSFREE dsfparm

/DSRENAME dsrparm

/HELP

/LISTDSN lstname

/PING pngparm

/REFRESH tblname

/SELECT selparm

/SHOW SSCONS

VERSION

/TRACE exename TRACE=|O|

|A|

|C|

|E|

|F|

|I|

|L|

|N|

|R|

Page 339: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Miscellaneous Exits and Routines 339

TSO Utilities

Parameters

TSO Commands:

TCI Commands:

Command:

Any valid TSO command, including: TSO/E clists, REXX execs, programs, and TSO or ISPF commands.

Note: To execute a pure TSO/E clist process, for instance one that utilizes GLOBAL services, preface the clist name with a cent sign:

F TCI,¢MYCLIST

|S|

TRACK=|0|

|1|

/VERASE varname ASIS

SHARED

PROFILE

/VGET varname ASIS

SHARED

PROFILE

/VMOD(val) varname ASIS

SHARED

PROFILE

VPUT(val) varname ASIS

SHARED

PROFILE

command required

parameters optional

Function required

Objects required

Options optional, as needed by function

F TCI function objects options

Page 340: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

TSO Utilities

340 Integrated Resource Manager Functions and Other Facilities Version 500

Parameters:

Any parameters required for the specified TSO/E command.

Function:

Objects:

DSALLOC Invoke TSO/E dataset command: ALLOC

DSDELETE Invoke TSO/E dataset command: DELETE

DSFREE Invoke TSO/E dataset command: FREE

DSRENAME Invoke TSO/E dataset command: RENAME

HELP Display help for the AF/TCI commands

LISTDSN Display contents of specified dataset

PING Ping TCP/IP host and display response

REFRESH Refresh an in-storage copy of a table

SELECT Perform function via a SELECT command

SHOW Display AF/TCI ISPF variable settings

TRACE Update trace table values for an exec

VERASE Delete the value of an ISPF variable

VGET Return the value of an ISPF variable

VMOD(val) Append the value of an ISPF variable

VPUT(val) Update the value of an ISPF variable

dsaparm Any valid parameters for TSO/E ALLOC

dsdparm Any valid parameters for TSO/E DELETE

dsfparm Any valid parameters for TSO/FREE

dsrparm Any valid parameters for TSO/RENAME

lstname Name of the dataset to list/display

pngparm Host and any valid PING parameters

tblname Name of an application REXX table

Page 341: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Miscellaneous Exits and Routines 341

TSO Utilities

Options:

selparm Any valid parameters for ISPF SELECT

exename Name of an application REXX exec

varname Name of an application ISPF variable

SSCONS Keyword for AF/OPERATOR subsystem console data

VERSION Keyword for AF/TCI TSO/E version data

TRACE= Type of trace to be enabled for the exec:

0 Turn tracing off.

A Trace all clauses before execution.

C Trace all commands before execution.

E Trace any command resulting in an error after execution, together with the return code from the command.

F Trace any command resulting in failure after execution, together with the return code from the command.

I Trace all clauses before execution and all of the intermediate results during evaluation of expressions and substituted names.

L Trace only labels passed during execution.

N Trace commands resulting in a negative return code after execution.

R Trace all clauses before execution.

Displays final results of evaluating an expression.

ASIS ISPF variables in pool as they exist

SHARED ISPF variables located in shared pool

PROFILE ISPF variables located in profile pool

Page 342: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

TSO Utilities

342 Integrated Resource Manager Functions and Other Facilities Version 500

@TCIXSA1 - AF/TCI Post Start Exit Set subsystem or EMCS console variables.

Syntax

>>-----@TCIXSA1----------<<

Parameters

There are no arguments for this exit.

Notes

To utilize the exit, code the exec name in the Started Task Manager resource definition Post-Start Exit field.

To utilize the exit, the resource name for the resource must be 'AFTCI'.

Page 343: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Miscellaneous Exits and Routines 343

TSO Utilities

@TSOUMAX - Set TSO USERMAX Routine Reset the TSO USERMAX to a specified value.

Syntax

>>-----@TSOUMAX_maxusers----------<<

Notes

One of the following return codes will be returned from the routine:

� 0 Command completed successfully

� 4 Parameter error

� 8 Command did not complete successfully

maxusers TSO USERMAX Override Value, optional. If not specified, the MAXUSER value coded in the @TSOSTOP table will be used.

Page 344: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

TSO Utilities

344 Integrated Resource Manager Functions and Other Facilities Version 500

Page 345: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Customer Support 345

Customer Support

IntroductionCandle Corporation offers a comprehensive maintenance and support plan to ensure you realize the greatest value possible from your Candle software investments. We have more than 200 technicians worldwide, committed to providing you with prompt resolutions to your support requests.

Customer Support hours of operation are from 5:30 A.M. – 5:00 P.M., Pacific Time. In the event of an after-hours or weekend emergency, Candle's computerized call management system ensures that a technician will return your call within one hour. For customers located outside of North America, after-hours and weekend support is provided by Candle Customer Support locations in the United States.

Electronic supportCandle provides information and support services through

n Candle's home page at www.candle.com. You can use the Candle Worldwide Web Site to– open problem records– access maintenance information – order products or maintenance– access IBM compatibility information– download fix packs for distributed products– read news and alerts– scan a list of scheduled Candle education classes

n Candle Electronic Customer Support (CECS), an electronic customer support facility. You can access this facility using the IBM Global Network. You can use CECS to:

A

Page 346: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

346 Integrated Resource Manager Functions and Other Facilities Version 500

– open problem records– search our database for solutions to known problems– look for answers to commonly asked questions– read news and alerts– scan a list of scheduled Candle education classes

Both CECS and the Candle Worldwide Web Site are available 24 hours a day, 7 days per week.

Telephone supportOur support network consists of product specialists who work with you to solve your problem.

Candle uses an on-line problem management system to log and track all support requests. Your support request is immediately routed to the appropriate technical resource.

When you call to report a problem, please have the following information:

n your Candle personal ID (PID) numbern the release level of the Candle product n the release level of IBM or other vendor software n identifying information and dates of recently applied maintenance to your

Candle product or IBM productn a detailed description of the problem (including the error message) and

the events preceding the problemn a description of any unusual events that occurred before the problem

Customer support locations and numbersTo contact a Customer Support representative, refer to the following list. While these phone numbers were accurate at the time this document was published, the current numbers can be found on the Candle Web site, www.candle.com, under Customer Support.

Page 347: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Customer Support 347

Table 1. Customer Support Phone Numbers

Office Telephone FAX

North America (800) 328-1811 (310) 535-3636

(310) 727-4204

Europe

Belgium/Luxembourg +32 (0) 3 270 95 60 +32 (0) 3 270 95 41

France +33 (0) 1 53 61 60 60 +33 (0) 1 53 61 06 16

Germany/Switzerland/Austria

+49 (0) 89 54 554 333 +49 (0) 89 54 554 170

Italy – Freephone 800 780992

Netherlands +31 (0) 30 600 35 50 +31 (0) 30 600 35 10

Scandinavia +46 (0)8 444 5940 +46 (0)8 623 1855

United Kingdom +44 (0)161 437 5224 +44 (0)161 437 5225

(Southern Europe, Middle East and South Africa Agents call United Kingdom)

Asia Pacific – English Hub +61 2 9954 1818

Australia +61 2 8912 9898

Hong Kong 800 908 457

India +61 2 8912 9898

Indonesia 0018 03061 2061

Malaysia 1800 803 459

New Zealand 0800 449 596

Philippines 1800 1612 0096

Singapore 800 616 2075

Thailand 0018 00612 1045

Asia Pacific – Japanese Hub +81 3 3595 7150 +81 3 3595 7110

Asia Pacific – Korean Hub +82 2 552 8744 +82 2 552 8746

Asia Pacific – Mandarin Hub +88 62 2739 3223 +88 62 2378 5993

Asia Pacific – e-mail address: [email protected]

Page 348: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

348 Integrated Resource Manager Functions and Other Facilities Version 500

When your local support office is unavailable, you can contact Candle's North America support center. If USADirect® service is available in your country, use the 800 telephone number. If USADirect® service is not available, ask your international operator for assistance in calling Candle's local (310) number.

Incident documentationYou may be asked to send incident documentation to the Candle Customer Support Center. On the outside of all packages you send, please write the incident number given to you by the Customer Support representative.

Send tapes containing the incident information to the following address, unless directed otherwise by your Customer Support representative:

Candle Customer SupportCandle Support Center, Incident number201 North Douglas StreetEl Segundo, California 90245

Send all other relevant documentation, such as diskettes or paper documentation, to the address provided by your Customer Support representative.

Ensuring your satisfaction with customer supportCandle Customer Support is committed to achieving high customer satisfaction ratings in all areas. These include

n connecting you to a support representative promptlyn providing you with the appropriate fixesn answering support questionsn filling your shipping ordersn supplying documentationIf you have a concern that has not been resolved to your satisfaction, you can open a complaint ticket. All tickets are logged and tracked to ensure responsiveness and closure. Using the ticket information, a manager will contact you promptly to resolve your problem.

Page 349: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Index

Symbols@AFRCALL 230@APLCALL 232, 233@APLCONS 257@APLFMAT 256@APLLOGN 257@APLMSGS 258@APLOPER 264@APLOPTS 266@APLPTRN 267@APLVDCL 270@APLVLET 272@APLVSUB 273@CA7DMD 242@CA7FCMP 244@CA7HOLD 245@CA7LOGF 246@CA7LOGN 247@CA7PDSN 248@CA7PUSR 253@CA7RLSE 249@CA7RUN 250@CA7SCMD 252@CCFCALL 233@CNSCALL 234@DB2XPW2 315@DEVVARY 275@ICMSTOP 301@ISPAOCM 287@JESCALL 236@JOB@RCF 292@LOGSCAN 294@MCFCALL 237@MQSXPW1 316@MQSXRB1 317@NETVSTP 318@NVASTOP 319

@OM2LOGF 332@OM2LOGN 333@OM2VRA1 334@OM2XRBL 335@OMCVRA1 321@OMDVRA1 322@OMILOGF 323@OMILOGN 324@OMIXRBL 325@OMVLOGF 326@OMVLOGN 327@OMVVRA1 328@OMVXPW1 330@OMVXPWA 329@OMVXRBL 331@OVIVRA1 336@OVIXPW1 337@RCFACTV 227@RCFCALL 238, 239@RCFSCHD 280@RCFSCHQ 282@RCFSSTA 90@RCFSTAT 283@RCFSUCC 284@SCFCALL 239@TBLCALL 240@TBLRGST 285@TBLUTBL 286@TCIOPER 287@TCIXSA1 342@TCPXPW1 320@TSOUMAX 343@VTMCALL 241@VTMDNET 289@VTMVNET 290

Index 349

Page 350: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Index

AABEND 41About this Document 11Adobe Portable Document Format 12AF/TCI - TSO Command Interface 338ALLOC 21ALLOCDD 29ALLOCDSN 31ALLOCED 32

BBASE2BDS 99BASE2DAY 101Batch Job Utilities 292

@JOB@RCF 292@LOGSCAN 294

BDS2BASE 104BDS2TIME 106BDS2TOD 108BIT2DAYS 43BIT2LIST 44

CCA Utilities 301

@ICMSTOP 301KAUZ7$DM 305KAUZ7$FC 307KAUZ7$HO 308KAUZ7$PD 309KAUZ7$PU 310KAUZ7$RL 311KAUZ7$RU 312KAUZ7$SC 314KAUZ7SHU 302KAUZ7VRA 304

Candle Electronic Customer Support (CECS) 345

Candle home page 345Candle Internet site 345Candle Worldwide Web site 345CENT2DAY 110CONCAT 34

CONSADDR 68CONSAREA 69CONSID 70CONSNAME 71CPCMD 45CPUTIME 46customer support

electronic support 345Internet 345locations 346numbers 346telephone support 346

DDATEPART 112DATETIME 113DAY2BASE 118DAY2CENT 120DB2 Utilities 315

@DB2XPW2 315DECONCAT 35DECRYPT 47DEVALLOC 75DEVICE 76DEVICES 77DEVNUM 84DEVPATH 85DEVPEND 86Documentation

supplied format 12Documentation Conventions 14Documentation Set 16DOM 55

EENCRYPT 48EXECDROP 158EXECLOAD 159EXECSTAT 161

FFINDLGN 135FINDMAT 136

350 Integrated Resource Manager Reference Manual Version 500

Page 351: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

FREE 36

GGeneral Functions 41GMT 121

Hhome page

Candle 345

IIMSDCRDY 141IMSREADY 142Internet site

Candle 345

JJ3ACTIVE 143J3CLASS 144J3DEVICE 146J3GLBID 147J3GLOBAL 148J3GROUP 149J3INITS 151J3NJECNS 153J3RJPWS 154J3SEQNO 156

KKAUZ7$DM 305KAUZ7$FC 307KAUZ7$HO 308KAUZ7$PD 309KAUZ7$PU 310KAUZ7$RL 311KAUZ7$RU 312KAUZ7$SC 314KAUZ7SHU 302KAUZ7VRA 304

LLEAPYEAR 122LOGMSG 138

MMEMBER 39MEMBERS 40Message Functions 55MLWTO 56MODIFYID 88MQ Utilities 316

@MQSXPW1 316@MQSXRB1 317

NNetwork Task Utilities 318

@NETVSTP 318@NVASTOP 319@TCPXPW1 320

NOVALU 162

OOMEGAMON and OmegaView Utilities 321

@OM2LOGF 332@OM2LOGN 333@OM2VRA1 334@OM2XRBL 335@OMCVRA1 321@OMDVRA1 322@OMILOGF 323@OMILOGN 324@OMIXRBL 325@OMVLOGF 326@OMVLOGN 327@OMVVRA1 328@OMVXPW1 330@OMVXPWA 329@OMVXRBL 331@OVIVRA1 336@OVIXPW1 337

ONLINE 89Online Documentation 16

PP2PCOM1 139P2PLINK 140

Index 351

Page 352: Functions and Other Facilities - IBMpublib.boulder.ibm.com/tividd/td/ITIntegRM/GC32-9223 … ·  · 2004-08-21Functions and Other Facilities Integrated Resource Manager Version 500

Index

Panels and figures 14PATTERN 49Prerequisites 11Printed documentation 17Printing problems 12

RREGION 92REPLIES 93REXX Functions 207REXXIC 163REXXVGET 164REXXVPUT 165

SSORTWORD 53SUBCOM 166Symbols 15

TTABLE 167Table Functions 167TBADD 169TBAPPEND 170TBARRAY 171TBCOLUMN 172TBCREATE 173TBDELETE 175TBEXIST 176TBFETCH 177TBGET 178TBIDS 179TBKEYS 180TBMOD 181TBNAMES 183TBPUT 184

TBQUERY 185TBREAD 192TBRECORD 194TBRESTOR 195TBROW 196TBSARG 197TBSCAN 199TBSEARCH 200TBSELECT 201TBSORT 204TBUPDATE 205TIME2BDS 125TIME2TOD 127TIMEPART 124TOD 129TOD2BDS 130TOD2TIME 132TSO Utilities 338

@TCIXSA1 342@TSOUMAX 343

typographical conventions 14

VVariables and literals 14VOLSER 98

WWAITSECS 54WEEKDAY 134Worldwide Web site

Candle 345WTL 60WTO 61WTOR 64WTOROK 67

352 Integrated Resource Manager Reference Manual Version 500