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

DB2 -805


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

Active User


Joined: 13 Jun 2012
Posts: 180
Location: United States

PostPosted: Thu Jan 18, 2018 11:41 am
Reply with quote

I am having a problem with a DB2 COBOL program that calls a DB2 COBOL program. lf I bind it this way

Code:
DSN SYSTEM(TEST)                     
 BIND  PLAN (TESTPRG) OWNER(PFIAFNT) -
      MEMBER (TESTPRG) -               
       LIBRARY (          -           
          'DB2TEST.DBRMLIB.DATA' -     
         )       -                     
       RETAIN             -           
       DYNAMICRULES(RUN) -             
       QUALIFIER(PFIAFNT)      -       
       CACHESIZE(1024)      -         
       CURRENTDATA(YES)   
DSN SYSTEM(TEST)                     
 BIND  PLAN (GETDATE) OWNER(PFIAFNT) -
      MEMBER (GETDATE) -               
       LIBRARY (          -           
          'DB2TEST.DBRMLIB.DATA' -     
         )       -                     
       RETAIN             -           
       DYNAMICRULES(RUN) -             
       QUALIFIER(PFIAFNT)      -       
       CACHESIZE(1024)      -         
       CURRENTDATA(YES)   

When I execute TESTPRG I get an -805 in the called GETDATE program.

If I bind it this way:
Code:
DSN SYSTEM(TEST)                     
 BIND  PLAN (TESTPRG) OWNER(PFIAFNT) -
      MEMBER (GETDATE) -               
       LIBRARY (          -           
          'DB2TEST.DBRMLIB.DATA' -     
         )       -                     
       RETAIN             -           
       DYNAMICRULES(RUN) -             
       QUALIFIER(PFIAFNT)      -       
       CACHESIZE(1024)      -         
       CURRENTDATA(YES)   

I get an -805 in TESTPRG when I execute TESTPRG.

Here is my execution JCL:

IKJEFT01:
Code:
DSN SYSTEM (TEST)                 
RUN PROGRAM(TESTPRG) PLAN(TESTPRG)
END                                           

I do not have a lot of experience with IKJEFT01, but I suspect my problem is related to it. I suppose it could be the binds. Our only DBA is somebody who worked on a server; he knows SQL, databases and tables, but absolutely nothing about DB2 on the mainframe.

I just want to be able to run a COBOL/DB2 program that calls a COBOL/DB2 table. I can't find any mention of this anywhere. I'd appreciate any help.
Back to top
View user's profile Send private message
enrico-sorichetti

Senior Moderator


Joined: 14 Mar 2007
Posts: 10712
Location: italy

PostPosted: Thu Jan 18, 2018 12:44 pm
Reply with quote

read the db2 manuals about plans, packages, collections, and bind accordingly
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8794
Location: Welsh Wales

PostPosted: Thu Jan 18, 2018 12:54 pm
Reply with quote

From Mr Google

-805 DBRM or package not found in plan.
Back to top
View user's profile Send private message
enrico-sorichetti

Senior Moderator


Joined: 14 Mar 2007
Posts: 10712
Location: italy

PostPosted: Thu Jan 18, 2018 1:03 pm
Reply with quote

faster to ask on a forum rather than look at the manuals icon_evil.gif


and ...
Quote:
Our only DBA is somebody who worked on a server; he knows SQL, databases and tables, but absolutely nothing about DB2 on the mainframe.

i flucking hate this kind of excuses for asking on a forum,
in this case we just give free consultancy to morons who decided to save money by hiring people without the proper skills and by not training properly the rest
Back to top
View user's profile Send private message
daveporcelan

Active Member


Joined: 01 Dec 2006
Posts: 747
Location: Pennsylvania

PostPosted: Thu Jan 18, 2018 5:59 pm
Reply with quote

John,

Your company needs to establish a standard on how to use Plans, Packages and Collections.

It would be better not to tie a particular Program to a Plan, but rather an entire Collection. This way, when a Program is re-compiled, only that program needs to be bound to a collection(s), and your plans do not.

Additional new subroutines can be added without affecting the Plans.

In any event, training and standards are required.

I am not giving you an answer because I would not set it up as you have.
Back to top
View user's profile Send private message
enrico-sorichetti

Senior Moderator


Joined: 14 Mar 2007
Posts: 10712
Location: italy

PostPosted: Fri Jan 19, 2018 10:59 am
Reply with quote

Code:
BIND  ....
     MEMBER (TESTPRG)
     ...

and You get a -805 for a missing GETDATE

Code:
BIND  ....
     MEMBER (GETDATE)
     ...

and You get a -805 for a missing TESTPRG

what does the above behaviour suggest ???
Back to top
View user's profile Send private message
pshongal

New User


Joined: 14 Jun 2012
Posts: 96
Location: India

PostPosted: Fri Jan 19, 2018 11:03 am
Reply with quote

Add both packages in MEMBER when you are BINDing PLAN
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

 


Search our Forums:

Back to Top