PLIDUMP Subroutine

Purpose

Allows you to create a formatted dump of selected parts of storage used by your program.

Syntax

CALL PLIDUMP (character-string-expression 1,character-string-expression 2);

Parameters

character-string-expression 1 is a dump options character string consisting of one or more of the following:
Note: For compatibility, any valid IBM PL/I character string is allowed, but only the following character string options are allowed.
C Continue. The routine continues after the dump.
S Stop. The enclave terminates with a dump.
T TRACEBACK.

T, and C are the default options.

character-string-expression 2 is a user-identified character string up to 80 characters long that is printed as the dump header.

Description

PLIDUMP dumps information about the calling path to the current location and other data to a formatted dump.

Use one of these output choices to get the maximum amount of information for PLIDUMP.

  • Set CODEWATCH_STBPATH
  • Place the .stb files into the same directory as your the .dlls being executed.

To generate symbols and source line information using PLIDUMP, compile your program with -deb to generate the necessary .stb files. This information is useful when moving from test to production.

Examples

This shows an example of a PL/I routine calling PLIDUMP to produce a Language Environment dump. In this example, the main routine PLIDMP calls PLIDMPA, which then calls PLIDMPB. The call to PLIDUMP is made in routine PLIDMPB.

%PROCESS MAP GOSTMT SOURCE STG LIST OFFSET LC(101);
 PLIDMP: PROC OPTIONS(MAIN) ;

   Declare   (H,I) Fixed bin(31) Auto;
   Declare   Names Char(17) Static init('Bob Teri Bo Jason');
   H = 5;	 I = 9;
   Put skip list('PLIDMP Starting');
   Call PLIDMPA;

     PLIDMPA: 	PROC;
       Declare (a,b) Fixed bin(31) Auto;
       a = 1;	 b = 3;
       Put skip list('PLIDMPA Starting');
       Call PLIDMPB;

         PLIDMPB:  PROC;
           Declare  1 Name auto,
             2 First   Char(12) Varying,
             2 Last    Char(12) Varying;
           First = 'John';
           Last = 'Thompson';
           Put skip list('PLIDMPB Starting');
           Call PLIDUMP('TBFC','PLIDUMP called from procedure PLIDMPB');
           Put Data; 
         End PLIDMPB;
     End PLIDMPA;
 End PLIDMP;

Restrictions

None.