Jump to page titleUNITED STATES
hp.com home products and services support and drivers solutions how to buy
» contact hp

:

more options
 

hp.com home
End of Jump to page title
[DATATRIEVE] Debugging Tool For PL/I CALLABLE DTR32 Coding (Example)
Jump to content



» 

business support center

Home & Home Office Support:
» HP branded products
» Presario branded products
» Services & Warranties
Small & Medium Business Support:
» Small & Medium Business products
» Small & Medium Business services
Support for IT Professionals:
» Enterprise products (IT Resource Center)
» NonStop enterprise products
» Business & IT Services
Content starts here
Copyright (c) Digital Equipment Corporation 1987, 1986. All rights reserved
DATE: OCT-1986


OVERVIEW:

This article contains a procedure that is useful for debugging PL/I
Callable Datatrieve programs.  It includes the DAB that can be found in
another Digital Software Information Network article (use the keyword DAB).
It prints out the most helpful information from the DAB:

           DAB$L_CONDITION value and its associated text.
       Message Buffer and Auxiliary Buffer
       Stallpoint text

    Use this call liberally after Callable Datatrieve functions:
     CALL TRANSLATE ('Some text string to describe program locations');
*/

TRANSLATE: PROCEDURE (TEXT);

     %INCLUDE '[DEMO.DTR.CALLABLE]DAB.PLI';
     DECLARE ( TEXT, STALL) CHARACTER (20);
     DECLARE CONDITION_TEXT CHARACTER(63);
     DECLARE MSGLEN FIXED BINARY (15);
     %INCLUDE SYS$GETMSG;
     %INCLUDE $STSDEF;
     DECLARE LIB$STOP EXTERNAL ENTRY (ANY VALUE);

     STS$VALUE = SYS$GETMSG( DAB$L_CONDITION, MSGLEN, CONDITION_TEXT,,);
     IF ^STS$SUCCESS THEN CALL LIB$STOP( STS$VALUE);

     IF (DAB$W_STATE = 1) THEN STALL = 'DTR$K_STL_CMD';
     IF (DAB$W_STATE = 2) THEN STALL = 'DTR$K_STL_PRMPT';
     IF (DAB$W_STATE = 3) THEN STALL = 'DTR$K_STL_LINE';
     IF (DAB$W_STATE = 4) THEN STALL = 'DTR$K_STL_MSG';
     IF (DAB$W_STATE = 5) THEN STALL = 'DTR$K_STL_PGET';
     IF (DAB$W_STATE = 6) THEN STALL = 'DTR$K_STL_PPUT';
     IF (DAB$W_STATE = 7) THEN STALL = 'DTR$K_STL_CONT';
     IF (DAB$W_STATE = 8) THEN STALL = 'DTR$K_STL_UDK';
     IF (DAB$W_STATE = 9) THEN STALL = 'DTR$K_STL_END_UDK';

     PUT SKIP EDIT (TEXT, 'DAB$L_CONDITION IS: ', DAB$L_CONDITION,
          CHARACTER(CONDITION_TEXT,MSGLEN),
          'MSG_BUFF is:   ', CHARACTER( MSG_BUFF, DAB$W_MSG_LEN),
          'AUX_BUFF is:   ', AUX_BUFF,
          'STALLPOINT is: ', STALL)
          (SKIP, A, A, B4, SKIP, A, SKIP, A, A, SKIP, A, A, SKIP, A, A);

     RETURN;
END TRANSLATE;



buy online or call 1.800.AT.COMPAQ
privacy statementusing this site means you accept its terms