Please enable JavaScript to view this site.

Navigation: Cobwebb Hot Keys Menu

Calling the Docstore Hot Key program

Scroll Prev Top Next More

In order to use the configured Docstore Hot Keys you will need to modify your program to add a Function Key to the Display File and a call to the EXCDOCHK program in the Program.

The EXCDOCHK program has 6 Parameters and an Error code, the same as Cobwebb Standard Exit Programs, which should be populated as follows:

Program Parameters

Parameter

Attribute

Description

Parm1

A (132)

The Program Name to match the Docstore Hot Key entry.

Parm2

A (132)

The Key ID to match the Docstore Hot Key entry.

Parm3

A (132)

Data from the program to match the Docstore Key (Label) configured for the P3 field for the Docstore Hot Key entry.

Parm4

A (132)

Data from the program to match the Docstore Key (Label) configured for the P4 field for the Docstore Hot Key entry.

Parm5

A (132)

Data from the program to match the Docstore Key (Label) configured for the P5 field for the Docstore Hot Key entry.

Parm6

A (132)

Data from the program to match the Docstore Key (Label) configured for the P6 field for the Docstore Hot Key entry.

Error

Z (1,0)

Error code to return to calling program. For your use if you wish to cater for errors.

0 = Success

1 = Failure

Example

The following example is for an Invoice to be retrieved and assumes that a Docstore Hot Key has been configured with a Program Name = OE345 and a Key ID = 08.

Display File Changes

Change the Display File source as follows to add a Function Key e.g. F8 in this example.

A                                      CF08(08 'Docstore Invoice')      

A                              23  5'F8=Docstore'  

A                                      COLOR(BLU)  

Program  Changes            

In the program after the EXFMT command you will need to check for the use of the Function Key and call the EXCDOCHK program passing in the relevant parameters. In this case the Invoice Number is coming from the INVNO field in the existing program e.g.

RPGLE - Old Style

C spec

    C                   If        *in08 = *on

    C                   Call      'EXCDOCHK'

    C                   Parm      'OE345'       P1              132

    C                   Parm      '08'          P2              132

    C                   Parm      INVNO         P3              132

    C                   Parm      ' '           P4              132

    C                   Parm      ' '           P5              132

    C                   Parm      ' '           P6              132

    C                   Parm      0             ErrCod            1 0

    C                   EndIf                                    

RPGLE - Free

Additional D spec

    * Execute Docstore Hot Key Program

    D EXCDOCHK     PR             ExtPgm('EXCDOCHK')

    D   P1                  132A Const

    D   P2                  132A Const

    D   P3                  132A Const

    D   P4                  132A Const

    D   P5                  132A Const

    D   P6                  132A Const

    D   ErrCod                1 0 Const

C spec

  If *in08 = *on;

     CallP EXCDOCHK('OE345':'08':InvNo:' ':' ':' ':0);

    EndIf;