19 1 1 3GL Parameters

LANSA Application Design

19.1.1 3GL Parameters

Fixed Parameters

Arguments / Return Value Parameters

Alpha or Numeric Parameter Example

List Parameter Example

Fixed Parameters

The first three parameters of the program are fixed. These are data structures that are passed throughout the LANSA generated applications:

DC@IDS - Information data structure

DC@EDS - Arrays defined in Information data structure

PR@IDS - Process Information data structure

 

The layouts of these data structures (as RPG /COPY members) can be found in members DC@ISPEC, DC@ESPEC, PR@ISPEC and PR@ESPEC in file DC@F28 in the LANSA data library.

You must not vary the content of any of the storage locations defined by these data structures. Any attempt to do this may violate system integrity and produce unpredictable results.

Arguments / Return Value Parameters

BIF arguments and return values defined in file DC@F48 are set up as parameters for the BIF program or subroutine.

Each of these parameters is passed with accompanying parameter(s) (i.e. every entry in file DC@F48 actually causes two (2) or four (4) parameters to be set up and passed to the Built-In Function program or subroutine).

Alpha or Numeric Parameter Example

For an argument or return value defined in file DC@F48 as type A (alpha) or N (numeric), two (2) parameters are set up/passed to the Built-In Function:

  • The first is a 4 character descriptor. It is formatted "llld" where "lll" is the length and "d" is the number of decimals in the argument / return value specified in the LANSA USE command. This value is often useful because it allows the BIF to determine the actual length of the argument / return value in the LANSA USE command.
  • The second is the actual argument or return value. Its length and type matches the maximum length definitions in file DC@F48. Type N (numeric) variables are always passed in packed decimal format.
    For example:

     C     *ENTRY    PLIST

     C               PARM        DC@IDS

     C               PARM        DC@EDS

     C               PARM        PR@IDS

     C               PARM        B$555A  4  <--  Descriptor

     C               PARM        B@555A  3

     C               PARM        B$555B  4  <--  Descriptor

     C               PARM        B@555B 10

     C               PARM        B$555C  4  <--  Descriptor

     C               PARM        B@555C  1

List Parameter Example

For an argument or return value defined in file DC@F48 as type 'L' (list), four (4) parameters are set up/passed to the BIF:

  • The first is a decimal 7,0 field. This field contains the maximum number of entries allowed in the list. The value is set from the list definition in the RDML function that uses this Built-In Function.
  • The second is a decimal 7,0 field. This field contains the current count of entries actually in the list. This value is set by RDML function. It comes from the number of entries that are actually used by the function before invoking this Built-In Function.
  • The third is a decimal 7,0 field. This field points to a "current" entry in the list. Normally this entry has no meaning within a Built-In Function and it should not be referenced or altered.
  • The fourth is the actual list. This field is a multiple occurrence data structure (in RPG terms). This field is the data passed by, or about to be passed to, an RDML function as a working list.

For example:

C  *ENTRY    PLIST

C            PARM        DC@IDS

C            PARM        DC@EDS

C            PARM        PR@IDS

C            PARM        LXnnnB  70 <--  Maximum Entries

C            PARM        LCnnnb  70 <--  Total Entries

C            PARM        LPnnnb  70 <--  Current Entry

C            PARM        LLnnnB     <--  Actual List