The remaining components of the formatted dataview definition display are as follows:
For each variable length item in an SQL dataview, a two‑byte long field for the length is generated in front of the data. This field is not shown in the display. The programmer needs to account for this field only in non‑CA Ideal subprograms. Refer to the CALL statement in the Command Reference Guide.
Numeric fields can be internally represented in packed decimal, zoned decimal, or binary formats. CA Ideal can operate on most of these directly, performing internal conversions when necessary (floating point formats are not supported). Numeric fields are viewed in terms of decimal (base 10) digits and are fully defined by the total number of integer and decimal places, regardless of internal storage formats. CA Ideal performs all necessary internal conversions on both input and output.
The CA Ideal format for DB2 numeric columns is shown under the CH/DG entry.
The following example shows the type, internal type, and ChDg values for 5 fields.
|
Type (Type) |
I (Internal Type) |
Ch/Dg (Characters/digits) |
|
X |
|
42 |
|
X |
|
16 |
|
N |
P |
7 |
|
N |
Z |
10.3 |
|
D |
P |
5 (not valid for SQL access) |
In the above example, 42 in the Ch/Dg column for the first alphanumeric field (Type X) indicates a length of 42 characters; and 16 for the next alphanumeric field indicates a length of 16 characters. A numeric field (Type N) with 7 specified in the Ch/Dg column indicates a seven‑digit field able to hold seven integer places. Since the internal type is P (packed), the actual size of the field is four bytes ((7 1)/2 = 4). The next numeric field, with 10.3 specified in the Ch/Dg column, indicates a 13‑digit field able to hold ten integer places and three decimal places. Since the internal type is Z (zoned), the actual size of the field is 13 bytes. A date field (Type D) with 5 specified in the Ch/Dg column can hold an internal 5‑integer date value of up to 273 years from the base year.
SQL numeric fields display as follows:
|
|
T (Type) |
I (Internal Type) |
Ch/Dg (Characters/digits) |
|
INTEGER fields |
N |
B |
9 |
|
SMALLINT fields |
N |
B |
4 |
|
DECIMAL fields |
N |
P |
actual length |
|
NUMERIC fields |
N |
Z |
actual length |
SQL date and time fields display with a comment and the following attributes:
|
|
T (Type) |
Ch/Dg (Characters/digits) |
|
DATE fields |
X |
10 |
|
TIME fields |
X |
8 |
|
TIMESTAMP fields |
X |
26 |
A field with an unsupported data type displays as type X and a warning message is issued.
If a number displays in this column (and there is no DEP ON clause in the Value/Redef/Dep on column), it represents the number of times an item (group or elementary field) that repeats a fixed number of times, occurs.
An item (group or elementary field) can also occur a variable number of times. In this case, the Occur column value represents the maximum number of occurrences, and a DEP ON clause appears in the Value/Redef/Dep on column. The DEP ON (Depending on) field name is specified in the Value/Redef/Dep on column with the clause DEP ON field‑name.
The Depending on field is a non‑repeating elementary numeric field with no decimal positions that is located in this dataview preceding the DEP ON clause. At runtime, the Depending on field specifies the actual number of occurrences at any point during the run.
If the field is not a full or partial key, there is no entry in this column.
For example, in a dataview where KEY1 consists of FIELD1 and KEY2 consists of FIELD2,FIELD3, the corresponding dataview display identifies the three fields as follows:
FIELD1 K (full key) FIELD2 P (partial key) FIELD3 (no entry)
Since only the high order portion of a multi‑field key can be a partial key, FIELD3 is not a partial key.
If a key has 65 or more FIELDs defined in the dictionary, CA Ideal only recognizes the first 64 FIELDs, and lists only the first as a partial key.
All of the keys, primary and alternate, are listed at the end of the field layout.
Note: For read-only (R) dataviews (UPDATE‑INTENT=N), only condition name (Type C) values display since initial value has no meaning for a read‑only dataview.
Note: For each nullable item, CA Ideal generates a two‑byte indicator variable. This variable is not shown in the display. The programmer needs to account for this field only in non‑CA Ideal subprograms.
Use the PRINT command or the PRINT prompter to print a specific dataview definition. To display the PRINT prompter (as it applies to dataview definitions), select option 7 on the Dataview Menu. The following screen contains an example of the PRINT prompt screen.
=> IDEAL: PRINT OCCURRENCE DVW SYS: DOC PROMPTER PRINT DVW ________________________________ VERSION PROD (1) (2) (3) DEST LIB _____________________________________________________________ (4) (5) COPIES 1 NAME ________ DISP REL DESC ________________________________ (6) (7) (8) (9) ----------------------------------------------------------------------------- (1) DVW = Dataview PNL = Panel (2) Name (3) nnn (4) Destination: MEM = Member RPT = Report PROD LIB=Output library
OUT = Ouput SYS = System LAST SYS=System printer
PGM = Program USR = User NET=Network printer
PLA = Plan MAI=Mail
(5) Destination name (6) # Copies (7) Name of output
(8) Disposition: REL = Release, KEE = Keep, HOL = Hold
(9) Description (must be in quotes!)
The PRINT DATAVIEW command has the following format:
{ * }
PRINT {DATAVIEW dvw‑identifier }
{ }
[ {MAIL 'email‑id' }]
[DESTINATION {LIB }]
[ { {SYS } }]
[ { {NET } dest‑id [COPIES nn]}]
[NAME print‑output]
[ {KEEP }]
[DISPOSITION {RELEASE }]
[ {HOLD }]
[DESCRIPTION 'string']
* Represents the current dataview and can be substituted for the dataview identification phrase.
Identifies the name of the dataview. The dvw‑identifier includes different parts, depending on the type of dataview to identify:
For SQL dataviews Specify the dvw‑identifier as:
authid (SQL only)-The one‑ to eight‑character authorization ID required for SQL dataviews only.
dvw‑nam-The 1‑ to 18‑character name of the dataview.
For CA Datacom/DB native access, sequential, and VSAM dataviews Specify the dvw‑identifier as:
dvw‑name-The 1‑ to 18‑character name of the dataview.
ver-The version of the dataview. The specified version must be in test or production status. If you specify dvw‑name and you omit the version clause, the default version specified in the SET VERSION command is used. Valid versions are:
Tnnn-The version number of a test dataview modeled in the dictionary (CA Datacom/DB native command access and modeled sequential files only).
T-Represents test status
nnn-The one‑ to three‑digit version number assigned to a production dataview or an unmodeled dataview in test or production status.
PROD-The production status version of the dataview.
Note: Unmodeled dataviews created before CA Ideal r2.2 are recognized as version 1, PROD status.
Specifies the output destination.
MAIL 'email‑id'-A delimited 1 to 60 character name of a CA‑ eMail destination.
LIBRARY-The output library.
SYSTEM dest‑id-A system printer name.
NETWORK dest‑id-A network printer.
Specifies the number of copies to print on a system or network printer.
Note: This clause is ignored in batch. For a VSE system printer, this clause is ignored both online and in batch.
Specifies the name assigned to the output if the destination is to the output library.
When the destination of an online print request is a system or network printer, the output is placed in the output library, and the DISPOSITION clause has the following effects:
KEEP-The job prints and a copy of the output is retained in the output library.
RELEASE-The job prints and no copy of the output is retained in the output library.
HOLD-The output is held until released.
When a print request is issued in batch and the destination is a system printer, the output is printed on the system printer and no copy is retained in the output library.
When a print request is issued (online or in batch) and the destination is the output library, output is placed in the output library for browsing at the terminal.
For more information about output disposition, see the Working in the Environment Guide.
A 1‑ to 32‑character description of the output, enclosed in delimiters. For a description of valid string delimiters, see the Command Reference Guide.
For more information about CA Ideal PRINT command, see the Command Reference Guide.
|
Copyright © 2015 CA Technologies.
All rights reserved.
|
|