Endevor-Exits per Cobol-Hülse <-> Rexx-Programm

Slides:



Advertisements
Ähnliche Präsentationen
PL/SQL - Programmierung von Programmeinheiten. © Prof. T. Kudraß, HTWK Leipzig Gespeicherte Prozeduren – Eine Prozedur ist ein benannter PL/SQL Block,
Advertisements

Agenda Sitzung 2 für den Programmaufbau
R. Zankl – Ch. Oelschlegel – M. Schüler – M. Karg – H. Obermayer R. Gottanka – F. Rösch – P. Keidler – A. Spangler th Expert Meeting Business.
Elektronisch messen, steuern, regeln
Peter Marwedel TU Dortmund, Informatik 12
Fakultät für informatik informatik 12 technische universität dortmund Hardware/Software Partitioning Peter Marwedel Informatik 12 TU Dortmund Germany Chapter.
Aufgabenbesprechung Programming Contest. Order 7 Bo Pat Jean Kevin Claude William Marybeth 6 Jim Ben Zoe Joey Frederick Annabelle 0 SET 1 Bo Jean Claude.
Subjects and Direct Objects When to use der vs. den.
Formation of Questions in German
Wenn…… the conditional. Using the conditional tense The conditional tense is used to talk about something that happens only after something else happened.
Projektübung Klimamodellierung
Projektübung Klimamodellierung André Paul. Vorbesprechung Projektübung Klimamodellierung ( ) – A. Paul.
PL/SQL - Programmierung von Programmeinheiten. © Prof. T. Kudraß, HTWK Leipzig Gespeicherte Prozeduren – Eine Prozedur ist ein benannter PL/SQL Block,
Institut für Verkehrsführung und Fahrzeugsteuerung > Technologien aus Luft- und Raumfahrt für Straße und Schiene Automatic Maneuver Recognition in the.
Three minutes presentation I ArbeitsschritteW Seminar I-Prax: Inhaltserschließung visueller Medien, Spree WS 2010/2011 Giving directions.
Modulare Programmierung
Endevor API Denk 03/2003 Johannes Radman noti.
Seminar Telematiksysteme für Fernwartung und Ferndiagnose Basic Concepts in Control Theory MSc. Lei Ma 22 April, 2004.
Kapitel 1 Komm mit! Level I erste Stufe.
Die Hausaufgaben: Machen Sie Ü. 7 auf S. 29
M A X - P L A N C K - G E S E L L S C H A F T Bericht des Partnerinstituts Sabine Krott 1.0 Pilotentreffen im Harnack-Haus, 8. Juni 2006 Distribution:
Regular Verbs and “Sein”
Die Zeit (TIME) Germans are on military time which is 1-24
Sanjay Patil Standards Architect – SAP AG April 2008
| DC-IAP/SVC3 | © Bosch Rexroth Pneumatics GmbH This document, as well as the data, specifications and other information set forth in.
3rd Review, Vienna, 16th of April 1999 SIT-MOON ESPRIT Project Nr Siemens AG Österreich Robotiker Technische Universität Wien Politecnico di Milano.
Deutsch 1 G Stunde. Dienstag, der 11. September 2012 Deutsch 1 (G Stunde)Heute ist ein E - Tag Unit: Introduction to German & Germany Objectives: Learn.
The free XML Editor for Windows COOKTOP Semistrukturierte Daten 1 Vortrag Semistrukturierte Daten 1 COOKTOP The free XML-Editor for Windows
Deutsch 1 G Stunde. Donnerstag, der 25. Oktober 2012 Deutsch 1, G Stunde Heute ist ein B- Tag Unit: Family & homeFamilie & Zuhause Objectives: Phrases.
Deutsch 1 G Stunde. Donnerstag, der 18. Oktober 2012 Deutsch 1, G Stunde Heute ist ein E- Tag Unit: Family & homeFamilie & Zuhause Objectives: Phrases.
Deutsch 1 G Stunde. Montag, der 10. September 2012 Deutsch 1 (G Stunde)Heute ist ein D - Tag Unit: Introduction to German & Germany Objectives: Introducing.
Wortschatz angenehm comfortable anstrengend tiring ausgezeichnet outstanding bequem comfortable berühmt famous besser better blöd stupid einfach easy fantastisch.
bei in seit mit auf hinter von nach aus zu für vor.
You need to use your mouse to see this presentation © Heidi Behrens.
Department of Computer Science Homepage HTML Preprocessor Perl Database Revision Control System © 1998, Leonhard Jaschke, Institut für Wissenschaftliches.
Wortschatz der Schulhof the playground die Aula the hall
From “Deutsch: Na Klar! 5th Edition”
XML IV: Cocoon 2.
Wirtschaftsingenieurwesen Maschinenbau und Logistik Betriebsinformatik und Programmieren (BIPR) Ceylan Isik Quelle: Google.
Ein Projekt des Technischen Jugendfreizeit- und Bildungsvereins (tjfbv) e.V. kommunizieren.de Blended Learning for people with disabilities.
Nouns. What is a noun O A noun is the name of a person, O place, O animal O or thing.
Design Patterns Ein Muster (pattern) ist eine Idee, die sich in einem praktischen Kontext als nützlich erwiesen hat und dies auch in anderen sein wird.
Talking about yourself
DEUTSCH Guten Tag! Heute ist Freitag Kapitel 5: Rechte und Pflichten Das Ziel: Use the genitive case Use wäre und hätte correctly Use modal.
External Labels – The rules For all external labels the following rules apply (external labels are all labels which are not inside of a shape) - all labels.
© Boardworks Ltd of 8 Time Manner Place © Boardworks Ltd of 8 This icon indicates that the slide contains activities created in Flash. These.
By: Jade Bowerman. German numbers are quite a bit like our own. You start with one through ten and then you add 20, 30, 40 or 50 to them. For time you.
Time Expressions with Dative Von: Payton Knuckles.
AS Thema Die Schule.
Adjectiv Endungen Lite: Adjective following articles and pre-ceeding nouns. Colors and Clothes.
Dative Prepositions. The dative case always follows these prepositions: – aus – out of, from, (from – place of origin) – außer – besides, except – bei.
Sentence Structure Subject and verb are always together. Subject and verb are always together. Subject and verb must agree Subject and verb must agree.
1 Intern | ST-IN/PRM-EU | | © Robert Bosch GmbH Alle Rechte vorbehalten, auch bzgl. jeder Verfügung, Verwertung, Reproduktion, Bearbeitung,
Launch ON Global.vi System ID object name classname Services to suscribe Observer Control Ref vi-path Service name Step 1 : Objects register to the Global.vi´s,
Adjective Endings Nominative & Accusative Cases describing auf deutsch The information contained in this document may not be duplicated or distributed.
How to use and facilitate an OptionFinder Audience Response System.
Instrumente und Unterhaltung End of Unit Assessment.
You need to use your mouse to see this presentation
Page 1 XXX21/08/2014 Implemented by Benutzen Sie diese Titelfolie für Programme und Projekte im Ausland. Setzen Sie das „einheitliche Logo der Zusammenarbeit“
Data Mining Spectral Clustering Junli Zhu SS 2005.
You need to use your mouse to see this presentation © Heidi Behrens.
Der formelle Imperativ – the Imperative
HORIZONT 1 SmartJCL ® Der einfache Weg zur fehlerfreien JCL neue Version 3.2 HORIZONT Software für Rechenzentren Garmischer Str. 8 D München Tel.
WS 2013/14 Datenbanksysteme Do 17:00 – 18:30 R Vorlesung #8 SQL (Teil 5)
Here‘s what we‘ll do... Talk to the person sitting in front of you. Introduce each other, and ask each other questions concerning the information on your.
DB2 UDB im z/VSE Heinz Peter Maassen – Lattwein GmbH COURSE Tagung Bad Hersfeld 2008.
Your Logo Presentation Title Presentation Subtitle.
The IT–Information System
Azure Mobile Services Deep dive into node.js scripting
Florida Questionable Claim Submissions
 Präsentation transkript:

Endevor-Exits per Cobol-Hülse <-> Rexx-Programm Agenda Allgemeine Endevor-Zahlen Endevor-Installation Exit-Programmierung die Sprache die Voraussetzungen technische Einzelheiten ~

Exit-Programmierung Was wird benötigt: Was wird nicht benötigt: die Voraussetzungen Was wird benötigt: Cobol-Sourcecode für den Exit (Hülse) Schnittstelle „Cobol calls Rexx“ Rexx-Sourcecode für die Exit-Logik Rexx-Loadlibrary und Allokation C1UEXITS ändern Was wird nicht benötigt: ISPF-Umgebung (sonst wäre der Aufruf mit „ISPEXEC Select CMD“ einfacher !) EXIT7 als Beispiel (Package Exit) ~

Inhalt Allgemeine Endevor-Zahlen Endevor-Installation Agenda Allgemeine Endevor-Zahlen Endevor-Installation Exit-Programmierung die Sprache die Voraussetzungen technische Einzelheiten Cobol-Sourcecode Rexx-Sourcecode Rexx-Loadlibrary und Allokation C1UEXITS ~

Inhalt Allgemeine Endevor-Zahlen Endevor-Installation Agenda Allgemeine Endevor-Zahlen Endevor-Installation Exit-Programmierung die Sprache die Voraussetzungen technische Einzelheiten Cobol-Sourcecode Rexx-Sourcecode Rexx-Loadlibrary und Allokation C1UEXITS ~

Cobol-Sourcecode EXIT7 Der Cobol-Standard-Kopf * - Cobol-Wrapper for Endevor exits invoking Rexx programs - * * ------------------------------------------------------------ * IDENTIFICATION DIVISION. * PROGRAM-ID. C1UEXT07. AUTHOR. BRIDGESTONE. INSTALLATION. IBM-370. DATE-WRITTEN. 01.01.00. DATE-COMPILED. REMARKS. ****************************************************************** * This cobol program has only the functionality to receive data from Endevor during an exit * call, to format them and call the Rexx. Example here is for EXIT7 (packages). ENVIRONMENT DIVISION. CONFIGURATION SECTION. SOURCE-COMPUTER. IBM-370 * WITH DEBUGGING MODE . OBJECT-COMPUTER. IBM-370. SPECIAL-NAMES. DECIMAL-POINT IS COMMA. INPUT-OUTPUT SECTION. FILE-CONTROL. DATA DIVISION. FILE SECTION. ~

Cobol-Sourcecode EXIT7 copybook from CA (in this case: package copybook) Location: HLQ.LLQ.SOURCE(PKGXBLKS) EXIT7 Schnittstelle Endevor <-> Cobol-Exit LINKAGE SECTION. * COPY PKGXBLKS. *----------------------------------------------------------------- PROCEDURE DIVISION USING PACKAGE-EXIT-BLOCK PACKAGE-REQUEST-BLOCK PACKAGE-EXIT-HEADER-BLOCK PACKAGE-EXIT-FILE-BLOCK PACKAGE-EXIT-ACTION-BLOCK PACKAGE-EXIT-APPROVER-MAP PACKAGE-EXIT-BACKOUT-BLOCK PACKAGE-EXIT-SHIPMENT-BLOCK PACKAGE-EXIT-SCL-BLOCK PACKAGE-EXIT-COLLECT-BLOCK . A001-MAIN SECTION. . . . . . ~ 6

Cobol-Sourcecode EXIT7 Der erste Aufruf von Endevor A001-MAIN SECTION. A001. MOVE 0 TO REXX-RETURN-CODE. MOVE 0 TO RETURN-CODE. * ** first Endevor-call of exit7 initialize the * ** options when Endevor shall call the exit7. IF SETUP-EXIT-OPTIONS PERFORM A998-SET-UP MOVE ZEROS TO RETURN-CODE MOVE 0 TO PECB-NDVR-EXIT-RC GO TO Z001. Z001. GOBACK. ~ 7

Cobol-Sourcecode EXIT7 Setup für Folgeaufrufe * *-----------------------------------------* * * define all exit points (for 1st call) * A998-SET-UP SECTION. * SET TO Y, IF THIS EXIT POINT SHALL CALL THIS PROGRAM MOVE 'N' TO PECB-BEFORE-BACKIN MOVE 'N' TO PECB-AFTER-BACKIN MOVE 'N' TO PECB-BEFORE-BACKOUT MOVE 'N' TO PECB-AFTER-BACKOUT MOVE 'N' TO PECB-BEFORE-CAST MOVE 'Y' TO PECB-MID-CAST MOVE 'N' TO PECB-AFTER-CAST MOVE 'N' TO PECB-BEFORE-COMMIT MOVE 'N' TO PECB-AFTER-COMMIT MOVE 'Y' TO PECB-BEFORE-CREATE-BLD MOVE 'N' TO PECB-AFTER-CREATE-BLD MOVE 'Y' TO PECB-BEFORE-CREATE-COPY MOVE 'N' TO PECB-AFTER-CREATE-COPY MOVE 'Y' TO PECB-BEFORE-CREATE-EDIT MOVE 'N' TO PECB-AFTER-CREATE-EDIT MOVE 'Y' TO PECB-BEFORE-CREATE-IMPT MOVE 'N' TO PECB-AFTER-CREATE-IMPT ~ 8

Cobol-Sourcecode EXIT7 Setup für Folgeaufrufe MOVE 'N' TO PECB-BEFORE-DELETE MOVE 'N' TO PECB-AFTER-DELETE MOVE 'N' TO PECB-BEFORE-DSPLY-APPR MOVE 'N' TO PECB-BEFORE-DSPLY-BKOUT MOVE 'N' TO PECB-BEFORE-DSPLY-SCL MOVE 'N' TO PECB-BEFORE-DSPLY-ELMSM MOVE 'N' TO PECB-BEFORE-DSPLY-PKG MOVE 'N' TO PECB-BEFORE-DSPLY-RPT MOVE 'Y' TO PECB-BEFORE-EXEC MOVE 'N' TO PECB-AFTER-EXEC MOVE 'N' TO PECB-BEFORE-EXPORT MOVE 'N' TO PECB-AFTER-EXPORT MOVE 'N' TO PECB-BEFORE-GENPID MOVE 'N' TO PECB-AFTER-GENPID MOVE 'N' TO PECB-BEFORE-LIST MOVE 'N' TO PECB-AFTER-LIST MOVE 'N' TO PECB-BEFORE-MOD-BLD MOVE 'N' TO PECB-AFTER-MOD-BLD MOVE 'N' TO PECB-BEFORE-MOD-CPY MOVE 'N' TO PECB-AFTER-MOD-CPY MOVE 'N' TO PECB-BEFORE-MOD-EDIT MOVE 'N' TO PECB-AFTER-MOD-EDIT MOVE 'N' TO PECB-BEFORE-MOD-IMPT MOVE 'N' TO PECB-AFTER-MOD-IMPT ~ 9

Cobol-Sourcecode EXIT7 Setup für Folgeaufrufe MOVE 'N' TO PECB-BEFORE-RESET MOVE 'N' TO PECB-AFTER-RESET MOVE 'N' TO PECB-BEFORE-REV-APPR MOVE 'N' TO PECB-AFTER-REV-APPR MOVE 'N' TO PECB-BEFORE-REV-DENY MOVE 'N' TO PECB-AFTER-REV-DENY MOVE 'N' TO PECB-BEFORE-SHIP-XMIT MOVE 'N' TO PECB-AFTER-SHIP-XMIT MOVE 'N' TO PECB-BEFORE-SHIP-CON MOVE 'N' TO PECB-AFTER-SHIP-CON * DO IT IN BATCH AND FOREGROUND MOVE 'Y' TO PECB-TSO-EXECUTE MOVE 'Y' TO PECB-BATCH-EXECUTE . * Z998. EXIT. ~ 10

Exit-Programmierung EXIT7 Schnittstelle zum Aufruf einer compiled Rexx (Call-Definition) WORKING-STORAGE SECTION. * ******************************************* * * Field definitions for REXX program * 01 USED-REXX-PROGRAMS 05 REXXPGM PIC X(8). [name of your own Rexx program (e.g. REXXEX7)] 01 IRXEXEC-NAME PIC X(8). [“IRXEXEC”] * exec-control-block (EXECBLK-PTR) 01 EXECBLK. 05 EXECBLK-ACRYN PIC X(8). [string 'IRXEXECB'] 05 EXECBLK-LENGTH PIC S9(8) BINARY. [length of EXEC-BLOCKS (IN BYTES)] 05 EXECBLK-RESERVED PIC S9(8) BINARY. [unused] 05 EXECBLK-MEMBER PIC X(8). [EXEC membername if using PDS oder blank if using PO] 05 EXECBLK-DDNAME PIC X(8). [blank, then DEFAULT=SYSEXEC] 05 EXECBLK-SUBCOM PIC X(8). [blank, then DEFAULT=TSO] 05 EXECBLK-DSNPTR POINTER. [name if EXEC-LOAD-DATASET oder 0, then no LOAD-DATASET] 05 EXECBLK-DSNLEN PIC S9(8) BINARY. [length of DATASETNAME oder 0, When DSNPTR=NULL] ~ 11

Exit-Programmierung EXIT7 Schnittstelle zum Aufruf einer compiled Rexx (Call-Definition) wird später erklärt… * Parameters (ARGTABLE-PTR) 01 ARGUMENT. 05 ARGUMENT-1 OCCURS 1 TIMES. 10 ARGSTRING-PTR POINTER. 10 ARGSTRING-LENGTH PIC S9(8) BINARY. 05 ARGSTRING-LAST1 PIC S9(8) BINARY. * Flags 01 FLAGS. 05 FBYTE1-4 PIC X(4). 05 FBYTE5 PIC X(1). * data request block (EVALBLK-PTR) 01 EVALBLK. 05 EVALBLK-EVPAD1 PIC S9(8) BINARY. * evalblk-evsize = (evdata +16) / 8 05 EVALBLK-EVSIZE PIC S9(8) BINARY. 05 EVALBLK-EVLEN PIC S9(8) BINARY. 05 EVALBLK-EVPAD2 PIC S9(8) BINARY. 05 EVALBLK-EVDATA PIC X(256). 05 EVALBLK-EVDATA-RED REDEFINES EVALBLK-EVDATA. 10 REXX-RESULT PIC 9(5). 10 REXX-ERROR-MSG PIC X(251). 01 DUMMY-ZERO PIC S9(8) BINARY. * ******************************************* * * Field definitions for COBOL exit * 01 POINTER-FIELDS. 05 EXECBLK-PTR POINTER. 05 ARGTABLE-PTR POINTER. 05 EVALBLK-PTR POINTER. Rückgabe aus Rexx ~ 12

Exit-Programmierung EXIT7 Schnittstelle zum Aufruf einer compiled Rexx (Parameter-Definition) * your parameters for the rexx program 01 IRXEXEC-PARM. 10 RX-FUNCTION PIC X(2). 10 FILLER PIC X(1). 10 RX-C1PKGID PIC X(16). 10 RX-C1PKGTY PIC X(10). 10 RX-C1ACTION PIC X(8). 10 RX-C1USERID PIC X(8). 10 RX-C1CCID PIC X(12). 10 RX-C1ENVMNT PIC X(8). 10 RX-C1STGID PIC X(1). 10 RX-C1SUBSYS PIC X(8). 10 RX-C1SYSTEM PIC X(8). 10 RX-C1ELTYPE PIC X(8). 10 RX-C1ELEM PIC X(8). 10 RX-MODE PIC X(1). * length of "IRXEXEC-PARM" 01 REXX-PARAM-LENGTH PIC 9(4) VALUE 110. 01 MISCELLANEOUS. 05 REXX-RETURN-CODE PIC S9(8) BINARY. 05 FUNCTION PIC X(2). ~ 13

Exit-Programmierung EXIT7 Schnittstelle zum Aufruf einer compiled Rexx (Call aus Cobol) * initialize rexx values B001. IF PACT-SEQ-NBR-FOR-ENTRY = ZEROS MOVE ZEROS TO PECB-UEXIT-HOLD-FIELD. PERFORM A020-IRXEXEC-INIT. ~ 14

Exit-Programmierung EXIT7 Schnittstelle zum Aufruf einer compiled Rexx (Call aus Cobol) *-----------------------------------------* * initialize rexx parameters * A020-IRXEXEC-INIT SECTION. A020. MOVE SPACES TO IRXEXEC-PARM. MOVE 48 TO EXECBLK-LENGTH. MOVE 0 TO EXECBLK-RESERVED. * this is the loadlibrary where your rexx programm resides. * please allocate this library before you start Endevor * in your TSO session. MOVE "REXXLOAD" TO EXECBLK-DDNAME. MOVE " " TO EXECBLK-SUBCOM. MOVE "REXXEXT7" TO REXXPGM. MOVE REXXPGM TO EXECBLK-MEMBER. SET EXECBLK-DSNPTR TO NULL. MOVE 0 TO EXECBLK-DSNLEN. SET EXECBLK-PTR TO ADDRESS OF EXECBLK. MOVE REXX-PARAM-LENGTH TO ARGSTRING-LENGTH(1) MOVE -1 TO ARGSTRING-LAST1 SET ARGSTRING-PTR(1) TO ADDRESS OF IRXEXEC-PARM. SET ARGTABLE-PTR TO ADDRESS OF ARGUMENT. MOVE 0 TO EVALBLK-EVPAD1. * EVSIZE = see above in working-storage MOVE 34 TO EVALBLK-EVSIZE. MOVE 0 TO EVALBLK-EVLEN. MOVE 0 TO EVALBLK-EVPAD2. SET EVALBLK-PTR TO ADDRESS OF EVALBLK. MOVE LOW-VALUE TO FLAGS. MOVE X'E0' TO FBYTE5. MOVE 0 TO DUMMY-ZERO. Z020. EXIT. DD-Name muss allokiert sein. Inhalt: Die gerufene Rexx. Name der gerufenen Rexx (256+16)/8=34 ~ 15

Exit-Programmierung EXIT7 Schnittstelle zum Aufruf einer compiled Rexx (COMPILED Rexx !!) MOVE LOW-VALUE TO FLAGS. MOVE X'E0' TO FBYTE5. _* ************ IBM-Def ***************** _* BIT-FLAGS FüR IRXEXEC (4 Bytes, USES ONLY BIT0-3) _* (AB BIT4 = RESERVED) _* (siehe auch "TSO/E REXX REFERENCE", 12.17) _* _* ABER: mit 4 Bytes geht es nicht !!!!!!!!!!!!! :-(( * ************ My-DEF ****************** _* => Nur mit 5 Bytes ! _* Deshalb einfach X(5) und mit LOW-VALUE initialisiert. _* Die BIT0-3-Bestückung bezieht sich auf das HI-Byte _* des 5.Bytes. _* Beispiel: _* Byte 1 Byte 2 Byte 3 Byte 4 Byte 5 _* 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 _* darauf kommts an => ^^^^ _* Mögliche Werte des HI-BYTE5: _* X'10' / 0001 => failed X'20' / 0010 => failed _* X'30' / 0011 => failed X'40' / 0100 => failed _* X'50' / 0101 => failed X'60' / 0110 => failed _* X'70' / 0111 => failed X'80' / 1000 => ok _* X'90' / 1001 => ok X'A0' / 1010 => ok _* X'B0' / 1100 => ok X'C0' / 1011 => ok _* X'D0' / 1101 => ok X'E0' / 1110 => ok _* X'F0' / 1111 => ok ~ 16

Exit-Programmierung EXIT7 Schnittstelle zum Aufruf einer compiled Rexx (Call aus Cobol) *********************************************************** **** the following sections check the event of the ** **** calling Endevor ** C001. * check sth before Endevor creates the package IF CREATE-PACKAGE AND PECB-BEFORE PERFORM A100-do-something... GO TO Y001. D001. * check sth before Endevor executes the package IF EXECUTE-PACKAGE AND PERFORM A110-do-something... E001. * ... ~ 17

Exit-Programmierung EXIT7 Schnittstelle zum Aufruf einer compiled Rexx (Call aus Cobol) *-----------------------------------------* * your routines to check something with * * your rexx program. * A100-do-something... (here: check name convention of a PKGname) A100. MOVE "01" TO RX-FUNCTION . MOVE PECB-PACKAGE-ID TO RX-C1PKGID . MOVE "NONE" TO RX-C1PKGTY . MOVE "NONE" TO RX-C1ACTION . MOVE "NONE" TO RX-C1CCID . MOVE "NONE" TO RX-C1ENVMNT . MOVE "NONE" TO RX-C1SYSTEM . MOVE "NONE" TO RX-C1SUBSYS . MOVE "NONE" TO RX-C1ELEM . MOVE "NONE" TO RX-C1ELTYPE . MOVE "NONE" TO RX-C1STGID . MOVE "00000000" TO RX-C1USERID . MOVE PECB-MODE TO RX-MODE. B100. PERFORM A800-CALL-REXX. Z100. EXIT. ~ 18

Exit-Programmierung EXIT7 Schnittstelle zum Aufruf einer compiled Rexx (Call aus Cobol) *-----------------------------------------* * calling the rexx * A800-CALL-REXX SECTION. A800. MOVE "IRXEXECB" TO EXECBLK-ACRYN. MOVE "IRXEXEC " TO IRXEXEC-NAME. CALL IRXEXEC-NAME USING EXECBLK-PTR ARGTABLE-PTR FLAGS DUMMY-ZERO EVALBLK-PTR DUMMY-ZERO. MOVE REXX-RESULT TO REXX-RETURN-CODE. Z800. EXIT. Dynamischer CALL ~ 19

Exit-Programmierung EXIT7 Schnittstelle zum Aufruf einer compiled Rexx (Error-Handling/Standard) Y001. IF REXX-RETURN-CODE = ZEROES MOVE 0 TO PECB-NDVR-EXIT-RC GO TO Z001. IF REXX-RETURN-CODE = 20 MOVE "0020" TO PECB-MESSAGE-ID MOVE "ext-rexx failed " TO PECB-MESSAGE MOVE 17 TO PECB-ERROR-MESS-LENGTH SET PECB-ABORT-RC TO TRUE MOVE REXX-RETURN-CODE TO PECB-NDVR-HIGH-RC IF REXX-RETURN-CODE = 20021 MOVE "2021" TO PECB-MESSAGE-ID MOVE "parameter form COBOL to REXX wrong |" TO PECB-MESSAGE MOVE 42 TO PECB-ERROR-MESS-LENGTH IF REXX-RETURN-CODE > 19999 DISPLAY "RC>2000?="REXX-RETURN-CODE MOVE "2000" TO PECB-MESSAGE-ID MOVE "RC >=20000 | exit terminated || " ~ 20

Exit-Programmierung EXIT7 Schnittstelle zum Aufruf einer compiled Rexx (Error-Handling/eigene) ************************************************************ * all other error messages you set in the rexx * you can handle here... * ...your error handling... IF... MOVE 12 TO PECB-NDVR-HIGH-RC. SET PECB-ABORT-RC TO TRUE. MOVE 12 TO RETURN-CODE. Z001. GOBACK. ~ 21

Inhalt Allgemeine Endevor-Zahlen Endevor-Installation Agenda Allgemeine Endevor-Zahlen Endevor-Installation Exit-Programmierung die Sprache die Voraussetzungen technische Einzelheiten Cobol-Sourcecode Rexx-Sourcecode Rexx-Loadlibrary und Allokation C1UEXITS ~

Exit-Programmierung Parameterübergabe vom Cobol-Exit an die Rexx: ~ 01 IRXEXEC-PARM. 10 RX-FUNCTION PIC X(2). 10 FILLER PIC X(1). 10 RX-C1PKGID PIC X(16). 10 RX-C1PKGTY PIC X(10). 10 RX-C1ACTION PIC X(8). 10 RX-C1USERID PIC X(8). 10 RX-C1CCID PIC X(12). 10 RX-C1ENVMNT PIC X(8). 10 RX-C1STGID PIC X(1). 10 RX-C1SUBSYS PIC X(8). 10 RX-C1SYSTEM PIC X(8). 10 RX-C1ELTYPE PIC X(8). 10 RX-C1ELEM PIC X(8). 10 RX-MODE PIC X(1). /* REXX ***********************************/ PARSE ARG in_c1uext07_param IN_FUNKTION = word(in_c1uext07_param,1) IN_C1PKGID = word(in_c1uext07_param,2) IN_C1PKGTY = word(in_c1uext07_param,3) IN_C1ACTION = word(in_c1uext07_param,4) IN_C1USERID = word(in_c1uext07_param,5) IN_C1CCID = word(in_c1uext07_param,6) IN_C1ENVMNT = word(in_c1uext07_param,7) IN_C1STGID = word(in_c1uext07_param,8) IN_C1SUBSYS = word(in_c1uext07_param,9) IN_C1SYSTEM = word(in_c1uext07_param,10) IN_C1ELTYPE = word(in_c1uext07_param,11) IN_C1ELEM = word(in_c1uext07_param,12) /* Modus: T=TSO/Online + B=Batch */ IN_MODUS = word(in_c1uext07_param,13) ~

Exit-Programmierung Rexx-Funktion: ~ /* Hier die Exit-Logik/Funktionen verarbeiten... */ select when IN_FUNKTION = "01" then do if pos(substr(IN_C1PKGID,1,1),'ABCEFGHKMNPRSZ0123589') = 0 then say "Namenskonventionen !! - Paketart " !!, substr(IN_C1PKGID,1,1) !! " nicht erlaubt !" rc_exit = 703 end exit rc_exit ~ 24

Inhalt Allgemeine Endevor-Zahlen Endevor-Installation Agenda Allgemeine Endevor-Zahlen Endevor-Installation Exit-Programmierung die Sprache die Voraussetzungen technische Einzelheiten Cobol-Sourcecode Rexx-Sourcecode Rexx-Loadlibrary und Allokation C1UEXITS ~

Exit-Programmierung Rexx-Loadlibrary und Allokation: Voraussetzungen Rexx-Loadlibrary und Allokation: DD-Name „REXXLOAD“ muss im TSO und Batch verfügbar sein im TSO: z. B. in der Logon-Prozedur in Batch: „REXXLOAD DD DISP=SHR,DSN=Rexxloadlib….. “ ~ 26

Exit-Programmierung Am Schluss die C1UEXITS ändern: HLQ.LLQ.TABLES …umwandlung… HLQ.LLQ.AUTHLIB C1UEXITS TITLE 'DEFINE USER EXITS' *---------------------------------------------------------------------* * MULTIPLE USER EXIT SUPPORT * * * * TYPE=START DEFINITION MUST PROCEDE ANY EXIT DEFINITION STATEMENT. * C1UEXITS §C1UEXIT TYPE=START,XIT7BAT=YES * SEE USER EXITS MANUAL FOR A DESCRIPTION OF * * DEFINING MULTIPLE USER EXITS. * §C1UEXIT EXIT#=2,NAME=C1UEXT02,ANCHID=0,AUTH=YES §C1UEXIT EXIT#=7,NAME=C1UEXT07,ANCHID=0,AUTH=NO * TYPE=DEFINITION DENOTES THE END OF THE EXIT TABLE. * §C1UEXIT TYPE=END END Nummer, Name, Anchor, Auth [USE_ALTID=Y/N möglich] Package Exit7 kann in BATCH laufen ~ 27