REXX/400 Reference Version 4

REXX/400 Reference Version 4

AS/400 Advanced Series IBM REXX/400 Reference Version 4 SC41-5729-00 AS/400 Advanced Series IBM REXX/400 Reference Version 4 SC41-5729-00 Take Note! Before using this information and the product it supports, be sure to read the general information under “Notices” on page ix. First Edition (August 1997) This edition applies to the licensed program Operating System/400 (Program 5769-SS1), Version 4 Release 1 Modification 0, and to all subsequent releases and modifications until otherwise indicated in new editions. Make sure that you are using the proper edition for the level of the product. Order publications through your IBM representative or the IBM branch serving your locality. If you live in the United States, Puerto Rico, or Guam, you can order publications through the IBM Software Manufacturing Solutions at 800+879-2755. Publications are not stocked at the address given below. IBM welcomes your comments. A form for readers’ comments may be provided at the back of this publication. You can also mail your comments to the following address: IBM Corporation Attention Department 542 IDCLERK 3605 Highway 52 N Rochester, MN 55901-7829 USA or you can fax your comments to: United States and Canada: 800+937-3430 Other countries: (+1)+507+253-5192 If you have access to Internet, you can send your comments electronically to [email protected]; IBMMAIL, to IBMMAIL(USIB56RZ). When you send information to IBM, you grant IBM a nonexclusive right to use or distribute the information in any way it believes appropriate without incurring any obligation to you. Copyright International Business Machines Corporation 1997. All rights reserved. Note to U.S. Government Users — Documentation related to restricted rights — Use, duplication or disclosure is subject to restrictions set forth in GSA ADP Schedule Contract with IBM Corp. Contents Notices . ix Programming Interface Information .......................... x Trademarks . x About REXX/400 Reference .............................. xi Who Should Read This Book .............................. xi What You Should Know before Reading This Book ................. xi What This Book Contains ................................ xi Where to Find More Information ............................ xi Prerequisite and Related Information ......................... xi Information Available on the World Wide Web ................... xii Chapter 1. Introduction . 1 Who Should Read This Book .............................. 1 What the SAA Solution Is ................................ 1 Supported Environments . 2 Common Programming Interface .......................... 2 How to Use This Book .................................. 2 How to Read the Syntax Diagrams ......................... 3 For Further REXX Information ............................ 4 For Further AS/400 System Information ...................... 5 Chapter 2. REXX General Concepts ........................ 7 Structure and General Syntax ............................. 8 Characters . 8 Comments . 8 Tokens . 9 Implied Semicolons . 14 Continuations . 14 Expressions and Operators .............................. 14 Expressions . 15 Operators . 15 Parentheses and Operator Precedence ..................... 18 Clauses and Instructions ............................... 20 Null Clauses . 20 Labels . 20 Instructions . 20 Assignments . 20 Keyword Instructions . 20 Commands . 21 Assignments and Symbols .............................. 21 Constant Symbols . 22 Simple Symbols . 22 Compound Symbols . 22 Stems . 24 Commands to External Environments ........................ 25 Environment . 25 Commands . 26 REXX and the AS/400 System ............................ 26 Copyright IBM Corp. 1997 iii Chapter 3. Keyword Instructions . 29 ADDRESS . 30 ARG . 33 CALL . 35 DO . 39 Simple DO Group .................................. 39 Repetitive DO Loops ................................ 40 Conditional Phrases (WHILE and UNTIL) .................... 42 DROP . 44 EXIT . 45 IF . 46 INTERPRET . 47 ITERATE . 49 LEAVE . 50 NOP . 51 NUMERIC . 52 OPTIONS . 54 PARSE . 56 PROCEDURE . 59 PULL . 62 PUSH . 63 QUEUE . 64 RETURN . 65 SAY . 66 SELECT . 67 SIGNAL . 68 TRACE . 70 Alphabetic Character (Word) Options ....................... 71 Numeric Options . 72 A Typical Example ................................. 72 Format of TRACE Output ............................. 73 Chapter 4. Functions . 75 Syntax . 75 Functions and Subroutines .............................. 76 Search Order . 77 Errors During Execution .............................. 77 Built-in Functions . 78 ABBREV (Abbreviation) . 79 ABS (Absolute Value) ................................ 79 ADDRESS . 79 ARG (Argument) . 80 BITAND (Bit by Bit AND) .............................. 81 BITOR (Bit by Bit OR) ............................... 81 BITXOR (Bit by Bit Exclusive OR) ........................ 82 B2X (Binary to Hexadecimal) ........................... 82 CENTER/CENTRE . 83 COMPARE . 83 CONDITION . 84 COPIES . 85 C2D (Character to Decimal) ............................ 85 C2X (Character to Hexadecimal) ......................... 86 DATATYPE . 86 DATE . 87 iv AS/400 REXX/400 Reference V4R1 DBCS (Double-Byte Character Set Functions) ................. 88 DELSTR (Delete String) .............................. 88 DELWORD (Delete Word) ............................. 89 DIGITS . 89 D2C (Decimal to Character) ............................ 89 D2X (Decimal to Hexadecimal) .......................... 90 ERRORTEXT . 91 FORM . 91 FORMAT . 91 FUZZ . 92 INSERT . 92 LASTPOS (Last Position) ............................. 93 LEFT . 93 LENGTH . 94 MAX (Maximum) . 94 MIN (Minimum) . 94 OVERLAY . 95 POS (Position) . 95 QUEUED . 95 RANDOM . ..

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    233 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us