|
Steve, This appears to print the value of parameters passed to your program by an unknown caller. How does this establish the number, type, and length of parameters required by an arbitrary program? Did I misunderstand? Richard Jackson mailto:richardjackson@richardjackson.net www.richardjacksonltd.com Voice: 1 (303) 808-8058 Fax: 1 (303) 663-4325 -----Original Message----- From: owner-mi400@midrange.com [mailto:owner-mi400@midrange.com]On Behalf Of Steve Glanstein Sent: Friday, July 07, 2000 2:50 PM To: MI400@midrange.com Subject: RE: Parm identification routine... > > >> Yes, a parameter identification routine exists. I have the program. > > I look forward to seeing in Gene - does it identify the size and type of > the parameter as well ? We use a simple DSPPARM program which may help. Once in a while we need to do a switcheroo to see what the parameters are. It certainly is better than a DMPJOBINT... Here it is.... Steve Glanstein mic@aloha.com TITLE 'DSPPARM: Display Parameters - V2.2'; /********************************************************************/ /* */ /* Program permits display of up to nineteen entered parameters. */ /* */ /* Program will run in user state. */ /* */ /* 02/26/95 - Initial release of program */ /* 05/01/95 - Added Character/Hex display of parameters. */ /* 02/16/96 - Changed SNDPGMMSG to call direct via SEPT. */ /* 02/21/96 - Corrected minor bug after 15th parameter. */ /*------------------------------------------------------------------*/ /* (c) Copyright 1996, RPG III, Inc. All rights Reserved. */ /********************************************************************/ DCL DD .COPYRIGHT CHAR(80) INIT('(C) COPYRIGHT 1996, RPG III, INC. ALL RIGHTS RESERVED.'); DCL SPCPTR ?PA PARM; DCL SPCPTR ?PB PARM; DCL SPCPTR ?PC PARM; DCL SPCPTR ?PD PARM; DCL SPCPTR ?PE PARM; DCL SPCPTR ?PF PARM; DCL SPCPTR ?PG PARM; DCL SPCPTR ?PH PARM; DCL SPCPTR ?PI PARM; DCL SPCPTR ?PJ PARM; DCL SPCPTR ?PK PARM; DCL SPCPTR ?PL PARM; DCL SPCPTR ?PM PARM; DCL SPCPTR ?PN PARM; DCL SPCPTR ?PO PARM; DCL SPCPTR ?PP PARM; DCL SPCPTR ?PQ PARM; DCL SPCPTR ?PR PARM; DCL SPCPTR ?PS PARM; DCL DD PA CHAR(80) BAS(?PA); DCL DD PB CHAR(80) BAS(?PB); DCL DD PC CHAR(80) BAS(?PC); DCL DD PD CHAR(80) BAS(?PD); DCL DD PE CHAR(80) BAS(?PE); DCL DD PF CHAR(80) BAS(?PF); DCL DD PG CHAR(80) BAS(?PG); DCL DD PH CHAR(80) BAS(?PH); DCL DD PI CHAR(80) BAS(?PI); DCL DD PJ CHAR(80) BAS(?PJ); DCL DD PK CHAR(80) BAS(?PK); DCL DD PL CHAR(80) BAS(?PL); DCL DD PM CHAR(80) BAS(?PM); DCL DD PN CHAR(80) BAS(?PN); DCL DD PO CHAR(80) BAS(?PO); DCL DD PP CHAR(80) BAS(?PP); DCL DD PQ CHAR(80) BAS(?PQ); DCL DD PR CHAR(80) BAS(?PR); DCL DD PS CHAR(80) BAS(?PS); DCL DD P_LEN BIN(2) ; DCL OL P_LIST(?PA,?PB,?PC,?PD,?PE,?PF,?PG,?PH,?PI,?PJ,?PK,?PL,?PM,?PN,?PO, ?PP,?PQ,?PR,?PS) PARM EXT MIN(0) ; ENTRY *(P_LIST) EXT; DCL DD A4 CHAR(4); DCL DD ATTR CHAR(7) INIT(X'02000400000000'); /* 02=ZONED DECIMAL, 4=LENGTH OF A4 */ DCL DD N4 BIN(4); /********************************************************************/ /* Send Header Message with number of parameters. */ /********************************************************************/ STPLLEN P_LEN; CVTNC A4,P_LEN,ATTR; DCL DD MSGDTAH CHAR(120) INIT('There are xxxx parameters. The lengths ar e unknown so only the first 80 bytes will be displayed. They are:'); DCL DD MSGDTAN CHAR(120) INIT('There are NO parameters passed to this pro gram.'); CMPNV(B) P_LEN,0/NEQ(SKIPA); CPYBLAP S_MSGDTA,MSGDTAN,' '; B SKIPB; SKIPA: CPYBLA MSGDTAH(11:4),A4; CPYBLAP S_MSGDTA,MSGDTAH,' '; SKIPB: CPYNV N4,S_MSGL; CPYNV S_MSGL,120; CALLX SNDPGMMSG,?SNDPGMMSG,*; CPYNV S_MSGL,N4; CMPNV(B) P_LEN,0/EQ(RTN); /********************************************************************/ /* Send a message for each parameter. */ /********************************************************************/ DCL DD MSGDTA1 CHAR(260) INIT('P(xx)=X'''); CPYBLA MSGDTA1(169:9),''' <==> C'''; CPYBLA MSGDTA1(258:1),''''; /*------------------1------------------*/ CMPNV(B) P_LEN,1/LO(RTN); CPYBLA MSGDTA1(3:2),'01'; CVTHC MSGDTA1(9:160),PA; CPYBLA MSGDTA1(178:80),PA; CPYBLAP S_MSGDTA,MSGDTA1,' '; CALLX SNDPGMMSG,?SNDPGMMSG,*; /*------------------2------------------*/ CMPNV(B) P_LEN,2/LO(RTN); CPYBLA MSGDTA1(3:2),'02'; CVTHC MSGDTA1(9:160),PB; CPYBLA MSGDTA1(178:80),PB; CPYBLAP S_MSGDTA,MSGDTA1,' '; CALLX SNDPGMMSG,?SNDPGMMSG,*; /*------------------3------------------*/ CMPNV(B) P_LEN,3/LO(RTN); CPYBLA MSGDTA1(3:2),'03'; CVTHC MSGDTA1(9:160),PC; CPYBLA MSGDTA1(178:80),PC; CPYBLAP S_MSGDTA,MSGDTA1,' '; CALLX SNDPGMMSG,?SNDPGMMSG,*; /*------------------4------------------*/ CMPNV(B) P_LEN,4/LO(RTN); CPYBLA MSGDTA1(3:2),'04'; CVTHC MSGDTA1(9:160),PD; CPYBLA MSGDTA1(178:80),PD; CPYBLAP S_MSGDTA,MSGDTA1,' '; CALLX SNDPGMMSG,?SNDPGMMSG,*; /*------------------5------------------*/ CMPNV(B) P_LEN,5/LO(RTN); CPYBLA MSGDTA1(3:2),'05'; CVTHC MSGDTA1(9:160),PE; CPYBLA MSGDTA1(178:80),PE; CPYBLAP S_MSGDTA,MSGDTA1,' '; CALLX SNDPGMMSG,?SNDPGMMSG,*; /*------------------6------------------*/ CMPNV(B) P_LEN,6/LO(RTN); CPYBLA MSGDTA1(3:2),'06'; CVTHC MSGDTA1(9:160),PF; CPYBLA MSGDTA1(178:80),PF; CPYBLAP S_MSGDTA,MSGDTA1,' '; CALLX SNDPGMMSG,?SNDPGMMSG,*; /*------------------7------------------*/ CMPNV(B) P_LEN,7/LO(RTN); CPYBLA MSGDTA1(3:2),'07'; CVTHC MSGDTA1(9:160),PG; CPYBLA MSGDTA1(178:80),PG; CPYBLAP S_MSGDTA,MSGDTA1,' '; CALLX SNDPGMMSG,?SNDPGMMSG,*; /*------------------8------------------*/ CMPNV(B) P_LEN,8/LO(RTN); CPYBLA MSGDTA1(3:2),'08'; CVTHC MSGDTA1(9:160),PH; CPYBLA MSGDTA1(178:80),PH; CPYBLAP S_MSGDTA,MSGDTA1,' '; CALLX SNDPGMMSG,?SNDPGMMSG,*; /*------------------9------------------*/ CMPNV(B) P_LEN,9/LO(RTN); CPYBLA MSGDTA1(3:2),'09'; CVTHC MSGDTA1(9:160),PI; CPYBLA MSGDTA1(178:80),PI; CPYBLAP S_MSGDTA,MSGDTA1,' '; CALLX SNDPGMMSG,?SNDPGMMSG,*; /*-----------------10------------------*/ CMPNV(B) P_LEN,10/LO(RTN); CPYBLA MSGDTA1(3:2),'10'; CVTHC MSGDTA1(9:160),PJ; CPYBLA MSGDTA1(178:80),PJ; CPYBLAP S_MSGDTA,MSGDTA1,' '; CALLX SNDPGMMSG,?SNDPGMMSG,*; /*-----------------11------------------*/ CMPNV(B) P_LEN,11/LO(RTN); CPYBLA MSGDTA1(3:2),'11'; CVTHC MSGDTA1(9:160),PK; CPYBLA MSGDTA1(178:80),PK; CPYBLAP S_MSGDTA,MSGDTA1,' '; CALLX SNDPGMMSG,?SNDPGMMSG,*; /*-----------------12------------------*/ CMPNV(B) P_LEN,12/LO(RTN); CPYBLA MSGDTA1(3:2),'12'; CVTHC MSGDTA1(9:160),PL; CPYBLA MSGDTA1(178:80),PL; CPYBLAP S_MSGDTA,MSGDTA1,' '; CALLX SNDPGMMSG,?SNDPGMMSG,*; /*-----------------13------------------*/ CMPNV(B) P_LEN,13/LO(RTN); CPYBLA MSGDTA1(3:2),'13'; CVTHC MSGDTA1(9:160),PM; CPYBLA MSGDTA1(178:80),PM; CPYBLAP S_MSGDTA,MSGDTA1,' '; CALLX SNDPGMMSG,?SNDPGMMSG,*; /*-----------------14------------------*/ CMPNV(B) P_LEN,14/LO(RTN); CPYBLA MSGDTA1(3:2),'14'; CVTHC MSGDTA1(9:160),PN; CPYBLA MSGDTA1(178:80),PN; CPYBLAP S_MSGDTA,MSGDTA1,' '; CALLX SNDPGMMSG,?SNDPGMMSG,*; /*-----------------15------------------*/ CMPNV(B) P_LEN,15/LO(RTN); CPYBLA MSGDTA1(3:2),'15'; CVTHC MSGDTA1(9:160),PO; CPYBLA MSGDTA1(178:80),PO; CPYBLAP S_MSGDTA,MSGDTA1,' '; CALLX SNDPGMMSG,?SNDPGMMSG,*; /*-----------------16------------------*/ CMPNV(B) P_LEN,16/LO(RTN); CPYBLA MSGDTA1(3:2),'16'; CVTHC MSGDTA1(9:160),PP; CPYBLA MSGDTA1(178:80),PP; CPYBLAP S_MSGDTA,MSGDTA1,' '; CALLX SNDPGMMSG,?SNDPGMMSG,*; /*-----------------17------------------*/ CMPNV(B) P_LEN,17/LO(RTN); CPYBLA MSGDTA1(3:2),'17'; CVTHC MSGDTA1(9:160),PQ; CPYBLA MSGDTA1(178:80),PQ; CPYBLAP S_MSGDTA,MSGDTA1,' '; CALLX SNDPGMMSG,?SNDPGMMSG,*; /*-----------------18------------------*/ CMPNV(B) P_LEN,18/LO(RTN); CPYBLA MSGDTA1(3:2),'18'; CVTHC MSGDTA1(9:160),PR; CPYBLA MSGDTA1(178:80),PR; CPYBLAP S_MSGDTA,MSGDTA1,' '; CALLX SNDPGMMSG,?SNDPGMMSG,*; /*-----------------19------------------*/ CMPNV(B) P_LEN,19/LO(RTN); CPYBLA MSGDTA1(3:2),'19'; CVTHC MSGDTA1(9:160),PS; CPYBLA MSGDTA1(178:80),PS; CPYBLAP S_MSGDTA,MSGDTA1,' '; CALLX SNDPGMMSG,?SNDPGMMSG,*; /*-----------------END-----------------*/ /********************************************************************/ /* Message information Area */ /********************************************************************/ DCL SPCPTR QINSEPT BASPCO POS(1) ; DCL SYSPTR SNDPGMMSG BAS(QINSEPT) POS(H'010AC1'); DCL SPCPTR ?S_1 INIT(S_MSGID); DCL SPCPTR ?S_2 INIT(S_MSGF); DCL SPCPTR ?S_3 INIT(S_MSGDTA); DCL SPCPTR ?S_4 INIT(S_MSGL); DCL SPCPTR ?S_5 INIT(S_MSGTY); DCL SPCPTR ?S_6 INIT(S_MSGCMQ); DCL SPCPTR ?S_7 INIT(S_MSGCSC); DCL SPCPTR ?S_8 INIT(S_MSGKEY); DCL SPCPTR ?S_9 INIT(S_MSGERR); DCL DD S_MSGID CHAR(7) INIT(' '); DCL DD S_MSGF CHAR(20) INIT(' '); DCL DD S_MSGDTA CHAR(260); DCL DD S_MSGL BIN(4) INIT(260); DCL DD S_MSGTY CHAR(10) INIT('*INFO'); DCL DD S_MSGCMQ CHAR(20) INIT('*'); DCL DD S_MSGCSC BIN(4) INIT(1); DCL DD S_MSGKEY BIN(4) ; DCL DD S_MSGERR BIN(4) INIT(0); DCL OL ?SNDPGMMSG(?S_1,?S_2,?S_3,?S_4,?S_5,?S_6,?S_7,?S_8,?S_9) ARG; RTN: PEND ; +--- | This is the MI Programmers Mailing List! | To submit a new message, send your mail to MI400@midrange.com. | To subscribe to this list send email to MI400-SUB@midrange.com. | To unsubscribe from this list send email to MI400-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: dr2@cssas400.com +--- +--- | This is the MI Programmers Mailing List! | To submit a new message, send your mail to MI400@midrange.com. | To subscribe to this list send email to MI400-SUB@midrange.com. | To unsubscribe from this list send email to MI400-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: dr2@cssas400.com +---
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.