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

Executing executable file created under AIX in OMVS


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Midhun Mohandas

New User


Joined: 03 Mar 2014
Posts: 24
Location: India

PostPosted: Tue Apr 08, 2014 2:21 pm
Reply with quote

Hi,

I have a sample program TEST1.cbl

IDENTIFICATION DIVISION.
PROGRAM-ID. TEST1.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 VATR PIC X(1).
PROCEDURE DIVISION.
DISPLAY 'TEXT ENTERED'
STOP RUN.


I have created an executable file under AIX using command

"cob2 -testq test1.cbl" , so an executable file 'testq' will be created.

Next I moved testq to OMVS region, as binary file and tried to execute it in OMVS region, but it was not executing.

The error shown is " -ÿØ -: testq 3: FSUM7351 not found "

Please help me to solve this issue.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10886
Location: italy

PostPosted: Tue Apr 08, 2014 2:33 pm
Reply with quote

Quote:
I have created an executable file under AIX using command


Quote:
Next I moved testq to OMVS region, as binary file and tried to execute it in OMVS region


please explain better...

from Your wording You are trying to run on OVMS something built on AIX

why would You expect it to work ?
Back to top
View user's profile Send private message
Midhun Mohandas

New User


Joined: 03 Mar 2014
Posts: 24
Location: India

PostPosted: Tue Apr 08, 2014 2:41 pm
Reply with quote

Yes I am trying to run a executable file created in AIX under OMVS.

In AIX and OMVS we are using same compiler and in both environment the compiler command used is "cob2", so I am expecting it to work under OMVS.

I have created an executable file under AIX using command cob2 -testq test1.cbl

This command will compile test1.cbl and produce an executable file testq.

Then I moved this testq to OMVS region and tried to execute it there, but it is not working and throwing the error " -ÿØ -: testq 3: FSUM7351 not found "
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2454
Location: Hampshire, UK

PostPosted: Tue Apr 08, 2014 3:20 pm
Reply with quote

Well, being COBOL it did not 'throw' an error but abended with error message ....

What happened ehn you compiled and linked the program on OMVS? You do know that AIX and OMVS are completely different beasts with different I/O routines?
Back to top
View user's profile Send private message
Midhun Mohandas

New User


Joined: 03 Mar 2014
Posts: 24
Location: India

PostPosted: Tue Apr 08, 2014 3:39 pm
Reply with quote

Thanks everyone,

But I want to create a dll for cobol db2 program. In AIX I am able to create a dll for cobol-db2 program.

But in OMVS I am unable to create a dll for cobol-db2 program. When I used cob2 option to compile a cobol-db2 program and create a dll, the following error was shown

"An exec sql statement was found but the sql compiler option was not in effect. the statement was discarded".
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10886
Location: italy

PostPosted: Tue Apr 08, 2014 3:56 pm
Reply with quote

even a beginner should realize that there is a difference between

SOURCE compatibility
and
OBJECT/EXECUTABLE compatibility

zOS and AIX are different operating systems,
AIX hardware and Zxxx machines have different architectures

and ...
please do not PM for answers icon_cool.gif
Back to top
View user's profile Send private message
steve-myers

Active Member


Joined: 30 Nov 2013
Posts: 917
Location: The Universe

PostPosted: Tue Apr 08, 2014 4:48 pm
Reply with quote

Just to add to Mr. Sorrichetti's post.
  • AIX uses the ASCII character set, OMVS uses the EBCDIC character set.
  • I can't say this with 100% certainty, but the machine operation codes in AIX hardware are almost certainly different than the machine operation codes in z/Architecture hardware.
  • I can't say this with 100% certainty, but the contents of AIX binary executable files (beyond the binary program text) are almost certainly different than OMVS binary executable files.
I'm not a Cobol programmer, and you will have to research this on your own, but does the version of MVS Cobol you are using even have the capability of creating and using DLLs? Your use of "COB2" suggests to me you are using a very old Cobol compiler.
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2454
Location: Hampshire, UK

PostPosted: Tue Apr 08, 2014 6:47 pm
Reply with quote

I believe COB2 is a script for doing the compile. Not having seen it I do not know if it takes switches to alert it to the fact that DB2 precompile is required or if a different script should be used. However, the system programmer(s) should know or the DB2 DBA.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Tue Apr 08, 2014 7:00 pm
Reply with quote

Hello,

Is there another similar process that is working in your environment?

How does this process do what is needed?

The mechanics should be done as a "standard" and not as a personal experiment. System support, database support, etc should be involved in the implementation of a new method.

How are you trying to "move" between environments?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8700
Location: Dubuque, Iowa, USA

PostPosted: Tue Apr 08, 2014 7:41 pm
Reply with quote

Many people have successfully compiled DB2 COBOL programs under OMVS on z/OS without any issues. You need to add to your source code, as the first line, *PROCESS SQL (or *CBL SQL) to indicate to COBOL that you are using the DB2 coprocessor.

Would you expect to be able to compile a programs on a Windows machine and run that executable on z/OS? Of course not -- so WHY would you expect the executable from AIX to run on z/OS?
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3076
Location: NYC,USA

PostPosted: Wed Apr 09, 2014 4:32 am
Reply with quote

Robert, it seems to me the TS has the same issue before and he is not getting any support from the DBA or support person from his shop,

www.ibmmainframes.com/viewtopic.php?t=62474&highlight=

Midhun,

As Dick mentioned, have you talked once with your site person on this and if so then what had them to say?
Back to top
View user's profile Send private message
Midhun Mohandas

New User


Joined: 03 Mar 2014
Posts: 24
Location: India

PostPosted: Wed Apr 09, 2014 10:27 am
Reply with quote

Hi,

Thanks for all who have replied my question icon_smile.gif.

I have contacted my support team but they are not that good at OMVS, so if you can help me, I will be able to do it.

Now I understood that an executable created in AIX cannot be executed in OMVS.

Now my only option is to create a executable file in OMVS region itself.

The command I give is cob2 -o <outputfilename> <inputfilename.cbl>

Below is my source file

PROCESS SQL, DLL,LIB,RENT,THREAD,OUTDD(WCGILOUT),SIZE(4000K)
IDENTIFICATION DIVISION.
PROGRAM-ID. REASIN RECURSIVE.
DATA DIVISION.
WORKING-STORAGE SECTION.
EXEC SQL DECLARE U756470.LIBRARY TABLE
( T_BNUM CHAR(5) NOT NULL,
T_BNAME CHAR(20) NOT NULL,
T_AUTHOR CHAR(15) NOT NULL,
T_STATUS CHAR(2) NOT NULL
) END-EXEC.
*************************************************************
* COBOL DECLARATION FOR TABLE U756470.LIBRARY
*************************************************************
01 DCLLIBRARY.
10 T-BNUM PIC X(5).
10 T-BNAME PIC X(20).
10 T-AUTHOR PIC X(15).
10 T-STATUS PIC X(2).
PROCEDURE DIVISION.
EXEC SQL
SELECT T_AUTHOR INTO :T-AUTHOR FROM LIBRARY WHERE
T_BNUM = 'A1234'
END-EXEC
DISPLAY T-AUTHOR.

When I compiled it without using 'CBL' compiler option the error I am getting is 'IGYDS0225-S, An "EXEC SQL" statement was found, but the "SQL" compiler option was not in effect. The statement was discarded.'

Later I added 'sql' compiler option, then the error I am getting is 'IGYOS4081-U, DSNH006I DSNHPSRV FILE "DBRMLIB " COULD NOT BE OPENED'

Please go through restrictions of Cob2 compiler( page number 283) at pic.dhe.ibm.com/infocenter/pdthelp/v1r1/topic/com.ibm.entcobol.doc_4.2/PGandLR/igy3pg50.pdf

Please help me in solving this issue..
Back to top
View user's profile Send private message
Rohit Umarjikar

Global Moderator


Joined: 21 Sep 2010
Posts: 3076
Location: NYC,USA

PostPosted: Wed Apr 09, 2014 12:57 pm
Reply with quote

Did you check ibmmainframes.com/about62574.html ?

As well as www-01.ibm.com/support/docview.wss?uid=swg1PK89652
Back to top
View user's profile Send private message
Midhun Mohandas

New User


Joined: 03 Mar 2014
Posts: 24
Location: India

PostPosted: Wed Apr 09, 2014 2:06 pm
Reply with quote

Hi Rohit,
I have gone through both of the links.

The first link, in the forum, is posted by me but none of the replies helped me to find a solution for what I am looking for though every replies helped me to learn more..

In the second link, it is about editing JCL. But in OMVS there is no option to add DBRMLIB(as there is no JCL) as of my knowledge.

Could you please find a solution for me ?
Back to top
View user's profile Send private message
Nic Clouston

Global Moderator


Joined: 10 May 2007
Posts: 2454
Location: Hampshire, UK

PostPosted: Wed Apr 09, 2014 2:16 pm
Reply with quote

Have you checked the documentation for cob2 to see if the DBRMLIB can be added via a command line switch or any other way?
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8700
Location: Dubuque, Iowa, USA

PostPosted: Wed Apr 09, 2014 6:14 pm
Reply with quote

Which version of Enterprise COBOL are you using? I was researching the issue and found out that my earlier statement was wrong. The version 4.2 Programming Guide manual says in Chapter 15 (Compiling under z/OS UNIX):
Quote:
Restrictions:
v Do not use the SQL compiler option under z/OS UNIX.
Neither the separate SQL precompiler nor the integrated SQL coprocessor run
under z/OS UNIX.


In other words, what you are attempting to do cannot be done directly (at least through version 4.2 of Enterprise COBOL).
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 -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts Unable to interpret a hex value to De... COBOL Programming 4
No new posts Executing DB2 SQL store procedure via... DB2 0
No new posts how to eliminate null indicator value... DB2 7
No new posts Format Binary file to EBCDIC JCL & VSAM 4
No new posts Binary File format getting change whi... All Other Mainframe Topics 7
Search our Forums:

Back to Top