View previous topic :: View next topic
|
Author |
Message |
passion_sujesh
New User
Joined: 14 Mar 2008 Posts: 74 Location: India,Chennai
|
|
|
|
Hi all,
I have a question in the following scenario.
Few months ago i had coded a program (Prog A) calling a sub program (Prog B).
Prog A -- Is in Cobol 3 and compiler option -- RMODE(24).
Prog B -- Is in Cobol 2.
The program A used to run successfully becoz of the RMODE compiler option.
Now I have recompiled the called program (Prog B) to cobol 3 with compiler option AMODE(31) RMODE(ANY). The calling program is as such.
Prog A -- Is in Cobol 3 and compiler option -- RMODE(24).
Prog B -- Is in Cobol 3 and compiler option -- AMODE(31) RMODE(ANY).
My question is:
If i execute the calling program (Prog A) will it run success fully or will it abend (S0C4) becoz of the Compiler option RMODE(24).
Can you please help me.
Thanks in advance. |
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1050 Location: Richmond, Virginia
|
|
|
|
You have posted here 57 times, and yet you cannot just run it and find out because ... ? |
|
Back to top |
|
|
passion_sujesh
New User
Joined: 14 Mar 2008 Posts: 74 Location: India,Chennai
|
|
|
|
Hi Phil,
I had run this program, it did not abend. Are there chances for this program to abend in future?
My concern is, since the sub program (in Cobol3 AMODE(31) RMODE(ANY)) is called dynamically, there are chances the program will be loaded in the memory above the 16 MB line. The main program is compiled with RMODE(24) and might not be able to access the subprogram. This might lead to S0C4 abbend. Is this scenario possible to occur in the future? |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
31-Bit programs can always address 24-Bit as well as 31-Bit addresses, but 24-Bit programs cannot address 31-Bit addresses as the high-order register-byte will be truncated and the module will likely raise a S0C4.
Bill |
|
Back to top |
|
|
passion_sujesh
New User
Joined: 14 Mar 2008 Posts: 74 Location: India,Chennai
|
|
|
|
Hi Bill,
Thanks for the reply. Can you please help me in the following doubts.
1) If i remove the Rmode(24) (also data (24) if present) from the main program, i should be able to solve the problem? or should i recompile the main program with AMODE(31) RMODE(ANY)?
2) Is there any way i can find the compiler options (Rmode, Amode options) from load module, Because there might be number of programs in production which will be affected in this simillar way.
Thanks in Advance,
Sujesh. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
1. A COBOL program is not compiled with AMODE(31) RMODE(ANY). The COBOL compile option is DATA(24) or DATA(31).
2. What problem does your #1 point refer to in your post -- your previous posts talk about if you run the program will it abend, not any problem you're having?
3. You can find the addressing mode options from the load module -- but these are not "compiler options", they are linkage editor / binder options. ISPF 3.4 allows you to see them, or AMBLIST in batch will show you the addressing modes.
You SERIOUSLY need to review the difference between a compile and a linkage edit (binder) -- it is obvious you do not understand the difference between the two, and that lack of understanding limits what you can understand about load modules. |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
Back to top |
|
|
passion_sujesh
New User
Joined: 14 Mar 2008 Posts: 74 Location: India,Chennai
|
|
|
|
Hi Robert,
Thanks for reply.
Regarding #1:
I am working on a program (Cobol 3 program with compiler option Rmode(24)) which is calling sub program (Cobol 3 program with compiler option AMODE(31) RMODE(ANY)). I tested the program it ran fine. But i had a doubt regarding the addressing mode (Rmode(24) in Main program), i was not sure if it will abend in the future. Hence i asked this question.
Can you please let me know by what are the default addressing modes in Cobol Z/os.
Thanks in advance,
Sujesh. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
Quote: |
Can you please let me know by what are the default addressing modes in Cobol Z/os. |
No -- not unless you tell of which of the many IBM compilers you are using. The current compile is Enterprise COBOL; previous compilers include Enterprise COBOL for z/OS, COBOL for OS/390 & VM, COBOL for MVS & VM, COBOL/370 , VS COBOL II, OS/VS COBOL -- not to mention Visual Age COBOL and COBOL / SAA.
Compile a program and copy the first line of data from the compiler output page into a post. |
|
Back to top |
|
|
passion_sujesh
New User
Joined: 14 Mar 2008 Posts: 74 Location: India,Chennai
|
|
|
|
Hi Robert,
Thanks for replying.
I am using 'Enterprise COBOL for z/OS'.
I more question, i am not sure if this question might sound crazy. Is it possible to find where the program is loaded, is it loaded below the 16mb line or above the line. I need to know this so that i can prove to my manager that the sub program was loaded below the 16Mb line and hence the program executed successfully (when i ran it) and to show that the program will raise a S0C4 abend if it is loaded above the line.
Thanks in advance,
Sujesh. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
Use ISPF 3.4 (TSO) or AMBLIST (batch) to look at the load library. ISPF 3.4 will show something like:
Code: |
Name Prompt Alias-of Size TTR AC AM RM
_________ CEEUOPT 00000908 000513 00 31 ANY
_________ COBMINI 00001C88 000A0D 00 31 ANY
_________ COBMSTUB 00001B80 000915 00 31 ANY |
AM is addressing mode, RM is residency mode for the different programs. If you see 24 in RM, the program loads below the line. See section 1.2.6 of the COBOL Programming Guide for a complete explanation of the modes and the way they can be set in COBOL. |
|
Back to top |
|
|
passion_sujesh
New User
Joined: 14 Mar 2008 Posts: 74 Location: India,Chennai
|
|
|
|
Thanks a lot Robert.
This should help me.
Thanks,
Sujesh |
|
Back to top |
|
|
passion_sujesh
New User
Joined: 14 Mar 2008 Posts: 74 Location: India,Chennai
|
|
|
|
Hi Robert,
I need some information on COBOL LE. What is Cobol LE? Is it a different compiler, is it different from 'COBOL z/OS' ? Can you please help me in this.
Thanks in advance,
Sujesh. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
|
|
|
|
LE is short for Language Environment. IBM created the Language Environment to support all compilers on z/OS -- COBOL, PL/1, and so forth. LE provides a common set of run-time services and a standard way to access system data that can be used by any LE language.
Enterprise COBOL is an LE-compliant compiler; it is not possible under current releases of z/OS to use an IBM COBOL compiler that is not LE-compliant. Earlier compilers from IBM, such as OS/VS COBOL, were not LE-compliant. z/OS COBOL and COBOL LE can be considered the same language.
IBM has a bookshelf on LE, and the Interlanguage Communication manual is in this bookshelf. Anyone wanting to call C, C++, Java, Fortran, or Assembler from COBOL (or vice versa) should bookmark the location of the bookshelf and this manual as it will be frequently referenced. |
|
Back to top |
|
|
passion_sujesh
New User
Joined: 14 Mar 2008 Posts: 74 Location: India,Chennai
|
|
|
|
Robert,
Thanks a lot again. I am using 'Enterprise COBOL for z/OS' hence all my program are compiled using LE-compliant compiler. Am i rite.
Thanks a lot,
Sujesh. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
Back to top |
|
|
|