If adding the compiler to the STEPLIB resolved a runtime problem (./hello.exe ... Killed), I expect that you were probably running some very old compiler using a pre-LE runtime?
IBM Canada Ltd.
Original Message:
Sent: Tue October 03, 2023 09:12 AM
From: Piotr Synowiec
Subject: ZOS/Unix cob2 compiling and executing
this solved the problem
STEPLIB=IGY630.SIGYCOMP
------------------------------
Piotr Synowiec
Original Message:
Sent: Fri September 29, 2023 09:52 AM
From: Piotr Synowiec
Subject: ZOS/Unix cob2 compiling and executing
tried STEPLIB=CEE.SCEERUN bit didn't help
------------------------------
Piotr Synowiec
Original Message:
Sent: Wed September 20, 2023 08:06 AM
From: Bernie Rataj
Subject: ZOS/Unix cob2 compiling and executing
Hi Piotr,
I suspect that you don't have the LE runtime (*.SCEERUN in the LP(32) case) in your search order. You could try adding it to the STEPLIB environment variable to see if that's the case.
On the other hand, the compile should result in a warning, truncating the name HELLOWORLD to 8 characters, which your examples don't show.
Bernie
------------------------------
Bernie Rataj
Technical Support Professional
IBM Canada Ltd.
Markham ON Canada
https://www.ibm.com/products/cobol-compiler-zos
https://www.ibm.com/products/pli-compiler-zos
Original Message:
Sent: Tue September 19, 2023 08:16 AM
From: Piotr Synowiec
Subject: ZOS/Unix cob2 compiling and executing
Hello everybody.
I'm starting with Cobol on ZOS/Unix.
My environment is terminal via SSH to ZOS machine.
I have Cobol program hello.cbl with basic code to display message.
```
IDENTIFICATION DIVISION.
PROGRAM-ID. "HELLOWORLD".
AUTHOR. PIOTR SYNOWIEC.
ENVIRONMENT DIVISION.
DATA DIVISION.
PROCEDURE DIVISION.
MAIN-PROCEDURE.
DISPLAY "**************************************************"
DISPLAY " *** Hello World"
STOP RUN.
END PROGRAM HELLOWORLD.
```
Program compiles easily with GnuCobol & IBM Cobol compiler on Linux and I can easily execute compiled program.
I tried the same on ZOS/Unix using flag "RENT" as per description here Running COBOL programs under z/OS UNIX
cob2 -v hello.cbl -o hello.exe
Compiler messages
compiler: ATTCRCTL PARM=RENT,TERM /u/ibmuser/TIPS/tests/basic/hello.cbl
linker: /bin/c89 -o hello.exe -e // hello.o
Running program
./hello.exe
Message
Killed
Tried with -q64
cob2 -v -q64 hello.cbl -o hello.exe
Compiler messages:
compiler: ATTCRCTL PARM=RENT,TERM,LP(64) /u/ibmuser/TIPS/tests/basic/hello.cbl
linker: /bin/c89 -o hello.exe -Wl,LP64 -e // hello.o
IEW2480W A711 EXTERNAL SYMBOL CEELLIST OF TYPE LD WAS ALREADY DEFINED AS A
SYMBOL OF TYPE LD IN SECTION CELQLLST.
IEW2482W A712 THE ORIGINAL DEFINITION WAS IN A MODULE IDENTIFIED BY DDNAME
SYSLIB. THE DUPLICATE DEFINITION IS IN SECTION CEEBLLST IN A
MODULE IDENTIFIED BY DDNAME SYSLIB.
FSUM3065 The LINKEDIT step ended with return code 4.
running result is the same: Killed
Could anybody help me to sort that out ?
Regards,
Piotr
------------------------------
Piotr Synowiec
------------------------------