📄 pim3270.h
字号:
/************************************************************************
NAME: pim3270.h - RabbitPLUS 3270 PIM header file
VERSION: @(#)pim3270.h 2.14
DESCRIPTION: Contains defines and data structures required by
programs which use the RabbitPLUS 3270 Programmer
Interface Modules (PIM) programming interface.
NOTES: Any data structure fields commented as "flags" expect
a value of zero for FALSE, non-zero for TRUE.
References to the "DH" in comments refer to the
RabbitPLUS 3270 Device Handler component, which PIM
provides an interface to.
Copyright 1985-1992 by Rabbit Software Corporation
************************************************************************/
#ifndef _PIM3270_H_
#define _PIM3270_H_
/*
Include "rabbit.h" to obtain various port-specific types and constants.
*/
#include "rabbit.h"
#include "rabbit_ids.h"
#include "ipc_glue.h"
#include "rlang.h"
#include "gate_ext.h"
/* The following signal is the one used by default for old PIM applications
which did not have the capability of setting up events. This value should
be used in place of the signal value passed in the old main argv argument.
*/
#define DEF_PIMSIG 5 /* default (old) PIM signal */
#define UNDEF_CURS -1 /* cursor field initializer */
/* defines for sizes of PIM structure device identification fields:
*/
typedef char PU_NAME[sPUNAME+1]; /* logical device name type */
#ifndef sLOGDEVNAM
#define sLOGDEVNAM 10 /* size of logical device name */
#endif
typedef char LOG_DEV_NAME[sLOGDEVNAM+1];/* logical device name type */
#define sSHORTNAME 1 /* size of short name */
typedef char SHORT_NAME[sSHORTNAME+1]; /* short name type */
/* The following define is used to initialize the psAddr field of the PIM
Control Block when an LU address is not associated with the session.
*/
#ifndef NULLADDR
#define NULLADDR -1 /* NULL LU address specifier */
#endif
#ifndef NO_INDEX
#define NO_INDEX -1 /* index initializer */
#endif
#define NO_OFFSET FAIL /* invalid screen offset value */
/* device ID/session ID/session descriptor initializers: */
#define NULLDEVID -1 /* NULL device ID initializer */
#define NULLSESID -1 /* NULL session ID initializer */
#define NOSESDESC -1 /* session descriptor init. */
/* Argument to use for session descriptor on PIMCheck() calls: */
#define ALL_SESSIONS -1 /* "all sessions" specifier */
/* defines for special 3270 characters (ASCII representation): */
/* NOTE: to support multiple languages, these should not be referenced
directly. Instead they should be dereferenced through the
session's EtoA base ASCII table. PIM does this internally.
*/
#define NUL_CH_3270 0x00 /* 3270 NUL character value */
#define SP_CH_3270 0x20 /* 3270 SPACE character value */
#define N_WHITESPACE_3270 2 /* # of whitespace characters */
#define DUP_CHAR 0x1c /* value of DUP key character */
#define FM_CHAR 0x1e /* value of FM key character */
#define SELECT_CH_3270 '>' /* (ASCII) 3270 select char. */
#define UNSELECT_CH_3270 '?' /* (ASCII) 3270 unselect char. */
#define SELENTER_CH_3270 '&' /* (ASCII) select & ENTER char. */
/* 3270 whitespace holder. Used for various string functions. */
typedef byte WhiteSpace3270[N_WHITESPACE_3270];
typedef unsigned long DISP_MODE; /* display mode type */
typedef struct pim_init /* PIM initialization params. */
{
int (*piErrFunc)(); /* asynchronous error function */
} PIM_INIT;
typedef struct pim_query /* PIM query return structure */
{
flag pqInitFlag; /* initialized flag */
int pqNumSes; /* number of sessions allocated */
unsigned long pqTraceFlags; /* current trace flags */
} PIM_QUERY;
/* Field table entry data structure. Each session is allocated a given
number of fields (configurable via the 3270 profile). The PIM control
block indicates the current number of fields for the current screen
image, and contains a pointer to the associated field table, which is
an array of that many field data structures as defined below. This
allows attributes to be intermixed with 8-bit data characters. Note
that the actual 3270 attribute character is still also found in the
screen image at the indicated position with its high bit set as before
so existing 7-bit data PIM applications don't break.
*/
typedef struct field_table /* field table entry definition */
{
byte fldAttr; /* field attribute byte */
byte fldRow; /* field row position */
byte fldCol; /* field column position */
byte fldStat; /* status bits for the field */
short fldOffset; /* offset of field in buffer */
short fldLen; /* length of field (data only) */
} FLDS_3270;
/* bit setting values for the fldStat field above: */
#define fldATTRBYTE 0x01 /* is there an attribute byte? */
#define fldHOSTMOD 0x02 /* set if field's host modified */
#define fldAPIMOD 0x04 /* set if field's API modified */
#define fldAPPLMOD 0x08 /* set if field's locally mod. */
#define fldMODATTR 0x10 /* set if attr. new or changed */
#define fldMODDATA 0x20 /* set if new/changed data */
#define fldCHARATTR 0x40 /* set if field has char. atrs. */
#define fldSAMECHAR 0x80 /* set if field is all 1 char. */
/* Structure used for devices capable of receiving status information
about other devices from the Device Handler.
*/
typedef struct dev_status
{
PU_NAME stPUname; /* name of PU used */
short stAddr; /* LU address of device */
LOG_DEV_NAME stDevName; /* logical device name */
SHORT_NAME stShortName; /* short name */
short stDevID; /* (internal) device ID */
char stActive; /* device active flag */
int stStat; /* device (power) state */
byte stSuspResm; /* suspend/resume state */
byte stType; /* emulated device type */
int stUserID; /* user ID of device owner */
DevPath stDevPath; /* path name of physical device */
flag stOpen; /* open (connected to DH) flag */
PID stProcID; /* process ID of session */
word stWSCtrl; /* Workstation Control settings */
short stCommErr; /* Communications Error */
short stProgErr; /* Program Error */
short stMachErr; /* Machine Error */
char stOwner; /* owner of session */
} SPStatus;
typedef struct ft_defaults /* File Transfer default values */
{
short ftdHostOS; /* default host O/S environment */
short ftdMaxRetries; /* default maximum retries */
long ftdTimeOut; /* default time out value */
short ftdPacketsize; /* default (DFT) packet size */
word ftdTransMode; /* default transfer modes */
word ftdHostTrans; /* host default transfer modes */
} FT_DEFAULTS;
#define ftMAXSTRLEN 16 /* maximum FT string length */
typedef struct ft_strings /* File Transfer string values */
{ /* pointer to... */
byte *ftsHostGet; /* host get cmd. (IND$FILE GET) */
byte *ftsHostPut; /* host put cmd. (IND$FILE PUT) */
byte ftsLocRecv[ftMAXSTRLEN+1]; /* local receive cmd. (receive) */
byte ftsLocSend[ftMAXSTRLEN+1]; /* local send command (send) */
byte ftsMsgPrefix[ftMAXSTRLEN+1]; /* host message prefix (TRANS) */
byte *ftsNewLine; /* newline option (nl) */
byte *ftsNoNL; /* no newline option (nonl) */
byte *ftsCR_LF; /* carriage ret. ln. fd. (crlf) */
byte *ftsNoCR_LF; /* no CR/LF option (nocrlf) */
byte *ftsAppend; /* file append option (append) */
byte *ftsNoAppend; /* no append option (overwrite) */
byte *ftsAscii; /* file is ASCII opion (ascii) */
byte *ftsBinary; /* file is binary opt. (binary) */
byte *ftsTSO; /* host O/S is TSO option (tso) */
byte *ftsVMCMS; /* host O/S is VM/CMS (vm/cms) */
byte *ftsCICS; /* host O/S is CICS (cics) */
byte *ftsTimeOut; /* time out option (time) */
byte *ftsPktSize; /* packet size option (pktsize) */
byte *ftsRetries; /* max. retries option (retries)*/
byte *ftsLRecl; /* record length (lrecl) */
byte *ftsRecFm; /* record format (recfm) */
byte *ftsBlkSize; /* (TSO) block size (blksize) */
byte *ftsSpace; /* (TSO) space option (space) */
byte *ftsAvBlock; /* (TSO) average blk. (avblock) */
byte *ftsTracks; /* (TSO) tracks (tracks) */
byte *ftsCylinders; /* (TSO) cylinders (cylinders) */
byte *ftsClear; /* clear screen for command */
byte *ftsNoClear; /* don't clear screen */
byte *ftsText; /* text (translate) option */
byte *ftsNoText; /* no text (translate) option */
byte ftsOSFileSep; /* host O/S file name separator */
byte ftsOptIntro; /* options introducer character */
byte ftsOptDelim; /* options delimiter character */
byte ftsSubOptSep; /* sub-options separator */
byte ftsMsgDelim; /* message buffer delimiter */
byte ftsTsoPasswordSep; /* TSO password separator char. */
byte ftsFixedRecFm; /* fixed record format char. */
byte ftsVarRecFm; /* variable record format char. */
byte ftsUndefRecFm; /* undefined record format char.*/
} FT_STRINGS;
typedef struct /* regular expression validate */
{
byte vreFlags; /* validation flags */
byte *vreExpression; /* expression to be checked */
}
FTV_REGEX;
typedef struct /* regular expression validate */
{
byte vnFlags; /* validation flags */
unsigned long vnMin; /* minimum value */
unsigned long vnMax; /* maximum value */
} FTV_NUM;
/* definitions for file transfer validation flags: */
#define ftvNULL 0x00 /* no flags set (initializer) */
#define ftvENABLE 0x01 /* validation enabled */
#define ftvMAX_CHECK 0x02 /* check maximum value */
#define ftvMIN_CHECK 0x04 /* check minimum value */
typedef struct /* file transfer validations */
{
FTV_REGEX ftvTSOFile; /* TSO file name validation */
FTV_REGEX ftvCMSFile; /* VM/CMS file name validation */
FTV_REGEX ftvCICSFile; /* CICS file name validation */
FTV_NUM ftvTSOLRecl; /* TSO record length */
FTV_NUM ftvCMSLRecl; /* VM/CMS record length */
FTV_REGEX ftvTSORecFm; /* TSO record format */
FTV_REGEX ftvCMSRecFm; /* VM/CMS record format */
FTV_NUM ftvBlkSize; /* (TSO) block size */
FTV_NUM ftvAvBlock; /* (TSO) average block size */
FTV_NUM ftvSpQuantity; /* (TSO) SPACE quantity */
FTV_NUM ftvSpIncrement; /* (TSO) SPACE increment */
FTV_REGEX ftvSpUnits; /* (TSO) SPACE units */
} FT_VALIDATE;
typedef struct /* screen expression structure */
{
byte *se_expression; /* pointer to expression */
short se_srow; /* starting row */
short se_scol; /* starting column */
short se_erow; /* ending row */
short se_ecol; /* ending column */
} SCREEN_EXP;
typedef unsigned long FT_TOKFLAGS; /* FT token flags type */
typedef struct ft_cb /* File Transfer Control Block */
{
PathName ftcName; /* local file name */
byte ftcCommand; /* command (e.g., ftcOPEN) */
short ftcReturnCode; /* return code */
short ftcError; /* error value */
long ftcBlockNumber; /* block number */
flag ftcEof; /* End-Of-File flag */
short ftcHostOS; /* host Operating Environment */
short ftcMaxRetries; /* maximum number of retries */
long ftcTimeOut; /* time out value */
long ftcByteCount; /* number of bytes transferred */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -