HP 3000 Manuals

PACKFMT [ HP Business BASIC/XL Reference Manual ] MPE/iX 5.0 Documentation


HP Business BASIC/XL Reference Manual

PACKFMT 

The PACKFMT statement is a list of variables that are to be packed or
unpacked by the PACK and UNPACK statements.  You can also specify the
number of characters to be skipped between data values.

Syntax 

PACKFMT [REALV] pack_item [, pack_item]...

Parameters 

REALV            The default real data type in a native mode program is
                 an IEEE floating point real format.  Therefore, you must
                 specify "REALV" in the PACKFMT statement if the MPE V
                 real data format is desired.  The keyword, "REALV" will
                 be ignored on MPE V.

pack_item        One of the following:

                  *  Scalar numeric variable.

                  *  Scalar string variable.

                  *  Substring.

                  *  String or numeric array.

                  *  Space specifier:  SKIP number.

                  *  String or numeric literal.

                  *  Numeric literal type converted with one of the
                     following built in functions:
                       SINTEGER
                       INTEGER
                       SREAL
                       REAL
                       SDECIMAL
                       DECIMAL

                 where number is a positive short integer numeric
                 constant that specifies the number of characters
                 skipped.  The skip feature is used to bypass unneeded
                 data in a data set.  For the PACK USING and UNPACK USING
                 statements, that number of characters (bytes) are
                 skipped in the specified str_var.  For the DBGET USING,
                 DBPUT USING and DBUPDATE USING statements that number of
                 characters is skipped in the implicit str_var.  In both
                 cases, use of this option can save time when accessing a
                 subset of the variables in a data set.

Examples 

The following example shows the PACKFMT statement.  It declares the
variables, and then specifies three PACKFMT statements.

     100 INTEGER Number,Times(4)
     110 DIM String$[10],A$[10]
     120 PACKFMT Number,String$,A$[6],Times(*)
     130 PACKFMT Times(*),SKIP 2,String$,SKIP 5,Number,SKIP 1,A$[1;5]
     140 PACKFMT 2, INTEGER(7.2),"wow"



MPE/iX 5.0 Documentation