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



"MIDRANGE-L" <midrange-l-bounces@xxxxxxxxxxxx> wrote on 12/20/2016
12:15:34 PM:
OK, I got the CALLPRC syntax to be accepted by the editor but it

won't create a program object because the TSTBTS symbol is not found. Is

there a binding directory or service program that I need to add to the
compile? Thanks.

Well, I never found an example but I did finally get the following
to work as desired. Not sure whether this was worth it. hehehe

CHGVAR VAR(&QFNM) VALUE(&SRCF *CAT '*LIBL')
CHGVAR VAR(&API_BPROV) VALUE(3016)
CALL PGM(QDBRTVFD) PARM(&RCVR &RCVL &QOUT +
'FILD0100' &QFNM '*FIRST' '1' '*LCL' +
'*INT' &APIERRC)
IF COND(&API_BAVAIL *GT 0) THEN(DO)
SNDPGMMSG MSGID(&API_MSGID) MSGF(QCPFMSG) +
MSGDTA(&API_MDATA) MSGTYPE(*ESCAPE)
ENDDO

CHGVAR VAR(&CHAR) VALUE(%SST(&RCVR 9 1))

CHGVAR VAR(&BIT_POS) VALUE(2)
CALLPRC PRC('_TSTBTS') PARM((&CHAR) (&BIT_POS *BYVAL)) +
RTNVAL(&BIT_POS)
CHGVAR VAR(&BIT_2_ON) VALUE(&BIT_POS *EQ 1)

CHGVAR VAR(&BIT_POS) VALUE(4)
CALLPRC PRC('_TSTBTS') PARM((&CHAR) (&BIT_POS *BYVAL)) +
RTNVAL(&BIT_POS)
CHGVAR VAR(&BIT_4_ON) VALUE(&BIT_POS *EQ 1)

IF COND(&BIT_2_ON) THEN(CHGVAR &FILEATRB *LF)
ELSE CMD(CHGVAR &FILEATRB *PF)
IF COND(&BIT_4_ON) THEN(CHGVAR &FILETYPE *SRC)
ELSE CMD(CHGVAR &FILEATRB *DATA)

IF COND(&FILEATRB *NE '*PF' +
*OR &FILETYPE *NE '*SRC') THEN(DO)
SNDPGMMSG MSGID(WSE9897) MSGF(&MSGF) MSGDTA('File is +
not a physical source file.') +
MSGTYPE(*ESCAPE)
ENDDO


Sincerely,

Dave Clark

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.