× 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.



On 12/15/2014 11:43 AM, Smith, Mike wrote:
In my planning to upgrade to V7R1, I ran the ANZOBJCVN command and found out one of the program on my machine wouldn't convert. Since I don't have the source, I had been trying to find it on the Internet but no deal. I was wondering if anyone has KIKSRUN running on V7R1 (or possibly V6R1, flagged at that release as well). It's a screen emulator that I've been trying to get my applications staff to stop using (clarify, one part time programmer, not a lot of resources for the application) but I couldn't wait any longer to upgrade V5R4 to V7R1.

Can't help at all with KIKSRUN, but

I think the program that is failing is called CRTMIPGM1.. go figure, huh.

This I might be able to help you with. I have a very ancient interface
to the MI compiler that invokes CRTMIPGM1. Together, these pieces will
let you compile an MI program, which I'd guess is what is happening
behind the scenes. Hopefully, you can reconstruct this part of the
utility. Here is the source:

CMD: CRTMIPGM
CMD PROMPT('Create MI Program')


PARM KWD(PGM) TYPE(QPGM) MIN(1) PROMPT('Program')
QPGM: QUAL TYPE(*NAME) LEN(10)
QUAL TYPE(*NAME) LEN(10) DFT(*CURLIB) +
SPCVAL((*CURLIB *CURLIB)) PROMPT('Library')

PARM KWD(SRCFILE) TYPE(QSRCFILE) PROMPT('Source +
file')
QSRCFILE: QUAL TYPE(*NAME) LEN(10) DFT(QMISRC)
QUAL TYPE(*NAME) LEN(10) DFT(*LIBL) +
SPCVAL((*LIBL) (*CURLIB *CURLIB)) +
PROMPT('Library')

PARM KWD(SRCMBR) TYPE(*NAME) LEN(10) DFT(*PGM) +
SPCVAL((*PGM)) PROMPT('Source member')

PARM KWD(TEXT) TYPE(*CHAR) LEN(50) +
DFT(*SRCMBRTXT) SPCVAL((*SRCMBRTXT)) +
PROMPT('Text ''description''')


PARM KWD(OPTIONS) TYPE(*CHAR) LEN(11) RSTD(*YES) +
DFT(*LIST) VALUES(*GEN *NOGEN *NOLIST +
*LIST *NOXREF *XREF *NOATR *ATR *USER +
*ADOPT *OWNER *ADPAUT *NOAPTAUT *SUBSCR +
*NOSUBSCR *UNCON *SUBSTR *NOSUBSTR +
*CLRPSSA *NOCLRPSSA *CLRPASA *NOCLRPASA +
*NOIGNDEC *IGNDEC *NOIGNBIN *IGNBIN +
*NOOVERLAP *OVERLAP *NODUP *DUP *OPT +
*NOOPT) MAX(15) PMTCTL(*PMTRQS) +
PROMPT('Compiler options')

PARM KWD(REPLACE) TYPE(*LGL) LEN(1) RSTD(*YES) +
DFT(*YES) SPCVAL((*YES '1') (*NO '0')) +
PMTCTL(*PMTRQS) PROMPT('Replace program')

PARM KWD(AUT) TYPE(*NAME) LEN(10) DFT(*LIBCRTAUT) +
SPCVAL((*LIBCRTAUT) (*CHANGE) (*ALL) +
(*USE) (*EXCLUDE)) PMTCTL(*PMTRQS) +
PROMPT('Authority')

CLP: CRTMIPGM0
PGM PARM(&QPGM &QSRCFILE &SRCMBR &PGMTEXT +
&OPTIONS &REPLACE &AUT)

DCL VAR(&QPGM) TYPE(*CHAR) LEN(20)
DCL VAR(&QSRCFILE) TYPE(*CHAR) LEN(20)
DCL VAR(&SRCMBR) TYPE(*CHAR) LEN(10)
DCL VAR(&PGMTEXT) TYPE(*CHAR) LEN(50)
DCL VAR(&OPTIONS) TYPE(*CHAR) LEN(165)
DCL VAR(&REPLACE) TYPE(*LGL) LEN(1)
DCL VAR(&AUT) TYPE(*CHAR) LEN(10)

DCL VAR(&SRCFILE) TYPE(*CHAR) LEN(10)
DCL VAR(&SRCFILELIB) TYPE(*CHAR) LEN(10)

DCL VAR(&SRCCHGDATE) TYPE(*CHAR) LEN(13)
DCL VAR(&SRCMBRTXT) TYPE(*CHAR) LEN(50)


/* Split-up qualified names (only the ones necessary). */
CHGVAR VAR(&SRCFILE) VALUE(%SST(&QSRCFILE 1 10))
CHGVAR VAR(&SRCFILELIB) VALUE(%SST(&QSRCFILE 11 10))


/* Set/retrieve source info. */
IF COND(&SRCMBR = '*PGM') THEN(CHGVAR +
VAR(&SRCMBR) VALUE(&QPGM))
RTVMBRD FILE(&SRCFILELIB/&SRCFILE) MBR(&SRCMBR) +
RTNLIB(&SRCFILELIB) +
SRCCHGDATE(&SRCCHGDATE) TEXT(&SRCMBRTXT)
IF COND(&PGMTEXT = '*SRCMBRTXT') THEN(CHGVAR +
VAR(&PGMTEXT) VALUE(&SRCMBRTXT))
CHGVAR VAR(&QSRCFILE) VALUE(&SRCFILE *CAT &SRCFILELIB)


/* Set public authority. */
IF COND(&AUT = '*LIBCRTAUT') THEN(DO)
RTVLIBD LIB(%SST(&QPGM 11 10)) CRTAUT(&AUT)
IF COND(&AUT = '*SYSVAL') THEN(RTVSYSVAL +
SYSVAL(QCRTAUT) RTNVAR(&AUT))
ENDDO


/* Override files and call CRTMIPGM1. */
OVRPRTF FILE(QSYSPRT) SPLFNAME(%SST(&QPGM 1 10))
OVRDBF FILE(QMISRC) TOFILE(&SRCFILELIB/&SRCFILE) +
MBR(&SRCMBR)

CALL PGM(CRTMIPGM1) PARM(&QPGM &PGMTEXT &QSRCFILE +
&SRCMBR &SRCCHGDATE 'QSYSPRT *LIBL ' +
&AUT &OPTIONS &REPLACE)

DLTOVR FILE(*ALL)
SNDPGMMSG MSGID(CPC0815) MSGF(QCPFMSG) MSGDTA(&QPGM) +
MSGTYPE(*COMP)

ENDPGM

RPG: CRTMIPGM1

FQMISRC IF F 92 DISK
*
*
E SA 9999 80
*
*
IQMISRC NS
I 1 12 SEQDAT
I 13 92 SRCDTA
*
*
IPOPTDS DS
I B 1 20P#OPTS
I 3 167 POPTS
*
IOPTDS DS
I 1 11 REPLAC
I 12 176 OOPTS
*
IFIELDS IDS
I B 1 40SRCLEN
I I 1 B 5 80PAGNBR
I B 9 120#OPTS
*
C *ENTRY PLIST
C PARM QPGM 20
C PARM PGMTXT 50
C PARM QSRCF 20
C PARM SRCMBR 10
C PARM SCHGDT 13
C PARM QPRTF 20
C PARM PUBAUT 10
C PARM POPTDS
C PARM PREPLC 1
*
*
* Read through the source file putting the source
* records in the source array SA, which will be
* passed to the API.
C MOVEL*ZEROS I 50
C READ QMISRC LR
C *INLR DOWEQ'0'
C ADD 1 I
C MOVELSRCDTA SA,I
C READ QMISRC LR
C ENDDO
*
*
* Set source length.
C I MULT 80 SRCLEN
*
*
* Set option template. Move options from incoming
* parm (POPTDS) to template parm passed to API
* (OPTDS).
C PREPLC IFEQ '1'
C MOVEL'*REPLACE'REPLAC
C ELSE
C '*NO' CAT 'REPLACE' REPLAC
C ENDIF
*
C P#OPTS MULT 11 LEN 50
C LEN SUBSTPOPTS:1 OOPTS
*
C P#OPTS ADD 1 #OPTS
*
*
* Call API.
C CALL 'QPRCRTPG'
C PARM SA
C PARM SRCLEN
C PARM QPGM
C PARM PGMTXT
C PARM QSRCF
C PARM SRCMBR
C PARM SCHGDT
C PARM QPRTF
C PARM PAGNBR
C PARM PUBAUT
C PARM OPTDS
C PARM #OPTS
*
*
C RETRN



As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.