IFDISP (HLI function): Difference between revisions

From m204wiki
Jump to navigation Jump to search
(Created page with " ==Summary== <dl> <dt>Description</dt> <dd>The IFDISP call (DISPLAY) returns display output for the specified Model 204 field, file, group, record, or stored procedure. </dd>...")
 
No edit summary
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
The conventions used on this page are described in [[HLI: Function summary#Function call notation conventions|Function call notation conventions]].


==Summary==
==Summary==

Latest revision as of 22:11, 12 July 2016

The conventions used on this page are described in Function call notation conventions.

Summary

Description
The IFDISP call (DISPLAY) returns display output for the specified Model 204 field, file, group, record, or stored procedure.
Thread type
multiple cursor IFSTRT, single cursor IFSTRT
IFCALL function number
60

Syntax

IFDISP(RETCODE,BUFFER,DISP_SPEC)

Compile-only form
Not available
Execute-only form
Not available

Specify the parameters in the syntax order shown above.

Parameter Description
RETCODE [O,i,r] The Model 204 return code is a required output parameter. The code is a binary integer value.
BUFFER

[O,c,r] The buffer location is a required output parameter that specifies the address of the user's data area. The buffer contains the information that is returned by IFDISP for the field, file, group, record, or stored procedure that is specified by the DISP_SPEC parameter. Specify a character string.

Note: The format of the data area is identical to that produced by the DISPLAY command, except that Model 204 inserts semicolons, instead of terminal end-of-line characters, between lines of output. There is no limit to the length of each line.

The maximum length of the display output depends on the host language. If the actual display is longer than the maximum, the display is truncated and no semicolon is appended to the truncated line.

DISP_SPEC [I,c,r] The display specification is a required input parameter that specifies the entity for which information is to be displayed. Specify a character string using one of the following formats:

FIELD [(display-option[,display-option ...])] {ALL | fieldname[,fieldname...]}

where, if you specify ALL, the display options apply to all of the fields in the currently open file, and all the fields are listed.

FILE (display-option[,display-option ...])] {ALL | filename[,filename...]}

where if you specify ALL, the display options apply to all open files, otherwise, the command applies to only those files that are listed.

[PERM | TEMP] GROUP [(display-option[,display-option ...])] {ALL | groupname[,groupname ...]}

where if you specify ALL, the display options apply to all existing permanent groups, otherwise the command applies to only those group that are listed.

RECORD [(NOUSE)]

You can use the record option only in file context.

Note: Alternatively, you can specify the name of a stored procedure to be displayed; do not specify any of the display clauses (keywords FIELD, FILE, GROUP, RECORD) listed above.

For a list of the display options and specifications,see DISPLAY command.

These options are also available for use with the IFDISP call.

Usage notes

Use the IFDISP call to access information about a Model 204 field, record, file, group, or stored procedure from inside a host language program. You can use the IFDISP call on any type of connection to Model 204 from a host language program.

Completion return code (RETCODE)

If the IFDISP call is unsuccessful, Model 204 returns a completion code of 4 if any one of the following error conditions occurs:

  • The parameter syntax is incorrect.
  • A specified field is undefined.
  • The specified file or group is not currently open.

Coding examples

PL/1

The example below shows a PL/1 code excerpt that calls IFDISP to display the names of all the fields for the current file.

DCL IFDISP ENTRY (FIXED BIN(16), CHAR(*) VAR, CHAR(*)); DCL BUFFER CHAR(500) VARYING; . . CALL IFDISP (RETCODE,BUFFER, 'FIELD (NAMES) ALL');

COBOL

The example below shows a COBOL code excerpt that calls IFDISP to display the value of the file characteristics parameters for the file named FILEX.

WORKING-STORAGE SECTION. 01 ARGS-FOR-CALL. 05 RETCODE PIC 9(5) COMP SYNC. 05 BUFFER PIC X(500) VALUE SPACES. 05 DISPLAY PIC X(20) VALUE "FILE (FPARMS) FILEX;". . . . PROCEDURE DIVISION. . . . CALL "IFDISP" USING RETCODE, BUFFER, DISPLAY.