Alterable Communication Fields [ HP ALLBASE/4GL Developer Reference Manual Vol. 1 ] MPE/iX 5.0 Documentation
HP ALLBASE/4GL Developer Reference Manual Vol. 1
Alterable Communication Fields
You can use the contents of the following fields for interrogation and
display, and you can alter the contents of these fields if required.
*COUNT(n)
Five fields used primarily by the report generator for counting the
number of times a nominated report line group is printed. Each field is
20 characters long with no decimal places, has a type S edit code, and is
right justified.
The five count fields are referenced as *COUNT(1) to *COUNT(5).
You can use these fields as numeric work variables when HP ALLBASE/4GL is
not executing a report. When HP ALLBASE/4GL executes a report, the
values in these fields may change.
*CROSS(n)
Five fields used primarily by the report generator for holding
across-the-page totals of numeric fields. Each field is 20 characters
long, with 2 decimal places, has a type S edit code, and is right
justified.
The five cross totalling fields are referenced as *CROSS(1) to *CROSS(5).
You can use these fields as numeric work variables when HP ALLBASE/4GL is
not executing a report. When HP ALLBASE/4GL is executing a report, the
values in these fields may change.
*ERROR
This field may contain one of the following:
* The text of an HP ALLBASE/4GL message detected while an
application is running.
* The text of an indexed KSAM error message detected while an
application is running.
* The text of an HP ALLBASE/SQL error message detected while an
application is running.
* The text of a message returned by the SQLEXPLAIN command in an SQL
logic block.
You can include the text contained in this field in messages on
application screens.
This field has a type X edit code, is left justified and varies in length
depending on the messages placed in it. *ERROR will only contain the
text of the most recent message. If no messages have been placed in the
communication area field, *ERROR will be blank.
*ERRORDM
This field contains the text of any HP TurboIMAGE/iX message returned by
HP TurboIMAGE/iX. If no error occurs, this field is blank.
This field has a type X edit code, is left justified and varies in length
depending on the messages placed in it.
*FIELDNO
Contains the current screen field number. The field is three characters
long, has a type N edit code, and is right justified.
You can change the contents of this field. Depending on when you change
the contents of the field, the screen processing logic changes as
follows:
If HP ALLBASE/4GL encounters the change after the display processing for
a field, (that is, when *ENTERED is off), HP ALLBASE/4GL displays the
contents of the current field and immediately transfers control to the
field whose number has been placed into *FIELDNO.
If HP ALLBASE/4GL encounters the change after data entry in an input
field, (that is, when *ENTERED is on) HP ALLBASE/4GL checks to see if an
error has been generated. If so, instead of remaining on the current
field (the normal action with an error) HP ALLBASE/4GL transfers control
to the field whose number has been placed into *FIELDNO. This action is
in contrast to setting *NEWTIE or using the TIE command. In this case,
HP ALLBASE/4GL processes the specified field after processing of the
current field has been completed. Changing the value in *FIELDNO enables
you to return the user to a field other than the field that generated the
error.
If you change the value in *FIELDNO in a function called from a function
key, HP ALLBASE/4GL commits the current screen field when the function
exits. Screen processing resumes at the field specified by the new value
in *FIELDNO.
*FILENAME
Contains the external name of the KSAM data file, HP TurboIMAGE/iX data
set, or serial data file currently accessed by HP ALLBASE/4GL. If HP
ALLBASE/4GL is not currently accessing a file or data set, this field
holds the external name of the last data file or data set accessed by the
system.
For HP TurboIMAGE/iX data sets, the name contained in this field is the
external schema data set name.
NOTE The *FILENAME communication area field is not applicable for
temporary serial files. While HP ALLBASE/4GL is accessing a
temporary serial file, the name in *FILENAME is meaningless.
*FILENAME always contains the external name of the file as specified on
the dictionary file definition screen.
*FILENAME is an alphanumeric field.
Dynamic Serial File Naming.
This field also allows you to specify the external name of a serial file
dynamically. To do this you must first specify *FILENAME as the external
name of the file on the dictionary file definition screen. You can then
use the MOVE command to move an MPE/iX file name into the *FILENAME
field. This determines the external name of the file operated on by a
subsequent FILE command using the specified HP ALLBASE/4GL file name.
Normally, HP ALLBASE/4GL appends the group and account name determined by
the current value of the MPE/iX variable HP4DATAPATH to the name in
*FILENAME. If the value in *FILENAME is a fully qualified filename, (that
is, a filename in the form FILE.GROUP.ACCOUNT) HP ALLBASE/4GL does not
prefix the name with the value of HP4DATAPATH.
HP ALLBASE/4GL obtains a file number for a file when you first access it.
This same number is used for each access to the same file until it is
closed. You can close a file with the FILE *CLOSE command. HP
ALLBASE/4GL closes all files automatically at the end of a process. The
value in *FILENAME is only used on the first access to the file when HP
ALLBASE/4GL obtains the file number. Changing the value in *FILENAME has
no effect while the file is open. If you need to access a different
external file using the same HP ALLBASE/4GL file name you must close the
HP ALLBASE/4GL file. You can then move the new external file name into
*FILENAME and access the file again. HP ALLBASE/4GL will automatically
obtain a file number for the new external file and associate it with the
HP ALLBASE/4GL file until it is closed.
*FUNCTION
Contains the current function name. It is blank if HP ALLBASE/4GL is not
currently executing a function. The field is 16 characters long, has a
type K edit code, and is left justified.
*IMSTAT
Contains the HP TurboIMAGE/iX status array, which represents status
information about the last HP TurboIMAGE/iX library procedure performed.
The status array has a repeated count of ten, and each number in the
array has a type S edit code of S and a type I storage code. Each number
has a maximum of six characters, including the + or - sign.
The first value in the status array is the error number returned by the
most recent HP TurboIMAGE/iX library procedure executed. This error
number value is also contained in the *IOSTATDM communication area field.
The meaning of status arrays for each HP TurboIMAGE/iX library procedure
can be found in the HP TurboIMAGE/iX Database Management System Reference
Manual. Refer to chapter 10 of this manual for a list of the common
library procedures initiated by HP ALLBASE/4GL.
*INDEXNO
Contains the number of the file index to be used for all subsequent
accesses of the application's KSAM data files or HP TurboIMAGE/iX data
sets. If you want to access the application data files or data sets via
differing index numbers, you must set this field to the required value
before each file access. The field is two characters long, has a type N
edit code, and is right justified.
If you don't set this field, HP ALLBASE/4GL assumes access is to be via
the primary index.
Initially, *INDEXNO is set to 1. Once you set this field, HP ALLBASE/4GL
does not reset its value.
*IOSTATDM
Contains the error number returned by the most recent call to an external
data manager.
Currently, this communication area field only contains error message
numbers from the HP TurboIMAGE/iX data manager. The value in this field
is zero if no error occurs. If errors do occur, this field contains a
number corresponding to the condition encountered.
The error number is taken from the first part of the HP TurboIMAGE/iX
status array, which represents status information about the last HP
TurboIMAGE/iX library procedure performed. The meaning of the error
numbers for each HP TurboIMAGE/iX library procedure can be found in the
HP TurboIMAGE/iX Database Management System Reference Manual. Refer to
chapter 10 of this manual for a list of the common library procedures
initiated by HP ALLBASE/4GL.
The field is five characters long, has a type S edit code, a type I
storage code, and is right justified.
*IOSTATUS
Contains the error message number returned by the HP ALLBASE/4GL data
manager after each access to a file. The value in this field is zero if
no error occurs. If errors do occur, this field contains a number
corresponding to the condition encountered.
An error may also be returned by HP ALLBASE/SQL or HP TurboIMAGE/iX. In
this case, one or more of the following communication area fields may
contain error details: *ERROR for HP ALLBASE/SQL, or *ERROR, *ERRORDM,
*IMSTAT, and *IOSTATDM for HP TurboIMAGE/iX.
The type of error and number returned depend on the data file type.
Refer to appendix C for a list of these conditions.
The field is six characters long, has a type N edit code, and is right
justified.
*LOCKWAIT
Contains a numeric value that determines the time in seconds that HP
ALLBASE/4GL waits while attempting to access a KSAM file or HP
TurboIMAGE/iX data set that is locked by another MPE/iX process. If HP
ALLBASE/4GL cannot access the file within the time determined by the
current value in *LOCKWAIT, the data manager returns an error condition.
For HP TurboIMAGE/iX data sets, HP ALLBASE/4GL attempts to access the
locked file once every second for the number of seconds specified.
If the value in *LOCKWAIT is zero, HP ALLBASE/4GL attempts to access a
locked file once every second for five seconds before returning an error
condition.
A value of -1 in *LOCKWAIT means that HP ALLBASE/4GL waits indefinitely
to access a locked file. A value of less than -1 is invalid.
*LTRACE
A numeric field used for turning on and off trace mode. When set to a
non-zero value, causes HP ALLBASE/4GL to activate the trace mode
facility. When set to zero, the trace mode facility is turned off. The
same rules apply for trace mode asfor using the -i option when invoking
HP ALLBASE/4GL; for instance, runtime systems and developr and administ
applications cannot be traced. See chapter 13 for more details on trace
mode.
EXAMPLE:
MOVE "1" *LTRACE
NOTE Trace mode is now on.
MOVE "0" *LTRACE
NOTE Trace mode is now off.
*MSGDELAY
A numeric field used for changing the number of seconds HP ALLBASE/4GL
will wait after a message is displayed before continuing processing. Any
positive integer can be moved into this field to signify the number of
seconds to wait. HP ALLBASE/4GL default delay time is three seconds.
Moving a value of zero into this field will cause HP ALLBASE/4GL to
display the message and continue processing immediately.
*NEWTIE
Contains number of the next screen field to be processed. It is used
when the next screen field to be processed is not necessarily the next
field in sequence on the screen. For example, after testing the contents
of a field you may want to skip over one or more fields.
Setting this field performs the same function as the logic command TIE.
The field is three characters long, has a type N edit code, and is right
justified.
*PAGELINE
Contains the number of the current print line on the page of a report.
The field is six characters long, has a type N edit code, and is right
justified.
*PAGENO
Contains the current page number of a report. The field is four
characters long, has a type N edit code, and is right justified.
*PASS
A general purpose alphanumeric field used for passing arguments and
results.
The logic command CHECK places data into *PASS. The CHECK command places
the matching position number in a validation table or a file record into
*PASS if it finds a match. If no match is found, the CHECK command
places zero into *PASS.
The *PASS field takes on the characteristics (length, edit code and
justification) of the data stored in it.
The *PASS communication area field is identical to scratch-pad field
*P00.
*PROCESS
Contains the current process name. The field is 16 characters long, has
a type K edit code, and is left justified.
*RECNO
Contains the record number of the HP TurboIMAGE/iX data set record or
fixed length serial data file record just read or written. The value in
*RECNO is undefined after HP ALLBASE/4GL accesses other file types.
*REPORT
Contains the current report name. It is blank if HP ALLBASE/4GL is not
executing a report. The field is 16 characters long, has a type K edit
code, and is left justified.
*ROUTINE
Contains the current external routine name. It is blank if no external
routine is called. The field is 16 characters long, has a type X edit
code, and is left justified.
*ROWCOUNT
Contains a number indicating the number of rows that HP ALLBASE/SQL
processes as the result of a command that changes an HP ALLBASE/SQL
table.
The value in this field is the same as the value in the HP SQL
communication area (SQLCA) field SQLERRD.
*SCREEN
Contains the current screen name. It is blank if HP ALLBASE/4GL is not
displaying a screen. The field is 16 characters long, has a type K edit
code, and is left justified.
When HP ALLBASE/4GL displays a window on a screen, the value in *SCREEN
becomes the name of the current window.
*TOTALS(n)
A set of 16 fields used primarily in the report generator for holding the
totals of the values of numeric fields and for accessing these totals for
the current control break level. Each field is 20 characters long with
two decimal places, has a type S edit code, and is right justified.
The 16 totalling fields are referenced as *TOTALS(1) to *TOTALS(16).
You can use these fields as numeric work variables when HP ALLBASE/4GL is
not executing a report. When HP ALLBASE/4GL is executing a report, the
values in these fields may change.
MPE/iX 5.0 Documentation