× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



what stmt is instruction x'0016' ?  is it the CRTS  instruction?

can you post the compile listing?

-Steve Richter

-----Original Message-----
From: David Colford <dcolford@pathix.com>
To: mi400@midrange.com <mi400@midrange.com>
Date: Wednesday, August 15, 2001 12:57 PM
Subject: [MI400] Help !! Old (and I mean Old) MI Code compiles but won't run


>Hi
>
>Here's the situation......
>
>I have a piece of old MI vendor code (see below)
>
>Thing to note about this are
>1. It has no semicolons (I had to add them)
>2. When I add the semicolons (as I have donw with other MI code and it
>works ) it compiles but doesn't run I get MCH0601
>
>     Space offset X'4040A24F' or teraspace offset X'0000000000000000' is
>      outside current limit for object PATHIX16S2DCOLFORD  283123.
>
>     Function check. MCH0601 unmonitored by MDOC at statement *N,
>instruction
>     X'0016'.
>
>3. This program is called via a link to a special file and is used to put
>records on a screen. It was working until we hit 1700 lines of help text.
>My intent here is just toi increase the size of 1700 to say 5000 and leave
>it for another 10 years
>4. The original compiler for this is the 'PUMPKIN   V1R1M0' version... Is
>this the problem? Anyone have a copy of this
>
>Can anyone see anything wrong here ?? Do you need more info
>
>Thanks in advance
>Dave
>
>
>
>
>
>/*********************************************************************/
>/*  HELP TEXT EDITOR WORK SPACE HANDLER                              */
>/*********************************************************************/
>
>ENTRY      *(EXTPARM)   EXT;
>DCL SPCPTR XRQS-SPP     PARM;
>DCL SPCPTR XSTS-SPP     PARM;
>DCL SPCPTR XERRCODE-SPP PARM;
>DCL SPCPTR XIOAREA-SPP  PARM;
>DCL SPCPTR XCTL-SPP     PARM;
>DCL SPCPTR XFIRST-SPP   PARM;
>DCL SPCPTR XCURRENT-SPP PARM;
>DCL SPCPTR XSPCNAME-SPP PARM;
>DCL SPCPTR XEOF-SPP     PARM;
>DCL OL     EXTPARM(XRQS-SPP,XSTS-SPP,XERRCODE-SPP,XIOAREA-SPP,
>                   XCTL-SPP,XFIRST-SPP,XCURRENT-SPP,XSPCNAME-SPP,
>                   XEOF-SPP) PARM EXT;
>DCL DD     XRQS         CHAR(1)   BAS(XRQS-SPP);
>DCL DD     XSTS         CHAR(1)   BAS(XSTS-SPP);
>DCL DD     XERRCODE     ZND(5,0)  BAS(XERRCODE-SPP);
>DCL DD     XIOAREA      CHAR(67)  BAS(XIOAREA-SPP);
>DCL DD     XCTL         CHAR(1)   BAS(XCTL-SPP);
>DCL DD     XFIRST       PKD(15,0) BAS(XFIRST-SPP);
>DCL DD     XCURRENT     PKD(15,0) BAS(XCURRENT-SPP);
>DCL DD     XSPCNAME     CHAR(30)  BAS(XSPCNAME-SPP);
>DCL DD     XEOF         CHAR(1)   BAS(XEOF-SPP);
>
>/********************************************************************/
>/*  START                                                           */
>/********************************************************************/
>
>           CMPBLA(B)    XRQS,'O'/EQ(OPEN);
>           CMPBLA(B)    XRQS,'C'/EQ(CLOSE);
>           CMPBLA(B)    XRQS,'R'/EQ(READ);
>           CMPBLA(B)    XRQS,'W'/EQ(WRITE);
>
>           CPYBLA       XSTS,'2';
>           CPYNV        XERRCODE,90001;/* INVALID REQUEST */
>           RTX          *;
>
>/********************************************************************/
>/*  OPEN FILE: RESOLVE WROK SPACE (CREATE IF NOT EXIST)             */
>/********************************************************************/
>
>DCL EXCM   EXCM1        EXCID(H'2201') BP(CRTSPACE) SKP;
>
>OPEN:
>           CMPBLA(B)    XCTL,' '/NEQ(OPENEND);
>
>           RSLVSP       CTX-SYP,CTX-ID,*,X'FF00';
>           CPYBLA       WRKSPC-NAME,XSPCNAME;
>           MODEXCPD     EXCM1,*ENABLE,X'01';
>           RSLVSP       WRKSPC-SYP,WRKSPC-ID,CTX-SYP,X'FF00';
>           MODEXCPD     EXCM1,*DISABLE,X'01';
>           SETSPPFP     WRKSPC-SPP,WRKSPC-SYP;
>           CPYNV        XFIRST,WRKSPC-FIRST;
>           CPYNV        XCURRENT,0;
>           CPYBLA       XSTS,'0';
>           CPYNV        XERRCODE,0;
>OPENEND:   RTX          *;
>CRTSPACE:
>           MODEXCPD     EXCM1,*DISABLE,X'01';
>           CPYBLA       SPCTMPL-NAME,XSPCNAME;
>           CRTS         WRKSPC-SYP,SPCTMPL-SPP;
>           SETSPPFP     WRKSPC-SPP,WRKSPC-SYP;
>           CPYNV        WRKSPC-FIRST,0;
>           CPYNV        WRKSPC-COUNT,0;
>           CPYNV        XFIRST,0;
>           CPYNV        XCURRENT,0;
>           CPYBLA       XSTS,'0';
>           CPYNV        XERRCODE,0;
>           RTX          *;
>
>/********************************************************************/
>/*  CLOSE FILE: DESTROY SPACE (IF REQUESTED)                        */
>/********************************************************************/
>
>CLOSE:
>           CMPBLA(B)    XCTL,' '/NEQ(CLOSEEND);
>           DESS         WRKSPC-SYP;
>           DEACTPG      *;
>CLOSEEND:  RTX          *;
>
>/********************************************************************/
>/*  READ FILE                                                       */
>/********************************************************************/
>
>DCL DD     CURRENT      BIN(4) AUTO;
>DCL DD     OFFSET       BIN(4) AUTO;
>DCL DD     FREE         CHAR(8) AUTO INIT(X'FFFFFFFFFFFFFFFF');
>
>READ:
>           CPYNV        CURRENT,XCURRENT;
>           CPYBWP       RECORD-SPP,WRKSPC-SPP;
>           SETSPPO      RECORD-SPP,CURRENT;
>
>           CMPBLA(B)    XCTL,'P'/EQ(READPREV);
>           CMPBLA(B)    XCTL,'N'/EQ(READNEXT);
>           CMPBLA(B)    XCTL,'C'/EQ(READOK);
>           CMPBLA(B)    XCTL,'E'/EQ(READEND);
>
>           CPYBLA       XSTS,'2';
>           CPYNV        XERRCODE,90002; /* INVALID READ REQUEST */
>           RTX          *;
>
>READPREV:
>           CMPNV(B)     CURRENT,0/EQ(EOF);
>           CMPNV(B)     RECORD-PREV,0/EQ(EOF);
>           CPYNV        CURRENT,RECORD-PREV;
>           SETSPPO      RECORD-SPP,CURRENT;
>           B            READOK;
>
>READNEXT:
>           CMPNV(B)     WRKSPC-COUNT,0/EQ(ADDRECORD);
>           CMPNV(B)     RECORD-NEXT,0/EQ(ADDRECORD);
>           CMPNV(B)     CURRENT,0/HI(TAG1);
>           CPYNV        CURRENT,WRKSPC-FIRST;
>           B            TAG2;
>TAG1:      CPYNV        CURRENT,RECORD-NEXT;
>TAG2:      SETSPPO      RECORD-SPP,CURRENT;
>           B            READOK;
>ADDRECORD:
>           CMPNV(B)     WRKSPC-COUNT,1700/EQ(EOF);
>           CPYNV        PREV,0;
>           CPYNV        NEXT,0;
>           CMPNV(B)     CURRENT,0/EQ(END51);
>           CPYNV        PREV,CURRENT;
>           CPYNV        NEXT,RECORD-NEXT;
>END51:
>
>/* NEW RECORD */
>           SEARCH       CURRENT,WRKSPC-PTR,FREE,1;
>           MULT(S)      CURRENT,75;
>           SUBN(S)      CURRENT,59;
>           SETSPPO      RECORD-SPP,CURRENT;
>           CPYNV        RECORD-PREV,PREV;
>           CPYNV        RECORD-NEXT,NEXT;
>           CPYBLAP      RECORD-DATA,' ',' ';
>           CPYNV        WRKSPC-LAST,CURRENT;
>           ADDN(S)      WRKSPC-COUNT,1;
>
>/* PREVIOUS RECORD */
>           CMPNV(B)     RECORD-PREV,0/EQ(END52);
>           SETSPPO      RECORD-SPP,RECORD-PREV;
>           CPYNV        RECORD-NEXT,CURRENT;
>           SETSPPO      RECORD-SPP,CURRENT;
>           B            END53;
>END52:     CPYNV        WRKSPC-FIRST,CURRENT;
>END53:     B            READOK;
>
>
>READEND:
>           CMPNV(B)     CURRENT,0/HI(CONT1);
>           CMPNV(B)     WRKSPC-FIRST,0/EQ(EOF);
>           CPYNV        CURRENT,WRKSPC-FIRST;
>           B            CONT2;
>CONT1:     CMPNV(B)     RECORD-NEXT,0/EQ(EOF);
>           CPYNV        CURRENT,RECORD-NEXT;
>CONT2:     SETSPPO      RECORD-SPP,CURRENT;
>           CPYNV        OFFSET,CURRENT;
>CF:        CMPBLAP(B)   RECORD-DATA,' ',' '/NEQ(ENDREADEND);
>           CMPNV(B)     RECORD-NEXT,0/EQ(EOF);
>           CPYNV        OFFSET,RECORD-NEXT;
>           SETSPPO      RECORD-SPP,OFFSET;
>           B            CF;
>ENDREADEND:SETSPPO      RECORD-SPP,CURRENT;
>
>READOK:
>           CPYBLA       XIOAREA,RECORD-DATA;
>           CPYNV        XFIRST,WRKSPC-FIRST;
>           CPYNV        XCURRENT,CURRENT;
>           CPYBLA       XSTS,'0';
>           CPYNV        XERRCODE,0;
>           RTX          *;
>
>
>EOF:
>           CPYBLA       XEOF,'1';
>           CPYBLA       XSTS,'0';
>           CPYNV        XERRCODE,0;
>           RTX          *;
>
>/********************************************************************/
>/*  WRITE FILE                                                      */
>/********************************************************************/
>
>DCL DD     NEXT         BIN(4) AUTO;
>DCL DD     PREV         BIN(4) AUTO;
>DCL DD     BUFFER       CHAR(75) AUTO;
>
>WRITE:
>           CPYNV        CURRENT,XCURRENT;
>           CPYBWP       RECORD-SPP,WRKSPC-SPP;
>           SETSPPO      RECORD-SPP,CURRENT;
>
>           CMPBLA(B)    XCTL,'B'/EQ(ADDBEFORE);
>           CMPBLA(B)    XCTL,'A'/EQ(ADDAFTER);
>           CMPBLA(B)    XCTL,'U'/EQ(UPDATE);
>           CMPBLA(B)    XCTL,'D'/EQ(DELETE);
>
>           CPYBLA       XSTS,'2';
>           CPYNV        XERRCODE,90003; /* INVALID WRITE REQUEST */
>           RTX          *;
>
>ADDBEFORE:
>           CPYNV        PREV,0;
>           CPYNV        NEXT,0;
>           CMPNV(B)     CURRENT,0/EQ(END01);
>           CPYNV        PREV,RECORD-PREV;
>           CPYNV        NEXT,CURRENT;
>END01:
>
>/* NEW RECORD */
>           CMPNV(B)     WRKSPC-COUNT,1700/EQ(END02); /* SPACE FULL */
>           SEARCH       CURRENT,WRKSPC-PTR,FREE,1;
>           MULT(S)      CURRENT,75;
>           SUBN(S)      CURRENT,59;
>           SETSPPO      RECORD-SPP,CURRENT;
>           CPYNV        RECORD-PREV,PREV;
>           CPYNV        RECORD-NEXT,NEXT;
>           CPYBLA       RECORD-DATA,XIOAREA;
>           ADDN(S)      WRKSPC-COUNT,1;
>           B            END03;
>END02:     CPYNV        CURRENT,WRKSPC-LAST;
>           SETSPPO      RECORD-SPP,CURRENT;
>           CPYNV        WRKSPC-LAST,RECORD-PREV;
>           SETSPPO      RECORD-SPP,RECORD-PREV;
>           CPYNV        RECORD-NEXT,0;
>           SETSPPO      RECORD-SPP,CURRENT;
>           CPYNV        RECORD-PREV,PREV;
>           CPYNV        RECORD-NEXT,NEXT;
>           CPYBLA       RECORD-DATA,XIOAREA;
>END03:
>
>/* PREVIOUS RECORD */
>           CMPNV(B)     RECORD-PREV,0/EQ(END04);
>           SETSPPO      RECORD-SPP,RECORD-PREV;
>           CPYNV        RECORD-NEXT,CURRENT;
>           SETSPPO      RECORD-SPP,CURRENT;
>           B            END05;
>END04:     CPYNV        WRKSPC-FIRST,CURRENT;
>END05:
>
>/* NEXT RECORD     */
>           CMPNV(B)     RECORD-NEXT,0/EQ(END06);
>           SETSPPO      RECORD-SPP,RECORD-NEXT;
>           CPYNV        RECORD-PREV,CURRENT;
>           SETSPPO      RECORD-SPP,CURRENT;
>           B            END07;
>END06:     CPYNV        WRKSPC-LAST,CURRENT;
>END07:
>           CPYNV        XFIRST,WRKSPC-FIRST;
>           CPYNV        XCURRENT,CURRENT;
>           CPYBLA       XSTS,'0';
>           CPYNV        XERRCODE,0;
>           RTX          *;
>
>
>ADDAFTER:
>           CPYNV        PREV,0;
>           CPYNV        NEXT,WRKSPC-FIRST;
>           CMPNV(B)     CURRENT,0/EQ(END21);
>           CPYNV        PREV,CURRENT;
>           CPYNV        NEXT,RECORD-NEXT;
>END21:
>
>/* NEW RECORD */
>           CMPNV(B)     WRKSPC-COUNT,1700/EQ(END22); /* SPACE FULL */
>           SEARCH       CURRENT,WRKSPC-PTR,FREE,1;
>           MULT(S)      CURRENT,75;
>           SUBN(S)      CURRENT,59;
>           SETSPPO      RECORD-SPP,CURRENT;
>           CPYNV        RECORD-PREV,PREV;
>           CPYNV        RECORD-NEXT,NEXT;
>           CPYBLA       RECORD-DATA,XIOAREA;
>           ADDN(S)      WRKSPC-COUNT,1;
>           B            END23;
>END22:     CPYNV        CURRENT,WRKSPC-LAST;
>           SETSPPO      RECORD-SPP,CURRENT;
>           CPYNV        WRKSPC-LAST,RECORD-PREV;
>           SETSPPO      RECORD-SPP,RECORD-PREV;
>           CPYNV        RECORD-NEXT,0;
>           SETSPPO      RECORD-SPP,CURRENT;
>           CPYNV        RECORD-PREV,PREV;
>           CPYNV        RECORD-NEXT,NEXT;
>           CPYBLA       RECORD-DATA,XIOAREA;
>END23:
>
>/* PREVIOUS RECORD */
>           CMPNV(B)     RECORD-PREV,0/EQ(END24);
>           SETSPPO      RECORD-SPP,RECORD-PREV;
>           CPYNV        RECORD-NEXT,CURRENT;
>           SETSPPO      RECORD-SPP,CURRENT;
>           B            END25;
>END24:     CPYNV        WRKSPC-FIRST,CURRENT;
>END25:
>
>/* NEXT RECORD     */
>           CMPNV(B)     RECORD-NEXT,0/EQ(END26);
>           SETSPPO      RECORD-SPP,RECORD-NEXT;
>           CPYNV        RECORD-PREV,CURRENT;
>           SETSPPO      RECORD-SPP,CURRENT;
>           B            END27;
>END26:     CPYNV        WRKSPC-LAST,CURRENT;
>END27:
>           CPYNV        XFIRST,WRKSPC-FIRST;
>           CPYNV        XCURRENT,CURRENT;
>           CPYBLA       XSTS,'0';
>           CPYNV        XERRCODE,0;
>           RTX          *;
>
>
>UPDATE:
>           CPYBLA       RECORD-DATA,XIOAREA;
>           CPYNV        XFIRST,WRKSPC-FIRST;
>           CPYNV        XCURRENT,CURRENT;
>           CPYBLA       XSTS,'0';
>           CPYNV        XERRCODE,0;
>           RTX          *;
>
>
>DELETE:
>           CPYNV        PREV,RECORD-PREV;
>           CPYNV        NEXT,RECORD-NEXT;
>
>           CMPNV(B)     PREV,0/EQ(END41);
>           SETSPPO      RECORD-SPP,PREV;
>           CPYNV        RECORD-NEXT,NEXT;
>           B            END42;
>END41:     CPYNV        WRKSPC-FIRST,NEXT;
>END42:
>           CMPNV(B)     NEXT,0/EQ(END43);
>           SETSPPO      RECORD-SPP,NEXT;
>           CPYNV        RECORD-PREV,PREV;
>           B            END44;
>END43:     CPYNV        WRKSPC-LAST,PREV;
>END44:
>           SUBN(S)      WRKSPC-COUNT,1;
>
>           SETSPPO      RECORD-SPP,CURRENT;
>           CPYBLAP      RECORD-BUFF,X'FFFFFFFFFFFFFFFF',X'00';
>
>           CPYNV        CURRENT,NEXT;
>           SETSPPO      RECORD-SPP,CURRENT;
>
>           CPYNV        XFIRST,WRKSPC-FIRST;
>           CPYNV        XCURRENT,CURRENT;
>           CPYBLA       XSTS,'0';
>           CPYNV        XERRCODE,0;
>           RTX          *;
>
>/********************************************************************/
>
>DCL SYSPTR WRKSPC-SYP;
>DCL SPCPTR WRKSPC-SPP;
>DCL DD     WRKSPC-FIRST BIN(4)  BAS(WRKSPC-SPP) POS(1);   /* FIRST LINE */
>DCL DD     WRKSPC-LAST  BIN(4)  BAS(WRKSPC-SPP) POS(5); /* LAST LINE  */
>DCL DD     WRKSPC-COUNT BIN(4)  BAS(WRKSPC-SPP) POS(13); /* LINE COUNT */
>DCL DD     WRKSPC-DUMMY CHAR(1) BAS(WRKSPC-SPP) POS(17);
>DCL DD     WRKSPC-PTR(1700) CHAR(8) DEF(WRKSPC-DUMMY) AEO(75);
>
>DCL SPCPTR RECORD-SPP   AUTO;
>DCL DD     RECORD-PREV  BIN(4)   BAS(RECORD-SPP) POS(1); /* PREV LINE */
>DCL DD     RECORD-NEXT  BIN(4)   BAS(RECORD-SPP) POS(5); /* NEXT LINE */
>DCL DD     RECORD-DATA  CHAR(67) BAS(RECORD-SPP) POS(9); /* DATA      */
>DCL DD     RECORD-BUFF  CHAR(75) BAS(RECORD-SPP) POS(1);
>
>DCL SPCPTR SPCTMPL-SPP  AUTO INIT(SPCTMPL);
>DCL DD     SPCTMPL      CHAR(160) AUTO;
>DCL DD     *            BIN(4)   DEF(SPCTMPL) POS(1)  INIT(160);
>DCL DD     *            CHAR(2)  DEF(SPCTMPL) POS(9)  INIT(X'19EE');
>DCL DD     SPCTMPL-NAME CHAR(30) DEF(SPCTMPL) POS(11);
>DCL DD     *            CHAR(4)  DEF(SPCTMPL) POS(41) INIT(X'E2000000');
>DCL DD     *            CHAR(4)  DEF(SPCTMPL) POS(45) INIT(X'00000000');
>DCL DD     *            BIN(4)   DEF(SPCTMPL) POS(49) INIT(127516);
>DCL DD     *            CHAR(1)  DEF(SPCTMPL) POS(53) INIT(X'FF');
>DCL DD     *            CHAR(4)  DEF(SPCTMPL) POS(54) INIT(X'03000000');
>DCL DD     *            CHAR(1)  DEF(SPCTMPL) POS(58) INIT(X'00');
>DCL DD     *            CHAR(2)  DEF(SPCTMPL) POS(59) INIT(X'FF00');
>DCL SYSPTR CTX-SYP               DEF(SPCTMPL) POS(65);
>
>DCL DD     WRKSPC-ID    CHAR(34) AUTO;
>DCL DD     *            CHAR(2)  DEF(WRKSPC-ID) POS(1)  INIT(X'19EE');
>DCL DD     WRKSPC-NAME  CHAR(30) DEF(WRKSPC-ID) POS(3);
>DCL DD     *            CHAR(2)  DEF(WRKSPC-ID) POS(33) INIT(X'0000');
>
>DCL DD     CTX-ID       CHAR(34) AUTO;
>DCL DD     *            CHAR(2)  DEF(CTX-ID) POS(1)  INIT(X'0401');
>DCL DD     *            CHAR(30) DEF(CTX-ID) POS(3)  INIT('QRECOVERY');
>DCL DD     *            CHAR(2)  DEF(CTX-ID) POS(33) INIT(X'0000');
>
>DCL CON    *ENABLE      CHAR(2) INIT(X'A000');
>DCL CON    *DISABLE     CHAR(2) INIT(X'2000');
>           PEND;
>
>
>_______________________________________________
>This is the MI Programming on the AS400 / iSeries (MI400) mailing list
>To post a message email: MI400@midrange.com
>To subscribe, unsubscribe, or change list options,
>visit: http://lists.midrange.com/cgi-bin/listinfo/mi400
>or email: MI400-request@midrange.com
>
>



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.