Development > Script dictionary > Scripts > Subprograms 

This function is used to capitalize on the information related to the reusable sub-programmes and functions.

It is purely a knowledge base. This is also used to make a sub-program accessible during the generation of the web services.

  

Prerequisite

SEEREFERTTO Refer to documentation Implementation

Screen management

Entry screen

Presentation

Close

 

Fields

The following fields are present on this tab :

Block number 1

  • File (field PRG)

Process code. It must be used in the process dictionary.

  • Subprograms (field SUBPRG)

sub-program or function considered as re-usable and as a result to be capitalized on in this dictionary.

  • Description (field ZINTIT)

 

Characteristics

An activity code is used to:

  • Make an element optional in the dictionary if the value associated with the activity code is null
  • Identify the specific/custom elements if they are marked with a code starting with X, Y, or Z
  • Size a maximum number of lines when the activity code marks elements from a grid

If the activity code is disabled:

  • The marked element will not be useable
  • The associated code will not be generated nor activated
  • Module (field MODULE)

Whether the module is active or not has no impact on the execution of the sub-program.

  • Type (field TYPASU)

Used to sort the sub-programs and functions in order to facilitate the search, for better reusability.

The sub-programs and functions should be sorted according to their purpose:

  • Control
  • Entry
  • Selection
  • Update
  • Xsl (processing linked with the screen component)
  • Return of a status
  • Information search
  • Calculation
  • Other

  • field WA

 

  • Web services (field WEBS)

Used to specify that this sub-program or function can be generated for the web services. In fact, no process is shipped that can be directly used for the web services. However, a services web generationfunction is available for the objects and sub-programs identified as being suitable for generation.

  • field PUBNAM

 

Block number 3

  • Function (field FONCTION)

Check box that is used to make the distinction between the functions (called by the instruction Func ) and the sub-programs (called by the instruction Call.)

  • Argument type (field TYPFCT)

This field should be assigned for the functions. The latter should be sorted according to the nature of their return argument.

  • Char
  • Integer
  • Decimal
  • Date
  • etc.

Description

  • field TEXTE

Text loading the PRE "presentation" paragraph, in the record help. In the documentation management, the record help is identified by :

  • documentation type = ASU
  • documentation code = sub-program_process

Grid Parameters

  • No. (field NUMLIG2)

 

  • Code (field PARAM)

Each parameter is identified with a 10 character code (uppercase and numbers). There is no dictionary for these parameters.

  • Description (field ZINTITPAR)

 

  • Type (field TYPPAR)

Nature of the parameter :

  • Char : Character string
  • Integer : Integer number
  • Decimal : Decimal number
  • Date : date
  • Title : Local menu
  • Clob : text
  • Blob : image

 

  • Dim. (field DIME)

Dimension of the parameter

  • Argument type (field ADRVAL)

It indicates how the parameter is passed.

          by address ( a variable is necessary to pass the parameter. On exiting the sub-program, the value of any modified parameter is returned to the calling process).

          by value ( the parameter is passed by a variable or by a constant. On exiting the sub-program, the value of the parameter even if it is modified is not returned to the calling process).

Close

 

Action icon

Parameter Definitions

Button that is used to update the parameters grid following the analysis of the sub-program. The fields loaded automatically are : the parameter code, the type and the argument type. Then it is necessary to complete this grid by entering the parameter title and dimension.

 

Close

 

Reports

By default, the following reports are associated with this function :

 ASUBPROG : Sub-program listing

This can be changed using a different setup.

Specific Buttons

This button is used to copy the sub-program definition to another folder.

This button is active in the sub-programs authorized in Web services. It is only used for the current sub-program in web services.

Menu Bar

Option / Verification

The Coherence verification process for the parameters grid with the sub-program. The number of parameters with errors is then displayed if any exist.

Option / Global verification

The Coherence verification process for the parameters grid with all the sub-programs. A log file is generated at the end of the verification process.

Option / Context of formula assistant

This menu used to access by tunnel to the function "formula assistant context".

Documentation / Paragraphs

This menu item allows access to the documentation management on the first paragraph of the documentation (if there is one) associated with the current record.

Documentation / Links

This menu item allows access to link management. It is used to define the links between the current record and other records (for example, the links between functions and parameters). These links are specific to the documentation and are used to load the generation of documentation structures.

Documentation / Generation

This menu item launches a documentation generation. You can also launch it from the Generation button at the bottom of the screen.

You can launch three types of generation one by one or simultaneously

  • The generation of the documentation structure from the dictionary (ADOCUMENT, ADOCBLB, and ADOCCLB tables)
  • The generation of the documentation from the previous tables
  • The generation of the field documentation

The range suggested by default takes into account the current record, but you can modify it at launch time.

Error messages

In addition to the generic error messages, the following messages can appear during the entry :

Non-existent process

Process does not exist in the current folder or in one of the parent folders.

Reserved code

The entered process code is a code reserved for Adonix, and it therefore cannot be used.

Tables used

SEEREFERTTO Refer to documentation Implementation