IMPORT in CICS
The IMPORT command copies the contents of a CICS® data queue into QMF temporary storage or into the database.
IMPORT a QMF query or procedure into the database
- 1 The value set in your profile is used.
- 2 For an object being replaced, the current value is left unchanged. Otherwise, the value set in this global variable is used.
IMPORT a QMF form into the database
- 1 The value set in this global variable is used.
- 2 The value set in your profile is used.
- 3 For an object being replaced, the current value is left unchanged. Otherwise, the value set in this global variable is used.
Description
- objectname
- The name for the QMF object
in the database.
If the object name is too long to fit on the QMF command line, issue the command from a command prompt panel. The name does not need to be delimited by quotation marks when continued on multiple lines on the panel.
- tablename
- The name of a table, view, synonym, or alias.
If the object name is too long to fit on the QMF command line, issue the command from a command prompt panel. The name does not need to be delimited by quotation marks when continued on multiple lines on the panel.
- queuename
- The name of a CICS data
queue containing the QMF object.
The maximum length of the name is:
- QUEUETYPE
- Indicates the type of data queue containing the QMF object. There is no default for QUEUETYPE;
it must be specified.
- TS
- A CICS temporary storage queue
- TD
- A CICS transient data queue
- ACTION
- Indicates whether to replace the entire database table with the imported data or to append the imported data to the existing table.
- LANGUAGE
- Indicates whether QMF keywords
contained within the imported form are recorded in English or in the
current NLF session language.
A QMF form containing QMF keywords in English can be used in any QMF session. A QMF form containing QMF keywords in any other national language supported by QMF can be used only in a session of that same national language.
- SUSPEND
- Specifies the action to take when the data queue is busy or unavailable.
- NO
- Cancels the import request.
- YES
- Waits until the data queue is available.
- CONFIRM
- Indicates whether a confirmation panel is displayed when this command will replace an existing object in the database.
- SHARE
- Determines whether other QMF users can access the imported object.
- COMMENT
- Stores a comment with the imported object. A comment
is a remark or note that you can create when you import the object.
The purpose of creating a comment is to provide descriptive information
about the object. Users with whom the object is shared can then view
this information by pressing the Comments key when the object is displayed
in a list.
You cannot replace a comment on a table you do not own or on a remote table using a three-part name.
- value
- The character string that makes up the content of the comment.
A value that contains blank characters must be surrounded with delimiters. Valid delimiters for a comment value are single quotation marks, parentheses, and double quotation marks. If you are using the IMPORT command from the QMF command line or in a procedure to store a comment with the object, the comment text can be up to 78 single-byte characters. If you are using the IMPORT Command Prompt panel to enter the comment, the comment can be up to 57 single-byte characters.
When the comment itself contains a delimiter character (a single quotation mark, double quotation mark, or parentheses), surround the entire comment with one of the other types of delimiters so that QMF saves the entire comment.
- SPACE
- Names a storage space to hold any tables that are created by the SAVE DATA command. A blank value specifies that you will use the space that is chosen by the database manager program.
- ACCELERATOR
- Specifies the name of the accelerator in which the table will be created.
Usage notes
- Use of TSO data sets in CICS is not recommended. However, if you do choose to use TSO data sets, there are additional customization steps required to support both IMPORT and EXPORT commands. TSO data sets referenced by the IMPORT command under CICS must be defined as either partitioned (with a data set organization, or DSORG, value of PO) or physical sequential (DSORG=PS).
- A QMF administrator can import a QMF object for another user.
- The queue must contain a single, complete QMF object before the IMPORT command is issued.
- When data is imported, a new form is created. Any existing form in temporary storage is replaced.
- You cannot import reports, charts, or CSV data.
- If you are connected to a remote location, the tables at the server are read-only. Objects cannot be imported into that database.
- When you import into the database and an object
already exists with the same name you specify, QMF replaces or appends the object (according
to the value of the ACTION parameter), subject to these conditions:
- If you are importing a table containing an XML column, ensure that the column contains well-formed XML documents. Ensure that all characters in the XML columns to be imported are supported by the XML parser. The data you are importing must conform to the QMF XML format. XML data can only be imported when you are connected to a database release that supports the XML data type.
- When the data is in XML format, the maximum length of a data row to be imported is 2 GB.
- When you import into an existing table, the column names and labels remain unchanged. If the table does not exist, a new table is created using the column names and labels in the imported object.
- If your current location is a Db2® for z/OS® server, you can import to an existing table at a remote location by specifying a three-part name for the table. (However, you cannot import a new table or any QMF objects this way.) If your database administrator has set up QMF to use the multirow fetch feature, both databases you are working with (local and remote) must be Db2 for z/OS if you are using three-part names; otherwise, your command will fail. QMF commands with three-part names cannot be directed to DB2® for VM or VSE databases.
- Use the IMPORT command sparingly in CICS because it can negatively affect QMF performance for other users.
- The contents of a CICS TD queue are discarded when errors occur during an import. Be sure to use the correct object type for the object currently in the queue. A mismatch will result in an empty queue and no object imported.
- QMF handles CICS TD
queues differently than CICS TS
queues:
- Transient data queues
- QMF imports
the entire transient data queue, possibly creating a long delay prior
to displaying the object. The entire object must fit into your storage
or spill file.
- An intrapartition TD queue can hold up to 32 KB rows of data.
- An extrapartition TD queue can be as large as needed to hold the object.
- Temporary storage queues
- A temporary storage queue can hold up to 32 KB rows of data. When importing DATA from a CICS TS queue, QMF pauses to display the report after retrieving the number of rows indicated by the DSQSIROW parameter. You can complete the import by issuing a BOTTOM command. If there is not enough storage to complete the report, use the QMF RESET command to reset the data.
- The ability to import a table that contains LOB data is controlled by the DSQEC_LOB_SAVE global variable.
- To use this command with columns that contain DECFLOAT data, the processor on which QMF is running must support decimal floating-point instructions.
- QMF updates the Last Used field for the object when you use this command. This field appears on object list panels displayed by the LIST command. You can change the list of commands that cause the field to be updated by setting the DSQEC_LAST_RUN global variable.
- When you issue an IMPORT TABLE command that references an unqualified table or view name, QMF sends the unqualified name to Db2 for resolution. Db2 uses the value in the CURRENT SCHEMA register to qualify the table or view name. QMF allows you to set the value of this register using the SET CURRENT SCHEMA statement.
- When you issue the IMPORT TABLE command with the ACTION=REPLACE parameter and the data to be imported contains column label information, QMF creates labels on the new table if the database supports the LABEL ON statement. If the database does not support the LABEL ON statement, the new table is created without column labels.
- When you import into an existing table, the column names and labels remain unchanged. If you issue the IMPORT TABLE command with the ACTION=REPLACE or ACTION=APPEND parameter, and the existing table is a temporal table, the table remains temporal. When you import a table, new values are created for columns that were defined with the GENERATED ALWAYS attribute.
- If you issue the IMPORT TABLE command and the specified table does not exist, a new table is created using the column names and labels in the imported object. You cannot import a table into a new temporal table. When you import into a new table, the table is created with new values for columns that were defined with the GENERATED ALWAYS attribute.
- You cannot specify both the SPACE and the ACCELERATOR parameter in the same command.
- If the SPACE or ACCELERATOR parameter is used in the command and the table already exists, SPACE or ACCELERATOR is ignored. The table is re-created at the original location.
- The value of the DSQEC_SAV_ALLOWED global variable
determines the default behavior of the SPACE and ACCELERATOR parameters:
- When the global variable is set to 0, the SAVE DATA command cannot not be used.
- When the global variable is set to 1, tables are saved only to the database, and only the SPACE parameter is allowed. If the SPACE parameter is not specified, the value is taken from the QMF profile.
- When the global variable is set to 2, tables are saved only to the accelerator, and only the ACCELERATOR parameter is allowed. If the ACCELERATOR parameter is not specified, the accelerator name that is specified in the DSQEC_SAV_ACCELNM global variable is used.
- When the global variable is set to 3, tables are saved by default to the database and are saved to the accelerator only when the ACCELERATOR parameter is specified. If neither the SPACE parameter nor the ACCELERATOR parameter is specified, the value of the SPACE setting from the QMF profile is used.
- When the global variable is set to 4, tables are saved by default to the accelerator and are saved to the database only when the SPACE parameter is specified. If neither the SPACE parameter nor the ACCELERATOR parameter is specified, the accelerator name that is specified in the DSQEC_SAV_ACCELNM global variable is used.
- Accelerator-only tables are created in the database defined in the DSQEC_SAV_ACCELDB global variable. The Q.PROFILES.SPACE value is not used when defining accelerator-only tables.
Examples
- To display a prompt panel for the QMF IMPORT
command:
IMPORT ?
- To copy the data queue VTAB to the table REYNOLDS.VISIONS:
IMPORT TABLE REYNOLDS.VISIONS FROM VTAB (QUEUETYPE=TD
- To copy the data queue QUERY.A to the query REYNOLDS.QUERYA:
IMPORT QUERY REYNOLDS.QUERYA FROM 'QUERY.A' (QUEUETYPE=TS