CRTDSPF Command syntax diagram
Purpose
The Create Display File (CRTDSPF) command creates a display device file. The device file contains the file description, which identifies the device used and, optionally, the record formats used by the device (if specified in data description specifications (DDS)); the device file does not contain data. The display device file sends records to one or more display devices associated with the device file, and to receive records from the display devices.
The display file description contains of information that is specified in two places: (1) in the source file that contains the DDS (if used); and (2) in the CRTDSPF command. The DDS contains the specifications for each record format in the device file and for the fields in each record format.
The Change Display File (CHGDSPF) or Override Display File (OVRDSPF) command is used in a program to change or override the parameter values specified in the display file description; the override command must be run before the display file is opened by the program. Overridden values are changed only for the running of the program; once the program ends, the original parameter values specified for the display file are used.
| Note: | If an application program attempts to acquire a work station on a switched line and the line connection has been lost or has never been established, the application program waits indefinitely until the connection is established. |
Required Parameter
The name of the file can be qualified by one of the following library values:
*CURLIB: The file is created in the current library for the job. If no library is specified as the current library for the job, the QGPL library is used.
library-name: Specify the name of the library where the file is created.
display-device-file-name: Specify the name of the display device file.
Optional Parameters
*NONE: There is no DDS source file for this display device file; either the display device file has only one record format with no fields, or the program that uses the file must describe the record formats and their fields.
The name of the source file can be qualified by one of the following library values:
*LIBL: All libraries in the job's library list are searched until the first match is found.
*CURLIB: The current library for the job is searched. If no library is specified as the current library for the job, the QGPL library is used.
library-name: Specify the name of the library to be searched.
source-file-name: Specify the name of the source file that contains the DDS for this display device file.
*FILE: The source file member name is the same as the device file name specified in the FILE parameter.
source-file-member-name: Specify the name of the member in the source file specified by SRCFILE that is used to create the display device file.
| Note: | The underlined values for this parameter are similar to, but not actually default values, and therefore, cannot be changed with the CHGCMDDFT (Change Command Default) command. |
Source Listing Options
*SRC or *SOURCE: A printout of the source statements used to create the file and errors that occur is created.
*NOSRC or *NOSOURCE: No printout of the source statements is created unless errors are detected. If errors are detected, they are listed along with the record format containing the error.
Program Listing Options
*LIST: An expanded source printout is created, showing a detailed list of the file specifications that result from the source statements and references to other file descriptions.
*NOLIST: An expanded source printout is not created.
Second-Level Message Text Options
*NOSECLVL: The messages section of the data description specifications (DDS) listing does not contain the second-level message text for the errors found during DDS processing.
*SECLVL: Second-level message text is included in the source listing.
Event File Creation Options
*NOEVENTF: The compiler does not produce an event file for the CoOperative Development Environment/400 (CODE/400) product.
*EVENTF: The compiler produces an event file that can be used by the CODE/400 product. The event file is created as a member in the file EVFEVENT in your object library. The CODE/400 product uses this file to offer error feedback integrated with the CODE/400 editor. This value is normally specified by the CODE/400 product on your behalf.
| Note: | This parameter applies only to messages created while processing DDS source statements. Messages created elsewhere in the file creation process are not affected by this parameter. |
20: If errors occur in the DDS source with a severity level greater than or equal to 20, the file is not created.
severity-level: Specify a severity level ranging from 0 through 30. The file is not created if the severity level specified for this parameter equals 0 or is less than the severity level that occurs in the data description specifications (DDS) source. This value must be greater than or equal to value specified on the FLAG parameter.
0: The spooled file is owned by the original user profile of the job. If the job has switched to a new user profile, the original user profile is still the owner of the spooled file.
severity-level: Specify the minimum severity level of messages to be listed. Valid values range from 0 through 30. The severity level specified must be less than or equal to the severity level specified on the GENLVL parameter.
*REQUESTER: The device from which the program is called is assigned to the file when the file is opened.
device-name: Specify the names of one or more display devices used with this device file to pass data records between the users of the devices and the system. Each device name must already be known on the system by a device description before this device file is created. *REQUESTER can be specified as one of the names. Up to 50 names can be specified in this command, but the total number cannot exceed the number specified on the MAXDEV parameter.
*NONE: No device name is specified. The name of the display device must be specified later in a CHGDSPF or OVRDSPF command, or in the HLL program that opens the file.
The names of the devices are specified in the DEV parameter of this command, in a later CHGDSPF or OVRDSPF command, or in the HLL program that opens the file.
1: Only one device name, or *REQUESTER, can be specified for this display device file.
number-of-devices: Specify the maximum number of devices that are connected to this display file at the same time. Valid values range from 1 through 256.
*YES: The data for the display file is shown using any enhanced capabilities available on the display station. These capabilities can include mnemonics, selection cursor, and graphical window borders.
*NO: The data for this display file is shown as it would be on a 5250 display station. No enhanced capabilities that are available on the display, such as mnemonics, selection cursor, or graphical window borders, are used. This value is normally used to preserve character-based interaction across all display stations.
*NO: The data being shown by this file is not saved when the file is suspended. When control is returned to the programs using this file, the data is not restored.
*YES: The data being shown when the file is suspended is saved so it can be shown on the display when the file is used again.
*YES: When the program issues a write request, control is returned after the buffer is processed. The data may not be shown immediately; the actual display of the data may take place later when a read or combined write/read operation is performed. The buffer is then available to be prepared for the next read or combined write/read operation.
*NO: After a write operation, the user program does not regain control until the input/output operation is completed (with the data displayed and the input/output feedback information available).
*DEVD: The value specified on the CHRID parameter in the device description of the work station on which the application is running, is used. If no CHRID value is specified, the QCHRID system value for the system on which the application is running, is used. No conversion is necessary because the file has the same character identifier as the work station. For a list of valid values, see the table in CHRID description of the CRTDEVDSP command.
*SYSVAL: The system determines the graphic character set and code page values for the command parameters from the QCHRID system values.
*JOBCCSID: The character data is converted, if necessary, from the device CHRID to the CCSID (coded character set identifier) of the job during input, and from the CCSID of the job to the device CHRID on output.
*CHRIDCTL: The system checks the CHRIDCTL job definition attribute to determine whether to use *JOBCCSID or *DEVD on the CHRID command parameter for this file.
Element 1: Character Set
graphic-character-set: Specify the graphic character set values that match the attributes of the display device. Valid values range from 1 through 32767.
Element 2: Code Page
code-page: Specify the code page set values that match the attributes of the display device. Valid values range from 1 through 32767.
*JOB: Use the decimal format value from the DECFMT job attribute when the file is opened.
*FILE: Use the decimal format value stored with the file when the file was created.
*MSG: Use the 'More...' and 'Bottom' text retrieved from messages CPX6AB1 and CPX6AB2 which exist in the current active language of the system when the file is opened.
*FILE: Use the 'More...' and 'Bottom' text that is stored in the file during file creation. This text was retrieved from messages CPX6AB1 and CPX6AB2 which exist in the active language of the system when the file was created.
*NO: The file does not process DBCS data.
*YES: The file processes DBCS data.
RTNDTACAK
*NO: The input buffer will be restored to its original values before it is returned to the application. Any date, time, or timestamp field which has invalid data is replaced in the input buffer with a valid default value.
*YES: The input buffer, which may include values that
did not pass the validity checks, will be returned to the
application. Any date, time, or
timestamp field which has invalid data is replaced in the input buffer
with a valid default value.
*YES: The system processes DBCS extension characters.
*NO: The system does not process DBCS extension characters; it displays extension characters as the undefined character.
| Note: | An immediate allocation of the device by the device resource is required when an acquire operation is performed to the file. |
*IMMED: The program does not wait; when the file is opened, an immediate allocation of the file resources is required.
*CLS: The job default wait time is used as the wait time for the file resources being allocated.
number-of-seconds: Specify the number of seconds that the program waits for the file resources to be allocated to the display device file when the file is opened, or the wait time for the device allocated when an acquire operation is performed to the file. Valid values range from 1 through 32767 seconds.
| Note: | This parameter is also used to specify the time (seconds) that a CL program waits to complete a WAIT command. If a record is not returned from any of the devices that should return a record, an escape message is sent to the CL program. More information on the WAITRCD parameter is in the Receive File (RCVF), Send File (SNDF), Send/Receive File (SNDRCVF), and WAIT (Wait) command descriptions. |
*NOMAX: There is no limit on the time the system waits for the completion of the operation.
*IMMED: The program does not wait for the read-from-invited-device operation for the completion of the file. A record must be available from an invited program device when the read-from-invited-program-device operation is performed. If a record is not already available when the read-from-invited-program-device operation is performed, a notify message is sent to the program.
number-of-seconds: Specify the number of seconds that the program waits for the completion of the read-from-invited-device operation. Valid values range from 1 through 32767.
| Note: | Keyed data queues are not supported for this parameter. If a keyed data queue is specified, a run-time error will occur; but because it is not required that a data queue exist at the time the command is issued, the error will not be flagged. |
*NONE: A data queue does not receive an entry from the system.
The name of the data queue can be qualified by one of the following library values:
*LIBL: All libraries in the job's library list are searched until the first match is found.
*CURLIB: The current library for the job is searched. If no library is specified as the current library for the job, the QGPL library is used.
library-name: Specify the name of the library to be searched.
data-queue-name: Specify the name of the data queue that is to receive an entry from the system when the data-available event is signaled.
More information on shared database files is in the DB2 UDB for AS/400 Database Programming book.
*NO: The ODP created by the program with this attribute is not shared with other programs in the routing step. Every time a program opens the file with this attribute, a new ODP to the file is created and activated.
*YES: The ODP created with this attribute is shared with each program in the routing step that also specifies SHARE(*YES) when it opens the file.
| Note: | When SHARE(*YES) is specified and control is passed to a program, a read operation in that program retrieves the next input record. A write operation produces the next output record. |
*JOB: The SRTSEQ value specified on the job attribute is used.
*LANGIDSHR: The sort sequence table uses the same weight for multiple characters, and is the shared-weight sort sequence table associated with the language specified on the LANGID parameter.
*LANGIDUNQ: The sort sequence table must contain a unique weight for each character in the code page.
*HEX: A sort sequence table is not used. The hexadecimal values of the characters are used to determine the sort sequence.
The name of the sort sequence table can be qualified by one of the following library values:
*LIBL: All libraries in the job's library list are searched until the first match is found.
*CURLIB: The current library for the job is searched. If no library is specified as the current library for the job, the QGPL library is used.
library-name: Specify the name of the library to be searched.
table-name: Specify a table name.
*JOB: The language ID specified in the job description is used.
language-id: Specify a language identifier to be used by the file.
*YES: The level identifiers of the record formats are checked when the file is opened. If the level identifiers do not match, an error message is sent to the program that requested the open, and the file is not opened.
*NO: The level identifiers are not checked when the file is opened.
*LIBCRTAUT: The public authority for the display file is taken from the value on the CRTAUT parameter of the target library (the library that is to contain the display file). The public authority is determined when the display file is created. If the CRTAUT value for the library changes after the display file is created, the new value does not affect any existing objects.
*CHANGE: The user can perform all operations on the display file except those limited to the owner or controlled by object existence authority and object management authority. The user can change and perform basic functions on the display file. Change authority provides object operational authority and all data authority.
*ALL: The user can perform all operations except those limited to the owner or controlled by authorization list management authority. The user can control the object's existence, specify the security for the object, change the object, and perform basic functions on the object. The user also can change ownership of the display file.
*USE: The user can perform basic operations on the display file, such as running a program or reading a file. The user cannot change the display file. *USE authority provides object operational authority, read authority, and execute authority.
*EXCLUDE: The user cannot access the display file.
authorization-list-name: Specify the name of the authorization list used.
| Note: | The existing file cannot be replaced if it is in use by this job or another job. |
*YES: The existing display file is replaced by the one being created.
*NO: The existing file, if any, is not replaced by the display file.
*SRCMBRTXT: The text is taken from the source file member used to create the printer file. If the source file is a database file, the text is taken from the source member. If the source file is an inline file or a device file, the text is blank.
*BLANK: Text is not specified.
'description': Specify no more than 50 characters of text, enclosed in apostrophes.
Examples for CRTDSPF
Example 1: Specifying Default Optional Parameters
CRTDSPF FILE(DSPHIST) SRCFILE(PRSNNL/JOBHIST)
This command creates a display device file named DSPHIST which is stored in the current library using the source file named JOBHIST that is stored in the PRSNNL library. The defaults for all the other parameters are assumed. Only the device requesting the program that uses this device file (that is, *REQUESTER) is assigned to the device file. The level identifiers of the record formats are checked when the file is opened. The public has only object operational authority for the device file.
Example 2: Specifying DBCS Data Processing
CRTDSPF FILE(IGCDSP) SRCFILE(IGCLIB/IGCSRC) IGCDTA(*YES)
This command creates the display file IGCDSP from the source file IGCSRC in the library IGCLIB. The file processes double-byte character set (DBCS) data.
Error messages for CRTDSPF
*ESCAPE Messages
| [ Information Center Home Page | Feedback | Back to main CL topic ] | [ Legal | AS/400 Glossary ] |