HPlogo HP Data Entry and Forms Management System (VPLUS) Reference Manual: HP 3000 MPE/iX Computer Systems > Chapter 7 USING FORMSPEC IN BATCH MODE

ARB BATCH MODE COMMANDS

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

The following batch mode commands support the ARB feature. They are based on the ARB Menu options provided in interactive FORMSPEC. The commands are summarized below, and each one is described in detail in the rest of this section.

NOTE: In the ARB commands, destination is:

[BEFORE fieldname] or [AFTER fieldname]

The data type conversion commands are:

     ARBTOSCREEN and ARBTOSCREEN

The ARB commands are:

     DELARB and GENARB

The ARB field commands are:

     ADDARBFIELD, DELARBFIELD, MODARBFIELD, MOVEARBFIELD, and RENAMEARBFIELD

Their functions are summarized in Table 7-1 “FORMSPEC in Batch Mode Commands”

ADDARBFIELD

Add a field to the ARB.

Syntax

     ADDARBFIELD arbname fieldname destination

Parameters

arbname

Name of the ARB to which the field will be added.

fieldname

The name of the new field.

destination

Position at which the field is to be inserted. May be left blank.

Discussion

If the arbname doesn't exist, an ARB with this name will be created for the associated form. The ARB cannot contain the fieldname already. If fieldname is not a field on the form, it becomes a filler field, with no datatype and with a length of 1 (this length may be changed using the MODARBFIELD command). If fieldname is on the form, its ARB length and data type are created from its screen attributes and the Data Conversion table (set up using the Data Conversion Menu). If destination is specified, the field will be inserted at that position, otherwise it will be appended to the end of the ARB.

ARBTOSCREEN

Create/update the datatype conversion rules for converting ARB field contents to screen field contents.

Syntax

     ARBTOSCREEN [chartype, inttype, realtype, packtype, zonetype]

Parameters

Title not available (Parameters )

chartype

The conversion type for ARB fields with type CHAR.

inttype

The conversion type for ARB fields with type INT or DINT.

realtype

The conversion type for ARB fields with type REAL or LONG.

packtype

The conversion type for ARB fields with type PACK, PACK0, PACK1,... PACK9, SPACK, SPACK0, SPACK1,...SPACK9.

ZONETYPE

The conversion type for ARB fields with type ZONE, ZONE0, ZONE1... ZONE 9.

Discussion

This command creates/updates the datatype conversion rules for converting ARB data types to screen data type. If a data type update is omitted, then the current default for that type is retained. If no update parameters are specified, all ARB-to-screen conversion types are set to CHAR, the default. Leading commas must be supplied.

Valid data type updates are: CHAR, YMD, MDY, DMY, DIG, NUM(n) NUMA, IMPn IMPA

EXAMPLE

 The command:

ARBTOSCREEN, DIG, NUM

Sets the conversion type for INT and DINT ARB fields to DIG and for REAL and LONG ARB fields to NUM.

DELARB

Deletes the entire specified ARB.

Syntax

     DELARB arbname

Parameters

arbname              Name of the existing ARB.

Discussion

All the fields are deleted. You can generate another ARB for the specified form if required. If extensive changes are made to a form, it is easier to delete the existing ARB and create a new one than to revise the old ARB.

DELARBFIELD

Deletes a specified field from the ARB.

Syntax

     DELARBFIELD arbname fieldname

Parameters

arbname

Name of the existing ARB.

fieldname

Name of the specified field on the ARB.

Discussion

The arbname must exist in the forms file and the fieldname must exist on the ARB.

GENARB

Generates an ARB from the form specified by the formname.

Syntax

     GENARB arbname

Parameters

arbname

Same as the name of the associated form

Discussion

The ARB will contain a field for every field on the form. The data type and length of each ARB field are determined from the screen attributes and the Data Conversion table (set up using the Data Conversion Menu).

MODARBFIELD

Modify the attributes of a field on an ARB.

Syntax

       MODARBFIELD arbname fieldname {[length, type]}

Parameters

arbname

Name of the ARB that contains the field to be modified

fieldname

The name of the field to be modified.

[length, type]

The new ARB field length and/or data type.

Discussion

The arbname must exist in the forms file and the fieldname must exist on the ARB. You can change both the parameters length and type, but you must specify at least one. They must conform to the edit rules (see Section 3).

EXAMPLE

     The command:

MODARBFIELD EMPLOYEE SSNUM, CHAR

changes the ARB data type to CHAR.

MOVEARBFIELD

Move a field or group of fields to a specified position on an ARB.

Syntax

     MOVEARBFIELD arbname range [destination]

Parameters

arbname

The name of the ARB.

range

The field or fields to be moved, expressed as fieldname or fieldname/fieldname.

[destination]

The position in the ARB to which the field(s) will be moved. Can be left blank.

Discussion

The arbname must exist. If the destination is not specified, the field(s) will be appended at the end of the ARB.

EXAMPLE

Suppose the fields in the ARB EMPLOYEE are in this order:

                               NAME
ADDRESS
PHONE
SSNUM
SUPERVISOR

The command:

     MOVEARBFIELD EMPLOYEE ADDRESS/PHONE AFTER SSNUM

or the command:

     MOVEARBFIELD EMPLOYEE SSNUM BEFORE ADDRESS

will rearrange the fields in this order:

                              NAME
SSNUM
ADDRESS
PHONE
SUPERVISOR

RENAMEARBFIELD

Change the name of oldfieldname to newfieldname in the ARB arbname.

Syntax

      RENAMEARBFIELD arbname oldfieldname newfieldname

Parameters

arbname

Name of the ARB that contains the field.

oldfieldname

The current name of the field.

newfieldname

The new game you want to give the field.

Discussion

This command does not change the ARB data type or length. The arbname must exist in the forms file, and the oldfieldname must exist on the ARB. The ARB cannot already contain a field with the newfieldname. If newfieldname is not a field on the form, the renamed field becomes a filler field.

SCREENTOARB

Create/update the datatype conversion rules for generating an ARB from a form.

Syntax

     SCREENTOARB [chartype, datetype, digtype, numtype, imptype]

Parameters

chartype

The conversion type for screen fields with type CHAR.

datetype

The conversion type for screen fields with a date type.

digtype

The conversion type for screen fields with type DIG.

numtype

The conversion type for screen fields with type NUM, NUM0, NUM1... NUM9.

imptype

The conversion type for screen fields with type IMP, IMP0, IMP1,... IMP9.

Discussion

This command creates/updates the datatype conversion rules for generating an ARB from a form. If an update parameter is omitted, then the current conversion type for that parameter is retained. If no update parameters are specified, all screen-to-ARB conversion types are set to CHAR, the default. Leading commas must be supplied.

Valid type updates are: CHAR, YYMMDD, INT, DINT, REAL, LONG, PACKn, SPACKn, ZONEn, PACKA, SPACKA, ZONEA.

EXAMPLE

The command:

         SCREENTOARB, INT, REAL, REAL

sets the conversion type for DIG screen fields to INT, and for NUM and IMP screen fields to REAL.

Feedback to webmaster