View previous topic :: View next topic
|
Author |
Message |
Amit Suri
New User
Joined: 28 Oct 2008 Posts: 25 Location: hyderabad
|
|
|
|
Hi Everyone
I am quite new to "cobol Db2" Programming , So please dont mind if the question below is too simple to answer
So far i have been able to write normal cobol-db2 program (without using the Datafiles or Subprograms ) Compile & Execute the same
Now i have to incorporate the use of files in mine program : for the same could you please what changes i have to make in mine EXECUTE Jcl?
Should i use the DD names of the files being used by the program as it is Or do i need to make some further modification: FYR below is the Execute Jcl i have been using so far
===============
//STEP01 EXEC PGM=IKJEFT01,DYNAMNBR=20
//STEPLIB DD DSN=*.LOADLIB,DISP=SHR
// DD DSN=DSN*.SDSNLOAD,DISP=SHR
// DD DSN=DSN*.SDSNEXIT,DISP=SHR
//SYSTSPRT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSTSIN DD *
DSN SYSTEM(*)
RUN PROGRAM(BN000001) PLAN(XBEXSFA)
END
/*
======================
Thanks!
Amit |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
So what happened when you tried it |
|
Back to top |
|
|
Amit Suri
New User
Joined: 28 Oct 2008 Posts: 25 Location: hyderabad
|
|
|
|
Hi
I have used this jcl so far for COB-Db2 programs without having any files:
Was concerned to know if some basic changes needs to be made for the
inclusion of Datafiles in the program for the same program
Anyways i will try to use the DD names of the Files In the same jcl, will get back just in case
Thanks |
|
Back to top |
|
|
Amit Suri
New User
Joined: 28 Oct 2008 Posts: 25 Location: hyderabad
|
|
|
|
I just included the DD statements in the Execute Jcl and Added One
SYSOUT DD statement to display the records : It worked :)
Thanks |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Excellent, it just goes to show what happens when you try it for yourself
And thank you for letting us know the solution in case someone else has the same question. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
DB2 is running as just another sub-system in the MVS address-space. Using IKJEFT01 you "create an environment" to tell the system that using my user-program (via SYSTSIN) communicate to that sub-system. Having said that and if one is working with COBOL-DB2 program, COBOL way of functioning with JCL is not disturbed - so adding DD name was the only choice one is left with when talking about using files in a COBOL-program, the traditional way.
And yes appreciate your efforts and thanks for posting the solution. |
|
Back to top |
|
|
|