hostemu.h
Go to the documentation of this file.
1 /*----------------------------------------------------------------------------*/
2 /* */
3 /* Copyright (c) 2009-2010 Rexx Language Association. All rights reserved. */
4 /* */
5 /* This program and the accompanying materials are made available under */
6 /* the terms of the Common Public License v1.0 which accompanies this */
7 /* distribution. A copy is also available at the following address: */
8 /* https://www.oorexx.org/license.html */
9 /* */
10 /* Redistribution and use in source and binary forms, with or */
11 /* without modification, are permitted provided that the following */
12 /* conditions are met: */
13 /* */
14 /* Redistributions of source code must retain the above copyright */
15 /* notice, this list of conditions and the following disclaimer. */
16 /* Redistributions in binary form must reproduce the above copyright */
17 /* notice, this list of conditions and the following disclaimer in */
18 /* the documentation and/or other materials provided with the distribution. */
19 /* */
20 /* Neither the name of Rexx Language Association nor the names */
21 /* of its contributors may be used to endorse or promote products */
22 /* derived from this software without specific prior written permission. */
23 /* */
24 /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */
25 /* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */
26 /* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS */
27 /* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */
28 /* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */
29 /* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */
30 /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, */
31 /* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY */
32 /* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING */
33 /* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS */
34 /* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
35 /* */
36 /* Authors; */
37 /* W. David Ashley <dashley@us.ibm.com> */
38 /* */
39 /*----------------------------------------------------------------------------*/
40 
41 
42 #ifndef HOSTEMU_INCLUDED
43 #define HOSTEMU_INCLUDED
44 
45 
46 /*--------------------------------------------------------------------*/
47 /* */
48 /* Prototype definitions for external functions */
49 /* */
50 /*--------------------------------------------------------------------*/
51 
52 int yyparse (
53  void); /* no arguments */
55  unsigned short int *flags,
56  PRXSTRING retc);
57 
58 
59 /*--------------------------------------------------------------------*/
60 /* */
61 /* Global definitions */
62 /* */
63 /*--------------------------------------------------------------------*/
64 
65 // Use the following to get debug messages to stdout
66 // #define HOSTEMU_DEBUG
67 
68 /* https://www.ibm.com/support/knowledgecenter/SSB27U_6.2.0/com.ibm.zvm.v620.dmsb4/excio.htm
69 0 Finished correctly
70 1 Truncated
71 2 EOF before specified number of lines were read
72 3 Count ran out without successful pattern match
73 24 Bad PLIST
74 31 Error caused a rollback of a shared file(s)
75 41 Insufficient free storage to load EXECIO
76 55 APPC/VM communication error
77 70 SFS sharing conflict
78 76 SFS authorization error
79 99 Insufficient virtual storage for file pool repository
80 1nn 100 + return code from I/O operation (if nonzero)
81 2008 Variable name supplied on STEM or VAR option was not valid
82 nnnn 2000 + return code from EXECCOMM command (if nonzero)
83 x1nnn 1000 + return code from CP command (if nonzero), where x is 0, 1, 2, or 3
84 1xnnnn 100000 + return code from CP command (if nonzero), where x is 0, 1, 2, or 3
85 */
86 #define ERR_EXECIO_EOF 2
87 #define ERR_EXECIO_BAD_PLIST 24
88 #define ERR_EXECIO_NO_STORAGE 41
89 #define ERR_EXECIO_VAR_INVALID 2008
90 
91 #define SYMTABLESIZE 15
92 #define EXECIO_STMT 0
93 #define HI_STMT 1
94 #define TE_STMT 2
95 #define TS_STMT 3
96 typedef struct _EXECIO_OPTIONS
97  {
98  long lRcdCnt; /* # of records to be processed */
99  bool fRW; /* DISKR or DISKW */
100  char aFilename [1024]; /* ddname (filename) */
101  char aStem [251]; /* stem variable name */
102  bool fFinis; /* FINIS option */
103  long lStartRcd; /* start record number */
104  long lDirection; /* FIFO, LIFO or SKIP option */
106 
107 
108 /*--------------------------------------------------------------------*/
109 /* */
110 /* Extern definitions */
111 /* */
112 /*--------------------------------------------------------------------*/
113 
114 extern const char * szVersion;
115 extern const char * szDate;
117 extern PCONSTRXSTRING prxCmd;
118 extern long lCmdPtr;
119 extern unsigned long ulNumSym;
120 extern char * pszSymbol [SYMTABLESIZE];
121 extern long lStmtType;
122 
123 #endif /* HOSTEMU_INCLUDED */
const char * szDate
RexxReturnCode RexxEntry GrxHost(PCONSTRXSTRING command, unsigned short int *flags, PRXSTRING retc)
long lStmtType
char * pszSymbol[SYMTABLESIZE]
long lCmdPtr
int yyparse(void)
Definition: cmdparse.cpp:1203
const char * szVersion
unsigned long ulNumSym
#define SYMTABLESIZE
Definition: hostemu.h:91
struct _EXECIO_OPTIONS EXECIO_OPTIONS
EXECIO_OPTIONS ExecIO_Options
PCONSTRXSTRING prxCmd
CONSTANT_RXSTRING * PCONSTRXSTRING
Definition: rexx.h:186
int RexxReturnCode
Definition: rexx.h:73
#define RexxEntry
Definition: rexx.h:235
long lStartRcd
Definition: hostemu.h:103
char aFilename[1024]
Definition: hostemu.h:100
long lRcdCnt
Definition: hostemu.h:98
char aStem[251]
Definition: hostemu.h:101
long lDirection
Definition: hostemu.h:104