1 thilo.boehm 1.5 */%LICENSE/////////////////////////////////////////////////////////////
2 */
3 */ Licensed to The Open Group (TOG) under one or more contributor
4 */ license agreements. Refer to the OpenPegasusNOTICE.txt file
5 */ distributed with this work for additional information regarding
6 */ copyright ownership.
7 */ Each contributor licenses this file to you under the OpenPegasus
8 */ Open Source License; you may not use this file except in compliance
9 */ with the License.
10 */
11 */ Permission is hereby granted, free of charge, to any person
12 */ obtaining a copy of this software and associated documentation files
13 */ (the "Software"), to deal in the Software without restriction,
14 */ including without limitation the rights to use, copy, modify, merge,
15 */ publish, distribute, sublicense, and/or sell copies of the Software,
16 */ and to permit persons to whom the Software is furnished to do so,
17 */ subject to the following conditions:
18 */
19 */ The above copyright notice and this permission notice shall be
20 */ included in all copies or substantial portions of the Software.
21 */
22 thilo.boehm 1.5 */ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
23 */ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
24 */ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
25 */ NONINFRINGEMENT.
26 */ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
27 */ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
28 */ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
29 */ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
30 */
31 *//////////////////////////////////////////////////////////////////////
|
32 r.kieninger 1.1
33 ********************************************************************
34 * REGARM - register with ARM
35 *
36 * Function: The elment name and type are hard coded.
37 * TERMTYPE=ELEMTERM is used for only app ABENDS.
38 * All other input parameters are left at their defaults:
39 * ELEMTYPE=NO_ELEMTYPE
40 * EVENTEXIT=NO_EVENTEXIT
41 * EVENTEXITPL=NO_EVENTEXITPL
42 * PLISTVER=IMPLIED_VERSION
43 * RESTARTTIMEOUT=NORM
44 * STARTTXT=NO_STARTTXT
45 *
46 * USAGE FROM C:
47 * void register_arm (char * elemname,
48 * char * elemtype,
49 * /* must point to a local buffer which has a length */
50 * /* of least 128 bytes */
51 * char * buffer,
52 * int * retcode,
53 r.kieninger 1.1 * int * reasoncode)
54 *
55 ********************************************************************
56 REGARM CSECT
57 REGARM AMODE 64
58 REGARM RMODE 31 MUST RESIDE in 31-BIT MEMORY
59 *
60 EDCPRLG +
61 BASEREG=3, +
62 USRDSAL=AUTOSPACE1
63 *
64 *
65 USING AUTOSPACE,13
66 * make C-auto-storage accessable using DSECT and register 13
67 L R4,0(0,R1) get element name address into R4
68 L R7,4(0,R1) GET buffer PTR into R7
69 L R5,8(0,R1) GET pointer to retcode variable
70 L R6,12(0,R1) GET pointer to reascode variable
71 MVC 0(IXC1FL,R7),IXC1ST COPY TEMPLATE LIST FORM MACRO
72 *
73 IXCARM REQUEST=REGISTER,ELEMENT=(R4), +
74 r.kieninger 1.1 ELEMTYPE=NO_ELEMTYPE, +
75 TERMTYPE=ELEMTERM, +
76 RETCODE=0(0,R5), +
77 RSNCODE=0(0,R6), +
78 MF=(E,(R7))
79 EDCEPIL
80 *
81 *
82 * use the LIST from of the IXCARM macro to generate a parameter
83 * block here
84 AUTOSPACE EDCDSAD
85 IXC1ST IXCARM MF=(L,IXCARML)
86 IXC1FE DS 0H
87 IXC1FL EQU IXC1FE-IXC1ST
88 AUTOSPACE1 EQU *-AUTOSPACE
89 *
90 ********************************************************************
91 * READYARM - set element to READY state with ARM
92 *
93 * USAGE FROM C:
94 * void ready_arm (
95 r.kieninger 1.1 * /* must point to a local buffer which has a length */
96 * /* of least 128 bytes */
97 * char * buffer,
98 * int * retcode, int * reasoncode)
99 *
100 ********************************************************************
101 READYARM CSECT
102 READYARM AMODE 31
103 READYARM RMODE ANY
104 *
105 EDCPRLG +
106 BASEREG=3, +
107 USRDSAL=AUTOSPACE2
108 *
109 *
110 USING AUTOSPACE,13
111 * make C-auto-storage accessable using DSECT and register 13
112 L R7,0(0,R1) GET buffer PTR into R7
113 L R5,4(0,R1) GET pointer to retcode variable
114 L R6,8(0,R1) GET pointer to reascode variable
115 MVC 0(IXC2FL,R7),IXC2ST COPY TEMPLATE LIST FORM MACRO
116 r.kieninger 1.1 *
117 IXCARM REQUEST=READY, +
118 RETCODE=0(0,R5), +
119 RSNCODE=0(0,R6), +
120 MF=(E,(R7))
121 *
122 *
123 EDCEPIL
124 *
125 *
126 AUTOSPACE EDCDSAD
127 IXC2ST IXCARM MF=(L,IXCARM2)
128 IXC2FE DS 0H
129 IXC2FL EQU IXC2FE-IXC2ST
130 AUTOSPACE2 EQU *-AUTOSPACE
131 *
132 ********************************************************************
133 * DEREGARM - deregister element from ARM
134 * should be called at program termination
135 * USAGE FROM C:
136 * void deregister_arm (
137 r.kieninger 1.1 * /* must point to a local buffer which has a length */
138 * /* of least 128 bytes */
139 * char * buffer,
140 * int * retcode, int * reasoncode)
141 *
142 ********************************************************************
143 DEREGARM CSECT
144 DEREGARM AMODE 31
145 DEREGARM RMODE ANY
146 *
147 EDCPRLG +
148 BASEREG=3, +
149 USRDSAL=AUTOSPACE3
150 *
151 *
152 USING AUTOSPACE,13
153 * make C-auto-storage accessable using DSECT and register 13
154 L R7,0(0,R1) GET buffer PTR into R7
155 L R5,4(0,R1) GET pointer to retcode variable
156 L R6,8(0,R1) GET pointer to reascode variable
157 MVC 0(IXC3FL,R7),IXC3ST COPY TEMPLATE LIST FORM MACRO
158 r.kieninger 1.1 *
159 IXCARM REQUEST=DEREGISTER, +
160 RETCODE=0(0,R5), +
161 RSNCODE=0(0,R6), +
162 MF=(E,(R7))
163 *
164 EDCEPIL
165 *
166 *
167 AUTOSPACE EDCDSAD
168 IXC3ST IXCARM MF=(L,IXCARM3)
169 IXC3FE DS 0H
170 IXC3FL EQU IXC3FE-IXC3ST
171 AUTOSPACE3 EQU *-AUTOSPACE
172 *
173 *
174 R0 EQU 0
175 R1 EQU 1
176 R2 EQU 2
177 R3 EQU 3
178 R4 EQU 4
179 r.kieninger 1.1 R5 EQU 5
180 R6 EQU 6
181 R7 EQU 7
182 R8 EQU 8
183 R9 EQU 9
184 R10 EQU 10
185 R11 EQU 11
186 R12 EQU 12
187 R13 EQU 13
188 R14 EQU 14
189 R15 EQU 15
190 *
|