PROIV Developer Helper Functions

  

DEVELOPER

There are several critical processes and attributes which require updating that are either too complicated to be adequately covered in this document, or too difficult for the developer to implement without the likelihood of errors.

For this reason, a number of Helper Functions have been provided to ensure that critical PROIV Developer data can be kept updated by third party utilities.

Function Maintenance Help Functions

VIPCHKLG      Parses a single function or Global Logic and updates cross-references

VIPEVENT      Update Logic ID / FnKey on Event Points

VIPLINKS       Rebuild linkage information for a function

VIPTAGRN      Renames the Tag Name of Dynamic, Cycle, Static and Static Groups objects

 

Data Dictionary Maintenance Help Functions

VIPRDVAR      Read dictionary information for a File Variable

VIPWRVAR     Write dictionary information for a File Variable

VIPRNVAR      Rename/copy dictionary information for a File Variable

VIPDLVAR      Delete a File Variable from the dictionary

 

Rebuild File Definitions and Global Logics

VIPFLBLD       Build a File Definition to the Native PROIV files

VIPGLBLD       Build a Global Logic to the Native PROIV files

 

Logic Validation and Cross-References Update

Logic should always be parsed after changes have been made to it. This is to ensure that it is valid, and also to rebuild the dependant cross-reference tables that PROIV Developer uses. The Helper Function VIPCHKLG can be called to parse a single logic line, or the whole logic, and will update the relevant tables.

Helper Function                      VIPCHKLG

Description                  Parses a single Function or Global Logic and updates cross references.

Parameter Type

Variable Name

Dimension

Length

Description

In

$FunctionName

 

32

Name of function

In

#LogicId

 

3

Function Logic ID to parse. value range is 1 to 999.

In

$GlobalLogic

 

32

Name of Global Logic

In

#ParseOnlyLineNumber

 

3

When set, parses this line only. Value range is 1 to 9999.

Out

$LogicIsValid

 

1

Parser Return: Logic Is valid? (Y/N)

Out

$LogicHasLines

 

1

Parser Return: Logic Has Lines? (Y/N)

Out

$ErrorMessage

 

80

Parser Return: Error message

Out

#ErrorLine

 

4

Parser Return: Line at which error was detected

Notes

Logic Assignment and Function Key on Event Points

This Helper Function should be used to update logic assignments on Event Points. It will update the information held on the Structure File, used by the Event view and when determining logic usage, and also the Logic ID’s status information, which is stored on the main Function Definition File.

This Helper Function should also be used to update the Function Key assigned to Dynamic icons and s. In this case it updates the Function Key detail held on the Structure File, which appears by the events view, and writes the Function Key number to the main Dynamic Object Data File, VIPBM05.

Helper Function                      VIPEVENT

Description                  Update Logic ID / FnKey on Event Points

Parameter Type

Variable Name

Dim

Length

Description

In

$FunctionName

 

32

Name of function

In

#LogicId

 

3

The Logic ID to be assigned, or that has had all lines deleted

In

$LogicHasBeenDeleted

 

1

Set to 'Y' when this logic has been physically deleted

In

$UpdateLogicUsedStatusOnly

 

1

Set to ‘Y’ to update/correct the Logic ID Used status on Function header

In

$GlobalLogic

 

32

Name of Global Logic to assign to the Event Point

In

#EventPoint

 

2

Event Point to assign the Logic ID or Global Logic (1 to 30) or 0.

In

$StructureSEQ6

 

6

The Structure Sequence number of the Object being updated

In

$FnKey_ActionControl_CycleTag

 

32

Tag name of the Cycle that the Function Key or Action Control belongs to when updating the Logic ID assigned to it.

In

#FunctionKeyNumber

 

3

Function Key that is being updated or being Assigned

In

$ActiveXObjectTag

 

32

Tag Name of the ActiveX object which is having an event updated

In

$ActiveXObjectInterfaceId

 

4

The ActiveX control’s Interface ID, normally @INTF_P4_ID

In

$ActiveXObjectEventId

 

12

The OS ID of the ActiveX objects event that is being updated. (@AX_PME_OS_ID)

In

$DocFormatGroupTag

 

32

Tag Name of Document Format Group

In

$ActionControlTag

 

32

Tag Name of the overloaded Action Control

Out

$ErrorMessage

 

80

Error message

In

$OpenAjaxEventName

 

200

Open Ajax event name

Notes

When updating an assignment on an Event Point, certain information is required:

Rebuilding Function Linkage Information

There are a number of attributes across the Function Definition Files that are normally monitored by PROIV Developer and are used to generate the Linkage Tables. The data on this file is complex to maintain, and as it is used by the Linkage view and the Export process it should be kept up to date at all times.

Rather than document every attribute that must be monitored, and how to add or remove the data from the Linkage Table, a Helper Function is available that can be called after the function’s data has been changed.

This Helper Function can be called to update the linkage for either or both the function’s objects and logics. Rebuilding logic-based linkages will cause all of the logic in that function to be reparsed, which can be a lengthy process. If logic has not been altered then this part of the process is not necessary and can be disabled. If a few logics have been altered then they can be parsed individually with a separate helper.

Helper Function                      VIPLINKS

Description                  Rebuild Linkage Information for a Function

 

Parameter Type

Variable Name

Dimension

Length

Description

In

$FunctionName

 

32

Name of function

In

$ProcessLogic

 

1

Process logics for linkage information? (Y/N)

Out

$ErrorMessage

 

80

Error message

Notes

This update will also ensure that:

 

Renaming Tags

Renaming tags in PROIV Developer can have wide ranging implications. Cycles and the File Accessors, Static objects associated with that object and logic statements can be all be affected. Tag renaming is a critical process in PROIV Developer and if done so incorrectly can result in corruption of the function.

Due to the complexity of ensuring that all affected objects, as well as PROIV Developer’s cross-reference tables are updated accordingly, the Helper Function VIPTAGRN has been supplied.

Helper Function                      VIPTAGRN

Description                  Renames the Tag Name of Dynamic, Cycle and Static objects

Parameter Type

Variable Name

Dimension

Length

Description

In

$FunctionName

 

32

Name of function

In

$OriginalTagName

 

32

Original Tag Name to rename from

In

$NewTagName

 

32

New Tag Name to rename to

Out

$ErrorMessage

 

80

Error message

Notes

Data Dictionary Maintenance

The Data Dictionary contains all of the File Variables that are used in File Definitions in PROIV Developer. 

The primary function of the dictionary in Native PROIV was to provide the default length, dimension, fill code and special check logic for each variable when it was added to screens or reports.

In PROIV Developer, the dictionary now also holds a default object ‘shape’ for each variable, and this is used when adding that variable as a Dynamic object in a Screen function. The PROIV Developer Dictionary Files can have all the complexity as a Dynamic object in a function; they can have their own unique logics, error messages, interface maps and all of the associated cross references tables. Additionally, the dictionary entries can hold defaults for the external storage requirements for that variable.

At this time, only simple manipulation of the dictionary is available to the developer. The provided Helper Functions allow creation of new dictionary entries, copying of existing dictionary entries to new variable names (rename) and updating of standard dictionary information for the variable.

The Helper Functions are as follows:

VIPRDVAR      Read dictionary information for a File Variable

VIPWRVAR     Write dictionary information for a File Variable

VIPRNVAR      Rename/copy dictionary information for a File Variable

VIPDLVAR      Delete a File Variable from the dictionary

When each of the Helper Functions are called, an error message may be returned to indicate if the variable was not in the dictionary (on read) or already in the dictionary (on rename/copy). It is down to the developer to decide how such an error is acted upon.

 

Helper Function                      VIPRDVAR

Description                  Read dictionary information for a File Variable

Parameter Type

Variable Name

Dimension

Length

Description

In

$VariableName

 

32

Name of the variable to read from the dictionary

Out

$DataType

 

1

Data type of variable

Out

#MaximumLength

 

4

Maximum length of data held in variable

Out

#Dimension

 

4

Dimension (# of entries) of table field

Out

$DisplayCode

 

12

Default display mask of variable used when displaying the data

Out

$FillCode

 

3

Fill code

Out

$StandardValidation

 

32

Special Check or Global Logic name

Out

$HelpMessage

 

74

Default Help message of the variable when displayed in a screen

Out

$LongPrompt

 

32

Long prompt for variable

Out

$ShortPrompt

 

32

Short prompt for variable

Out

$DefaultTag

 

32

Default Tag Name to use when adding variable as a new object

Out

$ObjectCode

 

10

Default PROIV Developer object to create when adding variable as a new Screen object

Out

$ExternalDataType

 

6

Storage type for this variable, if the file is an External type

Out

$ExternalFormat

 

6

Storage format for this variable, if the file is an External type

Out

$AlternateVariableName

 

32

Alternate name of the variable, used to map to a table column

Out

$PermitNullData

 

1

Permit null data when stored on an external database? (Y to allow)

Out

$ErrorMessage

 

80

Error message

Notes


Helper Function                      VIPWRVAR

Description                  Add/Update dictionary information for a File Variable

Parameter Type

Variable Name

Dimension

Length

Description

In

$VariableName

 

32

Name of the variable to read from the dictionary

In

$DataType

 

1

Data type of variable

In

#MaximumLength

 

4

Maximum length of data held in variable

In

#Dimension

 

4

Dimension (# of entries) of table field

In

$DisplayCode

 

12

Default display mask of variable used when displaying the data

In

$FillCode

 

3

Fill code

In

$StandardValidation

 

8

Special Check or Global Logic name

In

$HelpMessage

 

74

Default Help message of the variable when displayed in a Screen

In

$LongPrompt

 

32

Long prompt for variable

In

$ShortPrompt

 

32

Short prompt for variable

In

$DefaultTag

 

32

Default Tag Name to use when adding variable as a new object

In

$ExternalDataType

 

6

Storage type for this variable, if the file is an External type

In

$ExternalFormat

 

6

Storage format for this variable, if the file is an External type

In

$AlternateVariableName

 

32

Alternate name of the variable, used to map to a table column

 

 

 

In

$PermitNullData

 

1

Permit null data when stored on an external database? (Y to allow)

Out

$ErrorMessage

 

80

Error message

Notes

Helper Function                      VIPRNVAR

Description                  Copy Dictionary information for a new/renamed File Variable.

Parameter Type

Variable Name

Dimension

Length

Description

In

$OriginalVariableName

 

32

Name of the variable to read from the dictionary

In

$NewVariableName

 

32

Name of the variable to create in the dictionary

In

$OptionalNewDefaultTag

 

32

Default Tag Name to use when adding the new/renamed variable as a new object

Out

$ErrorMessage

 

80

Error message

Notes

 

Helper Function                      VIPDLVAR

Description                  Delete a File Variable from the dictionary

Parameter Type

Variable Name

Dimension

Length

Description

In

$VariableName

 

32

Name of the variable to read from the dictionary

In

$DeleteVariableEntry

 

1

When 'Y' remove the variable from the dictionary as well as the object defaults

Out

$ErrorMessage

 

80

Error message

Notes

·      This Helper Function deletes the specified variable from the Data Dictionary and returns an error message if the variable is not found.

·      There is an optional input parameter to delete the variable entry from the Data Dictionary. To completely remove the variable and all extended dictionary information for it, the input parameter must be set to ‘Y’.

·      If the parameter is left as null, or set to ‘N’, then only the extended Data Dictionary information is deleted, and the Object Code is reverted to Edit Box. The standard set of information, such as the length and help messages are retained.

Description: Description: caution

Caution should be exercised when using the Delete Variable Helper Function as PROIV Developer normally retains entries for all variables used on File Definitions. The permanent deletion of variables which are used on File Definitions could lead to unexpected problems when using PROIV Developer.

 

Rebuilding File Definitions and Global Logics to Native PROIV

When a File Definition or a Global Logic is altered, it must be built to the native version. There are two Helper Functions supplied to do this, VIPFLBLD for File Definitions and VIPGLBLD for Global Logics.

Both can be called at any time, but it is the responsibility of the developer to check for record locks on the Native versions first.

Helper Function                      VIPFLBLD

Description                  Rebuild File Definition

Parameter Type

Variable Name

Dimension

Length

Description

In

$FileName

 

32

Name of the File Definition to be rebuilt in Native PROIV

Out

$ErrorMessage

 

80

Error Message

Notes


Helper Function                      VIPGLBLD

Description                  Rebuild Global Logic

Parameter Type

Variable Name

Dimension

Length

Description

In

$GlobalLogicName

 

32

Name of the Global Logic to be rebuilt in Native PROIV

Out

$ErrorMessage

 

80

Error message

Notes

Comment on this topic

Topic ID: 500668