MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Problem with LOAD utility

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
ravikumar_sri2001
Beginner


Joined: 06 Dec 2002
Posts: 117
Topics: 44
Location: Chennai,India

PostPosted: Mon Apr 04, 2005 10:18 am    Post subject: Problem with LOAD utility Reply with quote

Hi Gurus,

My load jcls is given below.
Code:

//LOAD    EXEC PGM=IKJEFT01,DYNAMNBR=20           
//SYSTSPRT DD  SYSOUT=*                           
//SYSPUNCH DD  SYSOUT=*                           
//SYSPRINT DD SYSOUT=*                           
//SYSTSIN  DD  *                                 
 DSN SYSTEM(DSN)                                 
 RUN  PROGRAM(DSNTIAUL) PLAN(DSNTIAUL) -         
  LIB('DB2.DSN.RUNLIB.LOAD')                     
/*                                               
//SYSREC   DD DSN=IOFL.D03305.INSTP,DISP=SHR     
//SYSIN    DD DSN=IOFL.D03305.PUNCH,DISP=SHR     
//*                                               

IOFL.D03305.INSTP contains the rows to be inserted into the table

Content of the SYSIN dataset is
Code:

 LOAD DATA INTO TABLE                                                     
     DSDB22.EFINSTT_V02                                                   
  (                                                                       
  INST_SWT_ID                            POSITION(       1         )     
  CHAR(                      8 ) ,                                         
  INST_ID                                POSITION(       9         )     
  CHAR(                     11) ,                                         
  INST_PROC_ID                           POSITION(      20         )     
  CHAR(                      8 ) ,                                         
etc....

I am getting following error while executing this jcl.

DSNT493I SQL ERROR DURING SQL STATEMENT PREPARE , TABLE LOAD DATA INTO TABLE
DSNT408I SQLCODE = -199, ERROR: ILLEGAL USE OF KEYWORD DATA, TOKEN FOR WITH FETCH ORDER UNION EXCEPT QUERYNO OPTIMIZE WAS EXPECTED

Please help to resolve this problem.

Thanks,
Ravikumar.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Mon Apr 04, 2005 10:40 am    Post subject: Reply with quote

ravikumar_sri2001,

Your load statement is invalid. You need to specify the DD name from where you are trying to load. In your JCL it is Sysrec.

Check this link for sample load statements

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/DSNUGH13/2.12.5?DT=20020826194002

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
CZerfas
Intermediate


Joined: 31 Jan 2003
Posts: 211
Topics: 8

PostPosted: Tue Apr 05, 2005 5:41 am    Post subject: Reply with quote

Hello Ravikumar,

what you posted as your LOAD-JCL is in fact an Unload-Job. Was that by accident, or did you really try to load a table with the DSNTIAUL program?

regards
Christian
Back to top
View user's profile Send private message
ravikumar_sri2001
Beginner


Joined: 06 Dec 2002
Posts: 117
Topics: 44
Location: Chennai,India

PostPosted: Wed Apr 06, 2005 8:27 am    Post subject: Reply with quote

Christian,

Yes, i was trying to load the table with the DSNTIAUL program. Please give me correct load-jcl to load the table. Thanks in advance.

Thanks,
Ravikumar.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Wed Apr 06, 2005 8:36 am    Post subject: Reply with quote

ravikumar,

Please search before posting. A simple search for Load in the db2 forum shows example JCL's. Moreover the link posted in my prior post itself has examples of the load utility JCL.

Look at the last post in this topic

http://www.mvsforums.com/helpboards/viewtopic.php?t=244&highlight=load

http://www.mvsforums.com/helpboards/viewtopic.php?t=2866&highlight=load


Hope this helps...

Cheers

kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
ravikumar_sri2001
Beginner


Joined: 06 Dec 2002
Posts: 117
Topics: 44
Location: Chennai,India

PostPosted: Thu Apr 07, 2005 3:20 am    Post subject: Reply with quote

Kolusu,

Extremely sorry for not searching the archive. I got LOAD-jcl from the link you provided. While running the load-jcl, i got the following error.

DSNU050I DSNUGUTC - LOAD DATA
DSNU650I - DSNURWI - INTO TABLE DSDB22.EFINSTT_V02
DSNU056I - DSNUGMAP - TABLE 'DSDB22.EFINSTT_V02' NOT FOUND

DSDB22.EFINSTT_V02 is a View. Can't i load the VIEW ?. I dont have access to the table.

Thanks,
Ravikumar.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12376
Topics: 75
Location: San Jose

PostPosted: Thu Apr 07, 2005 5:39 am    Post subject: Reply with quote

Ravikumar,

You CANNOT load a view . It is your table that you have to load.

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
ravikumar_sri2001
Beginner


Joined: 06 Dec 2002
Posts: 117
Topics: 44
Location: Chennai,India

PostPosted: Wed Apr 13, 2005 7:39 am    Post subject: Reply with quote

Thanks a lot for your replies.

Thanks,
Ravikumar.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group