PMS Information Systems
Welcome to PMS Information Systems - IBM i (AS/400) Forum !!!

Get Answers for all your queries on IBM i (AS/400).

ALL TYPES OF CONTEXTS ARE EXPLAINED

View previous topic View next topic Go down

ALL TYPES OF CONTEXTS ARE EXPLAINED

Post  maran on Fri Dec 30, 2011 5:23 pm

1. The "DB1" (DATABASE FILE 1) Context
Description
The DB1 context contains the fields which are in the first, or only,
format of the AllFusion 2E access path to which An AllFusion 2E function
attaches.
Any field on the access path format will be available in the DB1
context.
Function types
The DB1 context is available in the action diagram of all function
types which update the database, both after reading a database file and
before writing to the database.

2. The "PGM" (PROGRAM) Context
Description
The PGM context contains AllFusion 2E system fields that control the
execution of An AllFusion 2E function, such as the '*Program mode' The
PGM context is fixed and additional fields may not be added to it.
The fields that appear in the PGM context are defined by An AllFusion
2E system file called '*Program data', and are as follows:-

3. The "JOB" (JOB) Context

Description
The JOB context contains system fields that supply run time information
about the job executing the HLL program which implements a AllFusion
2E function, for example, the user name, the job name and the job
start time. The JOB context is fixed and additional fields may not be
added to it.
Fields in the JOB context may be used only for input to other
functions. They cannot be changed.

4. The "PAR" (PARAMETER) Context

Description
The PAR context contains the fields that have been defined as
parameters for the current function, i.e. the function whose action
diagram you are editing.
Function parameters are specified using the 'EDIT FUNCTION PARAMETERS'
display. Defining a field as An AllFusion 2E function parameter
automatically adds it to the PAR context of the function.
Input parameters to the current function will only be available in
the PAR context where they can be input parameters to other functions,
and output parameters will only be available as output parameters in
other functions.

5. The "WRK" (WORK) Context

Description
The WRK context contains program variables not described by any
other context, for instance, fields required for calculations within a
program.
Any field in the field dictionary may be used as a work field.
Additional user-defined fields may be added to the WRK context by
adding the field to the field dictionary, using the AllFusion 2E
'DEFINE OBJECTS' display.

6. The 'LCL' (Local) Context

Description
The LCL context contains program variables which can be used in a
similar way to the 'WRK' (Work) context, which is for the temporary
storage and retrieval of data, for calculations, for program control,
etc. The difference between LCL and WRK is that the LCL context has a
local scope to the function in which it is used (that is, each individual
function whether internal of external has its own separate sequence
of LCL fields independently of all other functions), whereas the WRK
context has global scope within an external function (that is, there is
only one sequence per program).
Any field in the field dictionary may be used as a local field.
Additional user-defined fields may be added to the LCL context by
adding the field to the field dictionary, using the AllFusion 2E
'DEFINE OBJECTS' display.

7. The 'NLL' (Null) Context
Description
The NLL context is a convenient target for output parameters from a
function call which are not required for further processing.
Only output parameters may be directed to the NLL context

8. The "CND" (CONDITION) Context
Description
The CND context enables you to specify that a particular AllFusion
2E field condition value is to be supplied as field value either:-
a. As a parameter to An AllFusion 2E function.
b. As the condition which controls a condition or iteration construct
in the action diagram.
All field conditions attached to An AllFusion 2E field will be
available in the CND context for that field.

9. The "CON" (CONSTANT) Context
Description
The CON context contains any constant or literal values that you
wish to specify.
The CON context may only be used to specify input values to AllFusion
2E fields. Furthermore, it may not be used for AllFusion 2E fields
of type 'Status' (STS) (you should use the CND context for STS fields).
1. Numeric constants must be less than or equal to 10 characters in
length, including the decimal point and sign, if any. The maximum
number of characters allowed to the right of the decimal point is
5.
2. Alphanumeric constants must be less than or equal to 20 characters
in length.

10. The "DTL" (DETAIL) Context
Description
The DTL context contains the fields which are either on the screen
display of An AllFusion 2E device function that has a single, non-subfile,
detail screen display attached to it (e.g. 'Edit record' or
'Prompt Record'), or on the first detail screen of An AllFusion 2E
device function that has a multi-part screen design attached to it
(e.g. 'Edit Record (2 screens)').
All the fields from the AllFusion 2E Access path associated with the
AllFusion 2E function will be available in the DTL context. Any parameters
which are mapped to the screen (mapped or restrictor parameters)
and the *CMD key field will also be available. If any function fields
have been added to the first (or only) detail screen display, this
field will be present in the DTL context.

11. The "CTL" (SUBFILE CONTROL) Context
Description
The CTL context contains the fields which are in the subfile control
record of AllFusion 2E device function types which have a subfile
screen display, for example 'Display file' or 'Edit transaction'.
The fields available in the CTL context depend on the type of
AllFusion 2E function type, the AllFusion 2E access path used by that
function, and whether there are 'restrictor parameters' for the function.
In all cases, the *CMD key field and any parameters mapped to the
screen (mapped or restrictor parameters) will be present in the CTL
context.

12. The "KEY" (KEY SCREEN) Context

Description
The KEY context contains the fields which are on the key screen
display of AllFusion 2E device functions that have key screens; for
example 'Edit record'.
All the key fields from the access path being processed by the
AllFusion 2E function will be available in the KEY context, together
with any associated virtual fields. Parameters which are mapped to the
screen (mapped or restrictor parameters) will also be available in this
context. The *CMD key field is always present in the KEY context, but
function fields may not be added to a key screen.

13. The "RCD" (SUBFILE RECORD) Context
Description
The RCD context contains the fields which are in the subfile record
of AllFusion 2E function types which have a subfile screen display; for
example 'Display file' or 'Edit transaction'.
The fields available in the RCD context depend on the type of
AllFusion 2E access path to which the AllFusion 2E function is attached.
In all cases, any parameters mapped to the screen (mapped or
restrictor parameters) will be present in the RCD context, and the
subfile selector field, *SFLSEL, will be present unless it has been
dropped using the 'EDIT FUNCTION OPTIONS' display.
- If the AllFusion 2E access path is of type SPN (Span), the RCD
context contains all the fields from the second format on the
based-on access path.
- If the AllFusion 2E access path is of type RTV (Retrieval) or RSQ
(Resequence), then all the fields on the access path will be
available in the RCD context.

14. Defaulting parameter values

If the function has any undefined parameters, you have the option of
pressing F10 to supply default values for those undefined parameters.
The default values will be supplied as follows:
1. The context used will be taken from the 'Default context' specified in
the subfile control area (which is itself taken from the YDFTCTX model
value but can be changed before you press F10). Available default contexts
are:
- 'LCL' - All parameters will use the LCL context.
- 'WRK' - All parameters will use the WRK context.
- 'NLL' - Output parameters will use the NLL context.
Both and Input parameters will use the LCL context.


avatar
maran
Admin

Posts : 442
Join date : 2009-07-24

View user profile http://pmsinformationsystem.forumotion.net

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum