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
 

 

How to compile static call programs

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
veerabhadra

New User


Joined: 22 Jun 2006
Posts: 3

PostPosted: Fri Oct 12, 2007 7:39 pm    Post subject: How to compile static call programs
Reply with quote

My main program is calling (static call) 5 sub programs.

My understanding for static call is ... I have to compile all the main and sub programs separately. and at the time of link edit we should link edit all the modules(main and sub) to a single load module with the main program name.

Here I have a question .. How to link edit the main and my 5 sub programs to a single load module.
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Oct 12, 2007 8:05 pm    Post subject:
Reply with quote

Hello,

Your best bet is to talk with your system support people. They can show how this is done on your system.

In general, you compile the 5 subprograms and link them. Once they are compiled/linked, compile and link the main program. The link for the main program should automatically include the called modules. Unless there is something "special" in your environment, you should not need to do anythng else.

As i mentioned, your system support people will know exactly.
Back to top
View user's profile Send private message
annujp

New User


Joined: 31 Aug 2005
Posts: 39
Location: St Paul,MN

PostPosted: Fri Oct 12, 2007 8:17 pm    Post subject:
Reply with quote

If your main program is TEST which calls two sub programs TESTA and TESTB, then you need to compile and linkedit (this can be done in a single compile JCL) TESTA and TESTB first.
Then compile and link edit the main program TEST.

Thanks
Anitha
Back to top
View user's profile Send private message
Douglas Wilder

Active User


Joined: 28 Nov 2006
Posts: 305
Location: Deerfield IL

PostPosted: Fri Oct 12, 2007 8:54 pm    Post subject:
Reply with quote

Link your sub programs with NCAL.
When you link your main program put the PDS with the sub programs allocated to DD SYSLIB. The sub programs will automatically be picked up from here.
Back to top
View user's profile Send private message
veerabhadra

New User


Joined: 22 Jun 2006
Posts: 3

PostPosted: Fri Oct 12, 2007 8:59 pm    Post subject: Reply to: How to compile static call programs
Reply with quote

Thanks for your replies...

From the above can I say as following...

Compile and link edit the sub programs.

Compile and link edit the main program.

We need to refer the sub programs.. Automatically at the time compile/link edit time of main program it link edits the subprograms into main program..

Is my understanding correct?
Back to top
View user's profile Send private message
veerabhadra

New User


Joined: 22 Jun 2006
Posts: 3

PostPosted: Fri Oct 12, 2007 9:36 pm    Post subject: Reply to: How to compile static call programs
Reply with quote

Hi Douglas,
Link your sub programs with NCAL.
When you link your main program put the PDS with the sub programs allocated to DD SYSLIB. The sub programs will automatically be picked up from here

What is this NCAL? Is it similar to IEWL?

You mentioned to put the sub pgms library to DD SYSLIB.

You mean source programs library or the one which contains the object module??
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Sat Oct 13, 2007 12:06 am    Post subject:
Reply with quote

Hello,

Quote:
You mentioned to put the sub pgms library to DD SYSLIB.
You mean source programs library or the one which contains the object module??
You never want to point the output of a compile/link at your source library.

If you search in these forums, you will see multiple topics where someone damaged their source library this way.
Back to top
View user's profile Send private message
Douglas Wilder

Active User


Joined: 28 Nov 2006
Posts: 305
Location: Deerfield IL

PostPosted: Sat Oct 13, 2007 12:29 am    Post subject:
Reply with quote

NCAL is a Linkage Editor Option so that called modules (like the COBOL support routines) will not be linked into the sub modules when they are first linked. These sub modules are linked into a PDS. This PDS that the sub modules are linked into should be allocated to the DD SYSlib in the link step when the main program is linked. When linking the main program do not use NCAL. The sub modules and all of the COBOL support routines will be linked in at this time. Sorry I was not more explicit in my previous post.
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Why myself doing Package Bind always ... Susanta DB2 5 Thu Mar 02, 2017 10:47 pm
No new posts OO COBOL compile error Virendra Shambharkar COBOL Programming 3 Tue Jan 10, 2017 6:05 pm
No new posts I can not compile my program PL1 V3.R... Miguel Fernandez PL/I & Assembler 13 Tue Dec 06, 2016 8:30 pm
No new posts Cobol list of programs being called biswajit.dattagupta COBOL Programming 5 Tue Nov 01, 2016 2:10 am
No new posts Can sending 5 MB data between cobol p... Kevin Vaz CICS 12 Tue Oct 18, 2016 4:50 pm


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