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

BATCH MODE COMMANDS

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

The following pages show the syntax and description of the batch mode commands that FORMSPEC accepts in a command file or job stream. Table 7-1 “FORMSPEC in Batch Mode Commands” gives a summary of the batch mode commands, a brief description of their functions, and the interactive counterpart for each command.

Note that each command must be entered on a separate line and a command may not carry over to the next line. Leading blanks may be used for indentation. You can also use blank lines between commands to make the command file easier to read. Comments may be inserted anywhere in a command file. They may be more than one line long, but they must be delimited by double arrows comment.

Table 7-1 FORMSPEC in Batch Mode Commands

Command

Function

Interactive Counterpart

Batch Mode Commands

COMPILE

Compiles the current forms file.

Selection X on the FORMSPEC Main Menu.

COPY

Copies forms within the current forms file, or from another file to the current forms file.

Selection C on the FORMSPEC Main Menu.

DELETE

Deletes a form from the current forms file.

Selection D on the FORMSPEC Main Menu.

EXIT

Terminates FORMSPEC in batch mode.

Function key f8 in any menu.

FIELD

Updates field attributes.

Field attributes specified on the FORMSPEC Field Menu.

FILE

Declares the current forms file.

Forms file name on the Forms File Menu.

FKLABELS

Creates or updates function key label strings.

FORMSPEC form-specific Function Key Menu.

FORMS

Prints summary information on the current forms file as well as for each or all the forms therein.

No interactive counterpart for this command.

LIST

Lists a form or all the forms on the standard list device.

Selection L on the FORMSPEC Main Menu.

RELATE

Establish family relation between two forms.

Selection R on the FORMSPEC Main Menu.

RENUMBER

Renumbers fields within a form.

No interactive counterpart for this command.

SELECTLANG

Updates native language specifications.

FORMSPEC Terminal/Language Menu.

SELECTTERM

Updates terminal and device specifications.

FORMSPEC Terminal/Language Menu.

ARB Commands

ARBTOSCREEN

Set data type conversion defaults from ARB to screen.

Select defaults on FORMSPEC Data Type Conversion Menu.

SCREENTOARB

Sets data type conversion rules from screen to ARB.

Set defaults on FORMSPEC Data Type Conversions Menu.

DELARB

Deletes an ARB.

Select DEL on the FORMSPEC ARB Menu.

GENARB

Generates an ARB from a form.

Select GEN on the FORMSPEC ARB Menu.

ADDARBFIELD

Adds a field to the ARB.

Select ADD on the FORMSPEC Restructure ARB Menu.

DELARBFIELD

Deletes a field from the ARB.

Select DEL on the FORMSPEC Restructure ARB Menu.

MODARBFIELD

Modifies the attributes an ARB.

Select MOD on the FORMSPEC ARB Menu.

MOVEARBFIELD

Moves a field or group of fields around on the ARB.

Select MOVE on the FORMSPEC Restructure ARB Menu.

RENAMEARBFIELD

Changes the name of an ARB field.

Select RENAME on the FORMSPEC Restructure ARB Menu.

 

COMPILE

Compiles the current forms file.

Syntax

COMPILE [INTO fastfile]

Parameters

fastfile

is the name of the fast forms file to which all code records are copied. Since a fast forms file contains only records needed by VPLUS/V intrinsics at run-time, it may be advantageous to compile the forms file into a fast forms file. If fastfile already exists and it is a fast forms file, it is replaced with this version. If fastfile already exists and it is not a fast forms file, an error occurs. The current forms file still compiles, but the code records are not copied to a fast forms file. If fastfile does not exist, it is created for you as a fast forms file.

Discussion

Normally the COMPILE command only compiles the forms that have been modified in the current forms file. However, when certain global attributes (such as save fields) are modified, all forms in the current forms file are compiled. The fast forms file, if specified, contains code records for all forms in the current forms file.

Example

COMPILE

compiles the current forms file.

COMPILE INTO INVFFORM.PUB

compiles the current forms file and creates a fast forms file named INVFFORM in the PUB group.

COPY

Copies a form within the current forms file, or copies a form from another forms file to the current forms file.

Syntax

[COPY form {TO newform
IN file [TO newform]}]

Parameters

form

is the name of the form to be copied.

newform

is the name of the new form in the current forms file to which form will be copied. The newform cannot already exist in the forms file. If newform already exists, an error will occur and no copying will be done. If TO newform is omitted, the new form created in the current forms file will have the same name as the form it was copied from.

file

is the name of the forms file, if form is not in the current forms file.

Example

     COPY PARTS TO PARTS2

copies FROM the form PARTS in the current forms file TO the new form PARTS2.

     COPY PARTS IN INVFORMS TO PARTS2

copies FROM the form PARTS in the forms file INVFORMS TO the new form PARTS2 in the current forms file.

     COPY PARTS IN INVFORMS

copies FROM the form PARTS in the forms file INVFORMS TO the new form PARTS in the current forms file.

DELETE

Removes a form from the current forms file.

Syntax

       DELETE form

Parameters

form

is the name of the form to be removed from the current forms file. If form does not exist, FORMSPEC will issue a warning and proceed to the next command.

Example

     DELETE ORDER2

removes the form ORDER2 from the current forms file.

EXIT

Terminates FORMSPEC in batch mode.

Syntax

        EXIT

Discussion

The EXIT command is optional. FORMSPEC will also terminate after the last command in the command file is executed.

FIELD

Updates field attributes.

Syntax

                         {,newfieldname}
{,enhancement }
FIELDform {fieldtag } {,fieldtype }
{oldfieldname} {,datatype }
{,initialvalue}

Parameters

form

is the name of an existing form within the current forms file.

fieldtag

tag assigned to the field in form screen design.

oldfieldname

name currently assigned to the field in the field menu.

newfieldname

replacement field name.

enhancement

replacement display enhancement code.

fieldtype

replacement field type.

datatype

replacement data type.

initialvalue

replacement initial value. If $EMPTY is entered in the first six positions of the parameter, initial value is cleared.

Discussion

The first two parameters of this command identify the field to be updated. The remaining parameters are the actual updates. The field menu update parameters (newfieldname...initialvalue) may be longer than the corresponding number of character positions available on the Field Menu in interactive FORMSPEC, in which case the input parameter is truncated (i.e., treated as command documentation).

Example

      FIELD PARTS a_b_ c A _ B_C_CODE,NONE,R,,D

Updates field menu selections for field a_b_c of form PARTS. Specifically, the field name is set to A_B_C_ CODE, the field display enhancement code is set to NONE (for no enhancements), the field type value is set to R (for required), and the data type value is unchanged. The initial value for the field is set to the character D.

FILE

Specifies the current forms file to be used.

Syntax

         FILE file

Parameters

file

is the name of the forms file to be used by subsequent batch mode commands. The file is referred to as the current forms file.

Discussion

The FILE command must precede all other commands in a command file or job stream. This command opens the specified forms file to be operated on by the other batch mode commands. Only one forms file can be modified at a time (only one current forms file at a time). However, more than one forms file can be operated on in one command file or job stream as long as a FILE command precedes any operations on that file. Note that a FILE command specifying a new current forms file closes the previous current forms file and opens the new current forms file. Termination of FORMSPEC automatically closes the current forms file.

If the file specified does not already exist, it is created. A message indicating that the file was created is issued.

Example

      FILE INVFORMS.PUB

opens the forms file INVFORMS in the PUB group to be operated on by other batch mode commands.

FKLABELS

Updates function key labels.

Syntax

        FKLABELS form [\keylabel ... \keylabel]

Parameters

form

is the name of an existing form within the current forms file.

keylabel

literal which is to appear in the function key label. If $EMPTY is entered as the first six characters of keylabel, the existing key label is cleared.

Discussion

The FKLABELS command creates (if none exist) or updates function key labels for the specified form. The first 16 characters of the keylabel literal are used for the label. Only the first eight keylabels are used.

Example

      FKLABELS STAF_SALARY  Start      Over$EMPTY Exit Planner

Updates labels for function keys 2, 5 (which is cleared), and 8 in form STAFF_SALARY. Existing labels for function keys 1,3,4,6, and 7 are not updated.

FORMS

Prints a summary listing for the forms in the current forms file.

Syntax

[FORMS [form]
[@ ]]

Parameters

form

The name of an existing form within the current forms file for which summary information is to be printed. If omitted, a summary of the current forms file is printed.

@

The commercial at sign (@) specifies that summary information for all forms, as well as the current forms file, is printed.

Discussion

The FORMS command prints the name of each form, the number of fields in the form, the number of bytes in the screen image, the number of children that the form has, and the name of the form's parent form, if any. If a form name (form) is included with the FORMS command, an extended summary is generated for the form. The extended summary includes all of the form information listed above. In addition, for each field in the form, the FORMSPEC assigned field number, data buffer offset (in bytes, one relative), and field length (in bytes) is printed. If the commercial at sign (@) is used for form, an extended summary is generated for each form in the forms file. See the examples below for samples of the three types of summary listings available.

Although all FORMSPEC output is normally directed to $STDLIST, you may want to redirect this output separately to the line printer. To do so, use the MPE :FILE command to redefine the formal file designator, FORMOUT, as follows:

      :FILE FORMOUT;DEV=LP

The FORMS command prints a maximum of 60 lines per page. This maximum can be changed by setting the JCW.

     FORMSPECLINESPERPAGE

See Appendix E for more information.

The FORMS command is a very useful bath mode command. When FORMS is used after the forms file has been updated, the listing can be used to quickly check that the resulting forms in the file are the correct ones.

This command also provides useful reference information when coding (or modifying) an application data buffer that has to match the layout of the fields in a form.

Example

FORMS

prints a summary of the current forms file, SYSADMIN in this example:

Forms file: SYSADMIN.ACCTG.FINANC                                 Page 1
File last modified: WED, MAY 14, 1986, 1:58 PM
File last compiled: WED, MAY 14, 1986, 1:58 PM

NUMBER LARGEST NUMBER OF:
OF FIELD BYTES IN
FORM NAME FIELDS NUMBER NEXT FORM SCREEN CHILDREN PARENT FORM
----------- ------ ------ ----------- ------- -------- -----------
ACCOUNT_MGRS 5 5 $HEAD 114 0
SYSTEMZ-USERS 5 5 @HEAD 98 0

Example

FORMS SYSTEM_USERS

Prints a summary of the form specified, SYSTEM_USERS in this example:

Forms File: SYSADMIN.ACCTG.FINANC                                 Page 1
File last modified: WED, MAY 14, 1986, 1:58 PM
File last compiled: WED, mAY 14, 1986, 1:58 PM
             NUMBER LARGEST                  NUMBER OF:
OF FIELD BYTES IN
FORM NAME FIELDS NUMBER NEXT FORM SCREEN CHILDREN PARENT FORM
----------- ------ ------ ----------- ------- -------- -----------
SYSTEM_USERS 5 5 $HEAD 98 0
Forms File: SYSADMIN.ACCTG.FINANC                                 Page 2
             SCREEN  BUFFER
LENGTH LENGTH FIELD LENGTH BUFFER
FORM NAME (bytes) (bytes) FIELD NAME NUMBER (bytes) OFFSET
----------- ------ ------ ------------------ ------- ------- -------
SYSTEM_USERS 168 33 **** Compiled for: HP264X
USER_NAME 1 8 0
ACCOUNT_NAME 2 8 8
HOME_GROUP 3 8 16
PORT_NUMBER 4 4 24
PHONE_EXTENSION 5 5 28

****End of compiled forms listing. ****

Example

FORMS @

Prints a summary of the current forms file, (SYSADMIN) as well as the summary information for each form in the forms file, two in this example:

Forms File: SYSADMIN.ACCTG.FINANC                                 Page 1
File last modified: WED, MAY 14, 1986, 1:58 PM
File last compiled: WED, mAY 14, 1986, 1:58 PM
             NUMBER LARGEST                 NUMBER OF:
OF FIELD BYTES IN
FORM NAME FIELDS NUMBER NEXT FORM SCREEN CHILDREN PARENT FORM
----------- ------ ------ ----------- ------- -------- -----------
ACCOUNT_MGRS 5 5 $HEAD 114 0
SYSTEM_USERS 5 5 $HEAD 98 0
Forms File: SYSADMIN.ACCTG.FINANC                                 Page 2
             SCREEN  BUFFER
COMPILED LENGTH LENGTH FIELD LENGTH BUFFER
FORM NAME (bytes) (bytes) FIELD NAME NUMBER (bytes) OFFSET
----------- ------ ------ ------------------ ------- ------- -------
ACCOUNT_MGRS 155 68 **** Compiled for: HP264X
ACCOUNT_NAME 1 8 0
MGR_LAST_NAME 2 20 8
MGR_FIRST_NAME 3 15 28
DEPARTMENT 4 20 43
PHONE_EXTENSION 5 5 63
SYSTEM_USERS 168 33 **** Compiled for: HP264X
USER_NAME 1 8 0
ACCOUNT_NAME 2 8 8
HOME_GROUP 3 8 16
PORT_NUMBER 4 4 24
PHONE_EXTENSION 5 5 28

****End of compiled forms listing. ****

Number of errors = 0 Number of warnings = 0

LIST

Lists a specified form or all forms on the list device.

Syntax

        LIST [form]

Parameters

form

is the name of the form in the current forms file to be listed. When form is not specified, all forms in the current forms file are listed.

Discussion

The LIST command can be used to provide documentation for a forms file. The forms are usually listed on the line printer. The LIST command can also be used to list forms to a disc file to be examined. To do so, use the MPE :FILE command to redefine the formal file designator FORMLIST as shown below:

     :FILE FORMLIST=MYFILE;DEV=DISC;SAVE;NOCCTL

will list forms to the disc file, MYFILE. The SAVE keyword specifies that MYFILE be saved as a permanent file. The NOCCTL keyword indicates that no carriage control characters are written to the file. (See the MPE Commands Reference Manual(30000-90009), for more information on the MPE:FILE command.)

The LIST command prints a maximum of 60 lines per page. This maximum may be changed by setting the JCW.

     FORMSPECLINESPERPAGE

See Appendix E for more information.

Example

     LIST

lists all forms in the current forms file on the list device.

     LIST PARTS

lists the form PARTS in the current forms file on the list device.

RELATE

Creates a family relationship between two existing forms.

Syntax

       RELATE childform TO parentform

Parameters

childform

is the name of the form which is to become the child form. It must already exist, and not be related to any other form.

parentform

is the name of the form which is to become the parent form. It must already exist, and have the identical form design as the childform specified with the childform parameter.

Example

     RELATE FORM1 TO FORM2

Establishes a family relationship between FORM1 and FORM2 where FORM1 is the child form, and the FORM2 is the parent form.

RENUMBER

Renumber fields to screen order.

Syntax

RENUMBER form

Parameters

form

is the name of the form containing the fields to be renumbered.

Discussion

The fields in the form specified by form are renumbered in accordance with screen order, left to right, top to bottom. If your application depends on field numbers, be sure to update your application to reflect the changed field numbers. If the fields are already numbered in screen order, a message is returned and the fields are not renumbered.

For family forms, the parent form must be specified; all family members are then automatically renumbered. Again, if your application depends on field numbers, be sure to update your application, in this case, for all family members. If you specify the name of a child form, the fields are not renumbered. Instead, a message is returned stating the form was not renumbered because it is a child form and indicating the name of the parent form.

Example

RENUMBER FORM1

Renumbers the fields in FORM 1 in screen order.

SELECTLANG

Updates native language specification.

Syntax

        SELECTLANG      [formsfilelangID] [,FORMSPEClangID]

Parameters

formsfilelangID

Set forms file native language specification.

FORMSPEClangID

Set FORMSPEC native language specification.

Discussion

Only the first three characters of each parameter are used. Refer to "Setting Language ID Number" in Section 8 for more information. At least one parameter must be specified.

If no parameters are provided, existing native language specifications are retained,

Example

     SELECTLANG 8

Native language ID 8, German, is specified for the forms file.

     SELECTLANG ,O

Native language ID 0, Native-3000, is specified for FORMSPEC. The native language specified for the forms file is retained.

SELECTTERM

Updates forms file terminal or device specifications.

Syntax

        SELECTTERM     [262xand239x] [,color] [,264x] [,307x]

Parameters

262xand239x

Configure forms file for the HP 262X and HP'239X terminal families; also includes the HP 150.

color

Configure forms file for color terminals.

264x

Configure forms file for the HP 264X terminal family. Specifying yes (the value Y or y) enables function key labeling.

307x

Configure forms file for the data capture device family. Specifying eight (the value 8) enables support of the extended features of the HP 3081A.

Discussion

The parameters may be any valid non-blank character to select the terminal family. Only the first character of each parameter is processed (the rest is treated as command documentation).

At least one parameter must be specified. Providing a USASCII blank as the specification for a given device/terminal family does not change the existing specification. Specifying $EMPTY clears an existing specification.

Example

      SELECTTERM x,,y

Forms file is configured for HP 262X/239X terminals, the HP 150, and HP 264X terminals, with HP 264X function key labeling enabled. Existing color specification, if any, is retained.

      SELECTTERM ,x,$EMPTY,8

Forms file is configured for color terminals and HP 307x terminals, with HP 3081A features enabled. HP264X specification is cleared and existing HP262X/239X/150 specification, if any, is retained.

Feedback to webmaster