Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

LOAD card with and without column declaration

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: LOAD card with and without column declaration
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    Post subject: Reply to: LOAD card with and without column declaration
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    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Can DFSPARM override SORTKEYS paramet... ashek15 DB2 2 Tue Jan 31, 2017 11:36 pm
No new posts Sort Card to Remove Duplicate records... raj4neo SYNCSORT 2 Wed Jan 25, 2017 4:44 am
This topic is locked: you cannot edit posts or make replies. DB2 query Using Recursion, Converting... smilewithashu2 DB2 3 Tue Jan 03, 2017 12:50 pm
No new posts SQZ pipe delimited file with 1 column... Rick Silvers DFSORT/ICETOOL 6 Sun Nov 06, 2016 8:11 pm
This topic is locked: you cannot edit posts or make replies. How to use 2 input files in control c... Gunapala CN DFSORT/ICETOOL 23 Thu Oct 13, 2016 3:42 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us