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
 

 

Calling program(Assmbler/Cobol)

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
View previous topic :: :: View next topic  
Author Message
munna_ibm

New User


Joined: 23 Apr 2005
Posts: 13
Location: chennai

PostPosted: Thu Jan 10, 2013 7:40 pm    Post subject: Calling program(Assmbler/Cobol)
Reply with quote

Hi,

I have small doubt, could you please.

Assume i have a Main program (COBOL) and sub program (ASSEMBLER), then when i try give a call, the assembler treats COBOL as main and ASSEMBLER as sub program, its fine.

Assume when i have a main program (ASSEMBLER) and sub program (COBOL) does the assembler treats ASSEMBLER as main and COBOL as sub program, to treat it the same what changes do we need to do in JCL.

please correct me if iam wrong.

thanks in advance.

regards,
Munna.
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Thu Jan 10, 2013 8:22 pm    Post subject: Reply to: Calling program(Assmbler/Cobol)
Reply with quote

Your understanding of things is pretty messed up icon_cool.gif

the called <whatever> is NOT aware of the <caller>

the only constraint is that the called thing must be passed the proper parameters

an assembler subroutine does not need any ENVIRONMENT setup

a HIGH LEVEL subroutine needs to have the proper LANGUAGE ENVIRONMENT prepared
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7223

PostPosted: Thu Jan 10, 2013 8:34 pm    Post subject: Reply to: Calling program(Assmbler/Cobol)
Reply with quote

If you are calling Cobol from Assembler, your Assembler program should be "LE Compliant". You might want to start your research with something list this topic.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10201
Location: italy

PostPosted: Thu Jan 10, 2013 8:43 pm    Post subject: Reply to: Calling program(Assmbler/Cobol)
Reply with quote

Quote:
then when i try give a call, the assembler treats COBOL as main


Quote:
does the assembler treats ASSEMBLER as main and COBOL as sub program,


Quote:
to treat it the same what changes do we need to do in JCL.



You have been hanging around for almost 8 Years
You should have learned by now on how to ask in a better way ...

with Your confused views and Your posting style I strongly suggest that even after 8 years You might feel more at ease in the beginner' s forum

http://ibmmainframeforum.com/index.php
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Thu Jan 10, 2013 9:39 pm    Post subject: Reply to: Calling program(Assmbler/Cobol)
Reply with quote

If this is a Batch environment, review adding CEEPIPI (temporary LE compliance stub) to the Assembler Main-Caller or (as Bill has suggested), making the Main-Caller permanently LE compliant for the HLL sub-program.

It's not too often that Assembler calls COBOL (or any other HLL) as it's normally the other way around.

CEEPIPI cannot be used in a CICS environment.

Book Manager: WRITING ILC APPLICATIONS -

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/CEEA4180/CCONTENTS?SHELF=cee2bkc0&DN=SA22-7563-08&DT=20100628162151
Back to top
View user's profile Send private message
munna_ibm

New User


Joined: 23 Apr 2005
Posts: 13
Location: chennai

PostPosted: Thu Jan 10, 2013 9:56 pm    Post subject: Reply to: Calling program(Assmbler/Cobol)
Reply with quote

hey enrico ...

my intention was...

If we call a sub program as Assembler or Cobol vice versa. The compiler assumes Cobol as the main entry point. It is fine when we are calling Assmbler program as sub program. But when we are calling Cobol program as sub program from Assembler program as main program, then at that time we have to do some changes in JCL.

Do you have any idea about the changes to be made in JCL.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7904
Location: Bellevue, IA

PostPosted: Thu Jan 10, 2013 10:02 pm    Post subject:
Reply with quote

Actually, the changes would most likely be in the linkage editor / binder statements and NOT, technically, in the JCL. If you do not understand the linkage editor / binder commands (such as ENTRY, INCLUDE, NAME) then providing any further details would be useless.
Back to top
View user's profile Send private message
munna_ibm

New User


Joined: 23 Apr 2005
Posts: 13
Location: chennai

PostPosted: Thu Jan 10, 2013 10:15 pm    Post subject: Reply to: Calling program(Assmbler/Cobol)
Reply with quote

i know the way to do it, but wanna double check from others.

here to go:

//L.SYSIN DD *

INCLUDE LIB1 (cobol pgm name)
ENTRY assembler-pgm-name

/*

if there are any other ways to do it, pls drop your thoughts.
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: Thu Jan 10, 2013 11:16 pm    Post subject:
Reply with quote

Hello,

Why do you Not wanna try what you have and then post if there are questions or problems. . . icon_confused.gif
Back to top
View user's profile Send private message
munna_ibm

New User


Joined: 23 Apr 2005
Posts: 13
Location: chennai

PostPosted: Fri Jan 11, 2013 12:36 am    Post subject: Reply to: Calling program(Assmbler/Cobol)
Reply with quote

Now i dont have environment to test it. since its long time being away from technical stuff(coding etc) now im into management. i hope you understand.
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 Jan 11, 2013 1:14 am    Post subject:
Reply with quote

Hello,

Now the understanding is a bit better icon_smile.gif

Suggest you arrange to have a logon id set up so you can run some things "on your own" and look arounf the system. Most of the managers i've supported have a "developer" logon even if they rarely use those tools.
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 -> PL/I & Assembler All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts IMS BMP program causes 878 system abend Artemk IMS DB/DC 7 Tue Nov 22, 2016 8:26 pm
This topic is locked: you cannot edit posts or make replies. RANDOM Function in COBOL swapnil781 COBOL Programming 2 Tue Nov 15, 2016 6:17 pm
No new posts Regarding COBOL Stored Procedure opti... selvamsrinivasan85 DB2 4 Fri Nov 04, 2016 8:57 pm
No new posts COBOL Version 6.1 Virendra Shambharkar COBOL Programming 5 Tue Nov 01, 2016 11:24 am
No new posts Cobol list of programs being called biswajit.dattagupta COBOL Programming 5 Tue Nov 01, 2016 2:10 am


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