COBOL (ACOB) InterfaceNRB DeclarationThe NRB (NETEX Request Block) is defined as a record in working storage. Usually it will be at the 01level, but this is not necessary.01 NRB02 NRBSTAT PIC 9(8) USAGE COMP02 NRBIND PIC 9(8) USAGE COMP02 NRBLEN PIC 9(8) USAGE COMP02 NRBUBIT PIC 9(8) USAGE COMP02 NRBREQ PIC 9(8) USAGE COMP02 NRBNREF PIC 9(8) USAGE COMP02 NRBBUFA PIC 9(8) USAGE COMP02 NRBBUFL PIC 9(8) USAGE COMP02 NRBDMODE PIC 9(8) USAGE COMP02 NRBTIME PIC 9(8) USAGE COMP02 NRBCLASS PIC 9(8) USAGE COMP02 NRBMAXRT PIC 9(8) USAGE COMP02 NRBBLKI PIC 9(8) USAGE COMP02 NRBBLKO PIC 9(8) USAGE COMP02 NRBPROTA PIC 9(8) USAGE COMP02 NRBPROTL PIC 9(8) USAGE COMP02 NRBRESVI PIC 9(8) USAGE COMP02 NRBRESV2 PIC 9(8) USAGE COMP02 NRBPNAME PIC X(8)02 NRBHNAME PIC X(8)02 NRBRESV3 PIC X(8) USAGE COMP02 NRBUSER PIC 9(8) USAGE COMP02 NRBOSDEP PIC 9(8) USAGE COMP OCCURS 16 TIMESPage 64 COBOL (ACOB) Interface MAN-REF-H307IP-04
NETEX <strong>Call</strong>ing SequenceIn order to communicate between independently compiled modules, ASCII COBOL supports the CALL andthe ENTER verb. Only the use of ENTER is supported in the NETEX interface. The use of this is outlinedbelow, and the format of each of the calls is indicated. All variables are full word integers except for thoselisted below.NRB This has the record format discussed abovePNAME This is an eight (8) character ASCII string. This is an application name used in an offer orconnect call.HNAME This is an eight (8) character ASCII string. This is a host name used in a connect call.The figure below shows an example of the format for the NETEX calls in the COBOL program. To get the‘wait’ type requests, append a ‘W’ at the end of each literal. For example, use COFFRW instead of COFFR.Note the use of CWRIT, etc., in the COBOL, interface instead of SWRIT, as referenced in this document.This is necessary to keep the FTN and COBOL, entry points separate, since both are used. A reference toCWRIT is accomplished by restructuring the FCOBOL argument list into a FTN argument list and then invokingthe SWRIT entry point.ENTER MASM 'COFFR' USING NRB, BUFFER, LENGTH, TIMEOU, PNAMEENTER MASM 'CCONN' USING NRB, BUFFER, LENGTH, DATAMODE, PNAME, HNAMEENTER MASM 'CCONF' USING NRB, BUFFER, LENGTH, DATAMDENTER MASM 'CWRIT' USING NRB, BUFFER, LENGTH, DATAMDENTER MASM 'CREAD' USING NRB, BUFFER, LENGTH, TIMEOUTENTER MASM 'CCLOS' USING NRB, BUFFER, LENGTH, DATAMODEENTER MASM 'CDISC' USING NRB, BUFFER, LENGTH, DATAMODEENTER MASM 'CWAIT' USING NRBCOUNT, NRB1, NRB2,… (UP TO 7)Figure 13. NETEX <strong>Call</strong> Sequence FormatMap RequirementsYou must include the relocatable NXICOB and N2XFTN to access H307 from an ACOB program.MAN-REF-H307IP-04 COBOL (ACOB) Interface Page 65