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

Error in loading a dataset into DB2


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

New User


Joined: 04 Oct 2007
Posts: 49
Location: Mumbai

PostPosted: Thu Jul 19, 2012 1:51 am
Reply with quote

Hi,
I am trying to load a flat file to db2 via db2 file-aid option 3.7, but geting a SOC4 abend..

Below is my table:
STATE_CODE CHAR(2)
CLASS_CODE CHAR(4)
RATE_IND CHAR(1)
RATE CHAR(5)
CL_SP1 CHAR(1)
CL_SP2 CHAR(1)
RT_SP CHAR(1)
MIN_PREM_SP CHAR(1)
DSCRPTR_CODE CHAR(2)
VALID_DATE CHAR(7)
DSCRPTN VC(2000)
STT_ABBRVTN CHAR(2)
**************************


Here is my control card for the file:
LOAD DATA RESUME YES INTO TABLE "QPLT002"."TPL_CLA_WC"
(STATE_CODE POSITION (1) CHAR (2) ,
CLASS_CODE POSITION (3) CHAR (4) ,
RATE_IND POSITION (7) CHAR (1) ,
RATE POSITION (8) CHAR (5) ,
CL_SP1 POSITION (13) CHAR (1) ,
CL_SP2 POSITION (14) CHAR (1) ,
RT_SP POSITION (15) CHAR (1) ,
MIN_PREM_SP POSITION (16) CHAR (1) ,
DSCRPTR_CODE POSITION (17) CHAR (2) ,
VALID_DATE POSITION (19) CHAR (7) ,
DSCRPTN POSITION (26) VARCHAR ,
STT_ABBRVTN POSITION (2028) CHAR (2) )


ON DEBUGGING I FOUND THAT THE DESCRIPTION FIELD OF VARCHAR (2000) IS HAVING SOME PROBLEM. AS FOR VARCHAR I SHOULD HAVE A DIFFERENT CONTROL CARD...
BECAUSE WHEN I LOADED A SINGLE RECORD FROM DB2 TO FLAT FILE..I GOT TWO .. (DOTS) IN VARCHAR FIELD...


ANY SUGGESTIONS ?
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1788
Location: Bloomington, IL

PostPosted: Thu Jul 19, 2012 2:26 am
Reply with quote

You do realize that what appears to be a double dot is actually the halfword length descriptor for your VARCHAR field, yes?
Back to top
View user's profile Send private message
chhabraravneet

New User


Joined: 04 Oct 2007
Posts: 49
Location: Mumbai

PostPosted: Thu Jul 19, 2012 4:09 am
Reply with quote

I have done DB2 5 years back and now i have got a project to do it again.
my primary skills are:
Mainframe Skills: JCL, COBOL, IMS DB/DC.

Anyways..thanks for your reply..i will take your words... icon_smile.gif

will search in the forum...

Have a good one.
Back to top
View user's profile Send private message
Dsingh29

Active User


Joined: 16 Dec 2008
Posts: 132
Location: IBM

PostPosted: Thu Jul 19, 2012 2:28 pm
Reply with quote

Hi,

Make sure that all records in your flat file have some legitimate value for the length field of varchar.
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 Error to read log with rexx CLIST & REXX 11
No new posts Error when install DB2 DB2 2
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts CLIST - Virtual storage allocation error CLIST & REXX 5
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
Search our Forums:

Back to Top