Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 3 Tools : BATCHLOAD_CARDS

BATCHLOAD_CARDS
Defines input and output to the Batch Load utilities (S6BBRTBL/hrnbrtbl). (E)
Invocation
Do one of the following:
Preparation of File and Table Definitions
Before using BATCHLOAD_CARDS, complete the following steps:
1.
2.
If the table is non-parameterized, it must be empty. If the table is parameterized, the table instance you plan to load must not already exist.
3.
This step is required if you do not have a table that reflects the layout of the input file.
BATCHLOAD_CARDS references the table definition to establish the format and layout of the input file. If the definition of the table you are going to load closely resembles the layout of the input file, BATCHLOAD_CARDS references this table definition instead.
See the TIBCO Object Service Broker Parameters manual for information on the DSBIFTYPE Execution Environment parameter.
Defining Control Cards with BATCHLOAD_CARDS
To define your control cards with BATCHLOAD_CARDS, you describe your input and output data in a series of screens. BATCHLOAD_CARDS then writes the necessary control cards in a file. Complete the following tasks:
1.
2.
3.
4.
5.
These tasks are detailed in the following sections.
 
Task A Execute BATCHLOAD_CARDS from a TIBCO Object Service Broker workbench
Execute BATCHLOAD_CARDS from the workbench as follows:
EX execute rule ==> BATCHLOAD_CARDS
The Control Card Definition screen appears.
Control Card Definition Screen

 
Control Card Definition for BATCH LOAD
Control Card File : USR01.BATCH.CNTLCARD(FEB2000)
Table : EMP_MSTR_TDS Character Set : ENGL
PAGE FILL LEVELS : (Default = 75 % if blank)
Group Index : Primary Index :
Secondary Index : Data Pages :
# of Input Records : (Default = 100000 if blank)
Total # of Fields : (Default = 50 if blank)
Dynamic Unit Name : (Default = SYSDA if blank)
Dynamic Block Size : (Default = 4096 if blank)
 
 
 
 
 
PFKEYS: 1=HELP 3=EXIT 4=CONTINUE 12=CANCEL

 
Fields
You must supply values for the following fields:
 
The file (and member name if the file is a z/OS partitioned data set) to contain the BATCHLOAD_CARDS output. You can change the filename by typing over it.
The character set ID for the language of the data. If the data being loaded is in a language other than the one shown, specify the appropriate character set in this field. Values are listed in Character Set Values below.
Character Set Values
Supported character set values are listed here.
Specify Control Card Field Values
The lower portion of the Control Card Definition screen specifies the values to be used to create the S (specification) type control card. To override the defaults, type a new value in the space provided.
 
The percentage of usable page space that is filled during the load process. For more information about adjusting Page fill levels for TDS tables, refer to TIBCO Object Service Broker for z/OS Utilities.
The block size used for table instances and for temporary work files required to process secondary indexes. The small default block size can be detrimental to good performance and could require optimizing if secondary indexes are to be built for large tables, that is, tables with large numbers of rows.
Use PF4 to move to the next screen.
Task B Supply an input file definition
Input File Definition Screen
To define your input file, use the Input File Definition screen as illustrated here:

 
Control Card Definition for BATCH LOAD
INPUT FILE DEFINITION:
Was input data unloaded from an archive: N
Input Data File Length Format (Fixed of Variable): F
Define the input file by either specifying the name of the table that
matches the input file layout or specifying the fields explicitly in
the space provided.
Table: EMP_MSTR_TDS
Name Syntax Length Decimal Offset(optional)
------------------------------------ ---- ---- -- ----
_ PK C 9 0
_ F1 C 15 0
_ F2 C 15 0
_ F3 C 25 0
_ F4 C 25 0
_ F5 P 6 2
_ F6 C 8 0
_ F7 B 2 0
 
PFKEYS: 1=HELP 3=EXIT 4=CONTINUE 12=CANCEL

 
Specify Whether the File Was Loaded From an Archive
To specify whether the input file was created using S6BBRULA or hrnbrula, type Y or N at the prompt:
Was input data unloaded from an archive: N
If you type Y, you must specify V (variable) as the file length format in the Input Data File Length Format field that follows.
Specify File Length
To specify whether the input file is fixed or variable length, type F or V at the prompt:
Input Data File Length Format (Fixed or Variable): F
The name of the table you specified in the Table field on the previous screen appears in the Table field by default, because the table you are loading could resemble the layout of the input file.
Specify File Format
To define the format of the input file, do one of the following on this screen:
Specify a Table whose Definition Reflects the Input File Layout
1.
Keep the default Table value or change it to a table that reflects the format of the input file. If you defined a table for your input file, enter the name of that table in this field.
2.
3.
Specify the Layout of the Input File Explicitly
1.
2.
3.
Input File Fields
The lower portion of the Input File Definition Screen displays field definitions for the input file named on the Table Field. If, for example, you define a table named INPUT_FILE and change the Table value in the Input File Definition Screen to INPUT_FILE, the screen displays the fields of the INPUT_FILE table, as shown here:

 
Control Card Definition for BATCH LOAD
INPUT FILE DEFINITION:
Was input data unloaded from an archive: N
Input Data File Length Format (Fixed of Variable): F
Define the input file by either specifying the name of the table that
matches the input file layout or specifying the fields explicitly in
the space provided.
Table: INPUT_FILE
Name Syntax Length Decimal Offset(optional)
----------------------------------- ---- ---- -- ----
_ SOCIAL_SECURITY C 9 0
_ LAST_NAME V 15 0
_ FIRST_NAME V 15 0
_ SALARY P 6 2
_ ADDRESS_LINE1 V 25 0
_ ADDRESS_LINE2 UN 25 0
_ AGE N 2 0
_ SEX C 1 0
_ DEPARTMENT_# RD 5 0
PFKEYS: 1=HELP 3=EXIT 4=CONTINUE 12=CANCEL

 
Editing Field Definitions
To edit the field definitions displayed, clear the INPUT_FILE name from the Table field and press Enter. Now you can make changes to the other fields on the screen:
 
The number of post decimal positions for a numeric field. If omitted, the decimal number defaults to 0 and appears on the control cards as blank. The number of decimals is required to accurately convert the value to TIBCO Object Service Broker syntax.
The location of the field within the input record. The offset is optional. If specified, it must start at 0 for position 1.
After defining all the input fields, press PF4 to move to the next screen.
Task C Match input file parameters and fields with data table parameters and fields
Field Matching Screen
To match an input field with a receiving field, type the number of the input field in the blank area before the receiving field name. For example, in the screen that follows, SOCIAL_SECURITY (field 1) maps to PK, LAST NAME maps to F1, and so on:

 
Control Card Definition BATCH LOAD
Input File: INPUT_FILE Table: EMP_MSTR_TDS
1 SOCIAL_SECURITY __ PRM1
2 LAST_NAME 9_ PRM2
3 FIRST_NAME 1_ PK
4 SALARY 2_ F1
5 ADDRESS_LINE1 3_ F2
6 ADDRESS_LINE2 5_ F3
7 AGE 6_ F4
8 SEX 4_ F5
9 DEPARTMENT_# __ F6
__ F7
 
 
 
 
 
 
 
PFKEYS: 1=HELP 3=EXIT 4=CONTINUE 12=CANCEL

 
Screen Layout
The names of the input file/import table and the TDS table appear at the top of the screen. If an input file is described by a table, the table name appears in the Input File field; otherwise, it is left blank. The Table is the name of the TDS table that is loaded by S6BBRTBL or hrnbrtbl (the Batch Load utilities).
Input fields not mapped are not loaded into the receiving table.
Task D Specify constant values or ignore fields
Procedure
If some fields are not mapped to input fields, you can load a constant value into each occurrence of a field or ignore fields of the table. If you want to specify a value for the field displayed, provide one in the VALUE field (to a maximum of 250 bytes). To ignore the displayed field, leave the VALUE field blank.
Sample Screen
Fields that are not mapped to an input file field appear on the screen below.
In the following example, a common city and FAX number are added to each employee record loaded into the TDS table. Field F7 is ignored. If more fields than the ones displayed have not been mapped, use PF8 to scroll down.

 
Control Card Definition BATCH LOAD
The table fields that have not been matched to the input file fields
appear below. To specify a value for the field, type the value in the
given area next to the field.
Table: EMP_MSTR_TDS
FIELD VALUE
--------------- ------------------------------------------------
PRM1 TORONTO
F6 555-1234
F7
 
 
 
 
PFKEYS: 1=HELP 3=SAVE 4=CONTINUE 12=CANCEL

 
 
Primary key fields must be either cross-referenced to an input field or system generated (that is, an IDgen key). They must not appear on value cards.
Press PF4 to continue.
Task E View the fields with secondary indexes
The following screen displays a list of TDS fields with the currently assigned primary and secondary keys. After viewing the secondary index fields, press PF4 to complete the control cards definition and write them in your file.
Secondary Index View Screen

 
Control Card Definition BATCH LOAD
These are the fields and their key types for the selected table.
Table: EMP_MSTR_TDS
Primary Secondary Field Name
Y _ PK
Y F1
F2
F3
F4
F5
F6
 
 
 
 
 
 
PFKEYS: 1=HELP 3=EXIT 4=CREATE CTL CARDS 12=CANCEL

 
Review the Output File
An example of an output file containing the control cards is shown here:

 
S 75 75 75 75 000000000100000 050 SYSDA
I 001 F SOCIAL_SECURITY C 009 PK
I 002 F LAST_NAME V 015 F1
I 003 F FIRST_NAME V 015 F2
I 004 F SALARY P 006 02 F5
I 005 F ADDRESS_LINE_1 V 025 F3
I 006 F ADDRESS_LINE_2 V 025 F4
I 007 F AGE B 002
I 008 F SEX C 001
I 009 F DEPARTMENT_# C 004 PRM2
H 001 R ENGL EMP_MSTR_TDS
H 002 P PRM1 S C 015
H 003 P PRM2 S C 004
H 004 F PK I C 009 P
H 005 F F1 S C 015 S
H 006 F F2 S C 015
H 007 F F3 S C 025
H 008 F F4 S C 025
H 009 F F5 Q P 006 02
H 010 F F6 S C 008
H 011 F F7 C B 002
V PRM1 TORONTO
V F6 555-1234

 
Notice the P and S designations for the PK and F1 fields. These letters mean that PK is a primary key and F1 is a secondary index. If a field is both a primary key and a secondary index, the designation is Q.
BATCHLOAD_CARDS Record Layout
The following tables relate control fields on the screens with their equivalent fields in the control records:
Table Attributes
Input File Definitions
Syntax 1

1
Syntax is left-justified if it is a raw data or Unicode syntax; otherwise, it is right-justified.

Field Definitions
I and H records contain a sequence number in columns 3 – 5, which must be consecutive and must start with 001. The types within these records must be in the order: R, if any, followed by P, if any, followed by F.

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved