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

Calling program(Assmbler/Cobol)


IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
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
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Jan 10, 2013 8:22 pm
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

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Jan 10, 2013 8:34 pm
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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Jan 10, 2013 8:43 pm
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

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

CICS Moderator


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

PostPosted: Thu Jan 10, 2013 9:39 pm
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 -

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
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: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Jan 10, 2013 10:02 pm
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
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

Moderator Emeritus


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

PostPosted: Thu Jan 10, 2013 11:16 pm
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
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

Moderator Emeritus


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

PostPosted: Fri Jan 11, 2013 1:14 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> PL/I & Assembler

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts Using API Gateway from CICS program CICS 0
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
Search our Forums:

Back to Top