IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

LOAD card with and without column declaration


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
dilpreet

New User


Joined: 18 Mar 2008
Posts: 34
Location: INDIA

PostPosted: Tue Aug 19, 2014 2:24 am
Reply with quote

Hi ,

My Query here is when do we used column declaration in the load cards during load throught utility DSNUTILB .

What is the difference in use of below 2 load cards

First loadcard

LOAD INDDN SYSREC1 RESUME YES
ERRDDN SYSER1 LOG YES
SHRLEVEL CHANGE
SORTDEVT SYSDA
WORKDDN(SYSUT1,SRTOUT)
INTO TABLE C8AYJ21D.TABLE

Second Load CARD

LOAD DATA INDDN SYSREC LOG NO REPLACE NOCOPYPEND DISCARDS 1
EBCDIC CCSID(00037,00000,00000)
INTO TABLE
C8AYJ21D.
"UNIT_VALUES_STG"
NUMRECS 0
( "COMPANY_CODE"
POSITION( 00001:00003) CHAR(00003)
, "EFFECTIVE_DATE"
POSITION( 00004:00013) DATE EXTERNAL
, "FAV_CODE"
POSITION( 00014:00019) CHAR(00006)
, "FUND_NUMBER"
POSITION( 00020:00027) CHAR(00008)
, "FUND_VALUE"
POSITION( 00029:00036) DECIMAL
NULLIF(00028)=X'FF'
, "FUND_NAME"
POSITION( 00038:00077) CHAR(00040)
Back to top
View user's profile Send private message
gylbharat

Active Member


Joined: 31 Jul 2009
Posts: 565
Location: Bangalore

PostPosted: Tue Aug 19, 2014 6:09 pm
Reply with quote

From the utility manual:

(field-specification, ...)
Describes the location, format, and null value identifier of the data that is to be
loaded.
If no field specifications are used:
v The fields in the input records are assumed to be in the same order as in the
DB2 table.
v The formats are set by the FORMAT option on the LOAD statement, if that
option is used.
v Fixed strings in the input are assumed to be of fixed maximum length.
VARCHAR and VARGRAPHIC fields must contain a valid 2-byte binary
length field preceding the data; no intervening gaps are allowed between the
VARCHAR or VARGRAPHIC fields and the field that follows.
v BINARY fields are assumed to be of fixed maximum length.
v VARBINARY fields must contain a valid 2-byte binary length field preceding
the data.
v ROWID fields are varying length, and must contain a valid 2-byte binary
length field preceding the data; no intervening gaps are allowed between
ROWID fields and the fields that follow.
v LOB fields are varying length, and require a valid 4-byte binary length field
preceding the data; no intervening gaps are allowed between them and the
LOB fields that follow.
v Numeric data is assumed to be in the appropriate internal DB2 number
representation.
v The NULLIF or DEFAULTIF options cannot be used.

If any field specification is used for an input table, a field specification must
exist for each field of the table that does not have a default value. Any field in
the table with no corresponding field specification is loaded with its default
value.
If any column in the output table does not have a field specification and is
defined as NOT NULL, with no default, the utility job step is terminated.
Identity columns or row change timestamp columns can appear in the field
specification only if you defined them with the GENERATED BY DEFAULT
attribute.
If you are loading application or system temporal data and you include field
specifications, you must specify both the start and end time column fields.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Load new table with Old unload - DB2 DB2 6
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts How to load to DB2 with column level ... DB2 6
No new posts RC query -Time column CA Products 3
No new posts REASON 00D70014 in load utility DB2 6
Search our Forums:

Back to Top