|
Hello. I'm an MI newbie and having a problem using the OPEN instruction (v5r2). Here is a simple code, for example: DCL DD RESOLVE CHAR(34); DCL DD RESOLVE-TYPE CHAR( 2) DEF(RESOLVE) POS( 1); DCL DD RESOLVE-NAME CHAR(30) DEF(RESOLVE) POS( 3); DCL DD RESOLVE-AUTH CHAR( 2) DEF(RESOLVE) POS(33) INIT(X'0000'); DCL SYSPTR .SEPT(6440) BAS(SEPT-POINTER); DCL SPC PROCESS-COMMUNICATION-OBJECT BASPCO; DCL SPCPTR SEPT-POINTER DIR; DCL DD INBUF CHAR(35) BAS(.OFCB-INBUF); DCL DD OUTBUF CHAR(35) BAS(.OFCB-OUTBUF); DCL SPCPTR .NULL; ENTRY * EXT; CPYBLA RESOLVE-TYPE, X'0201'; CPYBLAP RESOLVE-NAME, "SCRNIO", " "; RSLVSP .SCRNIO, RESOLVE, *, *; CPYBLA CTRL-OPCODE, "OPEN"; CALLX .SCRNIO, SCRNIO, *; /********************************************************************/ CPYBLAP OFCB-FILE, "SOMEPF"," "; CPYBLAP OFCB-LIBRARY, "*LIBL"," "; CPYBLAP OFCB-MEMBER, "*FIRST"," "; CPYNV OFCB-RECORD-LENGTH,35; CALLX .SEPT(OPEN-ENTRY), OPEN-O, *; BRK "1"; CALLX .SEPT(CLOSE-ENTRY), OPEN-O, *; CPYBLA CTRL-OPCODE, "CLOSE"; CALLX .SCRNIO, SCRNIO, *; /********************************************************************/ DCL SPCPTR .SCREEN INIT(SCREEN); DCL DD SCREEN CHAR(10) INIT("T010270005"); DCL DD S-TITLE CHAR( 5) INIT ("Title"); DCL DD * CHAR(10) INIT("L010520000"); DCL SPCPTR .SCRN-CTRL INIT(SCRN-CTRL); DCL DD SCRN-CTRL CHAR(8); DCL DD CTRL-OPCODE CHAR(1) DEF(SCRN-CTRL) POS(1); DCL DD CTRL-CMD-KEY ZND(2,0) DEF(SCRN-CTRL) POS(2); DCL DD CTRL-CURSOR-POSITION CHAR(5) DEF(SCRN-CTRL) POS(4); DCL DD CTRL-CURSOR-ROW ZND(2,0) DEF(CTRL-CURSOR-POSITION) POS(1); DCL DD CTRL-CURSOR-COL ZND(3,0) DEF(CTRL-CURSOR-POSITION) POS(3); DCL SYSPTR .SCRNIO; DCL OL SCRNIO (.SCRN-CTRL, .SCREEN); DCL CON OPEN-ENTRY BIN(2) INIT(12); DCL CON CLOSE-ENTRY BIN(2) INIT(11); DCL SPCPTR .OFCB INIT(OFCB); DCL DD OFCB CHAR(217) BDRY(16); DCL SPCPTR .OFCB-ODP DEF(OFCB) POS( 1); DCL SPCPTR .OFCB-INBUF DEF(OFCB) POS( 17); DCL SPCPTR .OFCB-OUTBUF DEF(OFCB) POS( 33); DCL DD OFCB-FILE CHAR(10) DEF(OFCB) POS(129); DCL DD OFCB-LIB-ID BIN(2) DEF(OFCB) POS(139) INIT(72); DCL DD OFCB-LIBRARY CHAR(10) DEF(OFCB) POS(141); DCL DD OFCB-MBR-ID BIN(2) DEF(OFCB) POS(151) INIT(73); DCL DD OFCB-MEMBER CHAR(10) DEF(OFCB) POS(153); DCL DD OFCB-FLAGS-1 CHAR(1) DEF(OFCB) POS(175) INIT(X'80'); DCL DD OFCB-FLAGS-2 CHAR(1) DEF(OFCB) POS(176) INIT(X'3C'); DCL DD OFCB-RECORD-ID BIN(2) DEF(OFCB) POS(209) INIT(1); DCL DD OFCB-RECORD-LENGTH BIN(2) DEF(OFCB) POS(211); DCL DD OFCB-LEVEL-ID BIN(2) DEF(OFCB) POS(213) INIT(6); DCL DD OFCB-LEVEL-NO CHAR(1) DEF(OFCB) POS(215) INIT(X'00'); DCL DD OFCB-NO-MORE-PARMS BIN(2) DEF(OFCB) POS(216) INIT(32767); DCL OL OPEN-O(.OFCB); DCL OL CLOSE-O(.OFCB); PEND; The SCRNIO programm is straight from Leif's MI examples. When I call my program from a command line straight after SIGNON I get no errors, but sometimes I get (especially when i call other programs before): Message ID . . . . . . : CPF411D Parameter integrity error occurred with reason code 1. 1 -- A pointer was used that is not available for use while running in the current program state. And sometimes: Parameter integrity error occurred with reason code 3. 3 -- A pointer type was not valid for the requested operation. The instruction is CALLX .SEPT(OPEN-ENTRY), OPEN-O, *; I'm missing something simple here...but just can't see it... Any help would be appreciated :)
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.