Professional Documents
Culture Documents
This seminar is designed for users intending to learn REXX in the MVS environment. Students will study the REXX interpreter as a basis for understanding techniques for writing efficient and readable REXX code. Templates, tracing, and interpreting will be reviewed as well as Generic built-in functions will be reviewed. During laboratory exercises users will test REXX in a variety of commonplace application scenarios. Students will learn how to create their own subroutines and functions. Terminal output will be trapped from MVS and TSO/E. Techniques will be presented to manage the program stack. MVS file I/O programs written in REXX will be scrutinized and tested in laboratory exercises. During the seminar students will also gain an increased awareness of the MVS environment, and will have opportunities to submit MVS REXX execs to the batch processor for background execution.
Audience Prerequisites
This course is intended for all programmers intending to start mastering the REXX language on the MVS platform.
Familiarity with TSO/E, ISPF, and ISPF Editor is required. Experience with JCL would be beneficial but is not required.
Objectives
Write efficient, readable REXX code Choose between various REXX templates for parsing Exploit INTERPRET and interactive debug TRACE Create their own built in REXX functions Trap console output from MVS and TSO/E Effectively manage the program stack Read, write, and update MVS files Submit MVS REXX execs to MVS batch processor
Major Topics
Built-in Function Sub procedures The Program Stacks Specific MVS REXX Functions Output Traps
File I/O Running MVS REXX in Batch The SAA REXX/370 Compiler
Duration
2007-08 | Keane, Inc.
3 days
Australia | Canada | China | France | India | New Zealand | Singapore | Switzerland | UAE | UK | USA info@keane.com
www.keane.com/education/
Course Contents
1. Why REXX?
Objectives Why REXX? What is REXX like? What Can REXX do? REXX on TSO Comparison with CLISTs Execution Differences: CLIST and REXX REXX Syntax Setting up to Execute Parse Version The Template With Just Variables A Literal in a Template Exercises A Variable Instead of a Literal Column Delimiting with Single Numbers Column Delimiting with Two Numbers
5. Debugging
Objectives What You Can Do During Interactive Debug Interactive Debug Codes Debugging Tracing Instructions Trapping Errors The Trap That Terminates The Trap That Continues Trap Continues with Chosen Name Condition Trapping TSO/ISPF Command Trapping Failure Failure Trap That Continues Trapping Novalue Trapping PA1 or ATTN Trapping With A Choice Trap Ingredients The Infamous GO TO GO TO Exercise 28
2. REXX Components
Objectives REXX Verbs and Keywords Assignment Command Label Function The Literal Hexadecimal String REXX Variables The Basic Subset
6. Math
Objectives Math Precision Rounding
Australia | Canada | China | France | India | New Zealand | Singapore | Switzerland | UAE | UK | USA info@keane.com
www.keane.com/education/
General Format of Internal Function/Subroutine External Functions/Subroutines Subroutine Exercise Function Exercise User Written Functions Internal Exercise External Exercise
10. Looping
Objectives Looping DO WHILE DO UNTIL DO UNTIL Exercise Stepping with DO DO FOREVER Looping N Times DO n TIMES ITERATE Looping Exercise LEAVE
9. Built-In FUNCTIONS
Objectives Built-in FUNCTIONS REXX Provides Result of Functions Using RESULT Using Null with Functions DATATYPE Function LENGTH Function POS Function QUEUED Function SUBSTR Function X2D and D2X Functions Functions Found Only on TSO LISTDSI Function LISTDSI Example MSG Function OUTTRAP Function OUTTRAP Example SYSDSN Function User Written Functions/Subroutines
Australia | Canada | China | France | India | New Zealand | Singapore | Switzerland | UAE | UK | USA info@keane.com
www.keane.com/education/
13. EXECIO
Objectives EXECIO EXECIO Format What Do You Read Into? Where Do You Write From? EXECIO Syntax Reading a Whole File into the Stack Reading a Whole File into the Stack Exercise Reading One Record at a Time Reading One Record ExerciseReading a Whole File into an Array Reading a Whole File into an Array Exercise Additional Option for Reading EXECIO Writing Writing from the Stack Example Writing from the Stack Explanation Writing One Line at a Time from Stack Exercise Copy a File Using the Stack Writing from an Array The INTERPRET Instruction INTERPRET Exercise
Appendix A
Converting from CLISTS Codes Displayed During Interactive Debug Tracing Instruction You Can Put in Your Programs
Australia | Canada | China | France | India | New Zealand | Singapore | Switzerland | UAE | UK | USA info@keane.com
www.keane.com/education/