1834635 Members
3487 Online
110069 Solutions
New Discussion

MFCOBOL

 
SOLVED
Go to solution
anand_10
Occasional Contributor

MFCOBOL

I am trying to create executable from a simple
cobol program on hpux 11.00.

Finally i want to write embeded sql in COBOL and link(Some dynamic and some static)
them to call interface libraries of database
server.

Please find simple program for which i am unable to create executable.

Unable to read symbols from shared libraries also(Used +/-B static/dynamic option)
Actions of world are nothing but co-incidences.
6 REPLIES 6
Victor BERRIDGE
Honored Contributor
Solution

Re: MFCOBOL

Hi,
I dont see anything wrong...
Whats COPLIB?

Have you checked the presence of /usr/ccs/lib/crt0.o?
-r--r--r-- 1 bin bin 11608 Dec 15 2000 /usr/ccs/lib/crt0.o
What version are you using?
Unfortunately Im very busy on software install at the moment so cannot spare time but I tried to compile your program:
My env has no cobol variables:
/home/vbe $ env
_=/usr/bin/env
MANPATH=/usr/share/man/%L:/usr/share/man:/usr/contrib/man/%L:/usr/contrib/man:/usr/local/man/%L:/usr/local/ma
n:/opt/upgrade/share/man/%L:/opt/upgrade/share/man:/usr/dt/share/man:/opt/pd/share/man/%L:/opt/pd/share/man:/
opt/ignite/share/man/%L:/opt/ignite/share/man:/opt/resmon/share/man:/opt/pred/share/man/%L:/opt/pred/share/ma
n:/opt/hparray/share/man/%L:/opt/hparray/share/man:/opt/audio/share/man:/opt/ansic/share/man/%L:/opt/ansic/sh
are/man:/opt/langtools/share/man/%L:/opt/langtools/share/man:/opt/imake/man:/opt/samba/man:/opt/tusc/man:/opt
/hpnp//man:/opt/perf/man/%L:/opt/perf/man:/opt/prm/man/%L:/opt/prm/man:/opt/cobol/cobdir/man:/opt/OV/man/itos
e/%L:/opt/OV/man/itose
PATH=/usr/bin:/opt/ansic/bin:/usr/ccs/bin:/usr/contrib/bin:/opt/nettladm/bin:/opt/fc/bin:/opt/fcms/bin:/opt/u
pgrade/bin:/opt/pd/bin:/usr/bin/X11:/usr/contrib/bin/X11:/opt/resmon/bin:/opt/pred/bin:/opt/hparray/bin:/opt/
ignite/bin:/opt/langtools/bin:/opt/imake/bin:/opt/samba/bin:/opt/tusc/bin:/opt/hpnp//bin:/opt/gcc/bin:/opt/pe
rf/bin:/opt/prm/bin:/opt/cobol/bin:/opt/OV/bin/OpC:.
EDITOR=vi
LOGNAME=vbe
MAIL=/var/mail/vbe
ERASE=^H
SHELL=/usr/bin/ksh
TMOUT=0
HOME=/home/vbe
TERM=hpterm
PWD=/home/vbe
TZ=MET-1METDST
LINES=51
A__z=-5TMOUT
abenezra:/home/vbe $
abenezra:/home/vbe $ which cob
/opt/cobol/bin/cob
abenezra:/home/vbe $ cob -x cob01.cob
ld: (Warning) At least one PA 2.0 object file (/var/tmp/cobBAAa12550/verlibhpcobol.o) was detected. The linke
d output may not run on a PA 1.x system.
abenezra:/home/vbe $ ll
total 242
-rwxrwxrwx 1 vbe bin 28672 Jun 18 13:51 cob01
-rw-rw-rw- 1 vbe bin 575 Jun 18 13:35 cob01.cob
-rw-rw-rw- 1 vbe bin 1792 Jun 18 13:51 cob01.int
-rw-rw-rw- 1 vbe bin 2656 Jun 18 13:51 cob01.o


Good luck

Victo
anand_10
Occasional Contributor

Re: MFCOBOL

Hello Victor,

Following is my version information.

-----------------------------------------
Cobol/HP-UX HP35326 B.13.40 Copyright Hewlett-Packard Co. 1989-2002
V4.1 revision 30 build 10/10/2 G
-----------------------------------------

I am able to execute with cobrun command using .int genarated.

crt0.o is avilable

$ ls -l /lib/crt0*
lr--r--r-T 1 root sys 19 Jun 21 2001 /lib/crt0.o@ -> /usr/ccs/lib/crt0.o
$


$ ls -l /usr/ccs/lib/crt0.o
-r--r--r-- 1 bin bin 12436 Oct 10 2001 /usr/ccs/lib/crt0.o

Please suggest.

Thanks,
Anand.


Actions of world are nothing but co-incidences.
Ravi_8
Honored Contributor

Re: MFCOBOL

Hi, Anand

Usually i find all the cobol programs end with .cbl ( like .c in C pgms), in ur case it is ending with .cob.

#cob -x .cbl
will create the output in the name of input-file.

After compilation
#./input_file will gives u the output.
never give up
anand_10
Occasional Contributor

Re: MFCOBOL

Hello Ravi,

I tried to create executable for the demo .cbl programs came with software, But the same results.

Thanks,
Anand.
Actions of world are nothing but co-incidences.
Ravi_8
Honored Contributor

Re: MFCOBOL

Hi, Anand

Look like problem with cobol,
why don't u try re-installing the cobol
never give up
Victor BERRIDGE
Honored Contributor

Re: MFCOBOL

Hi again Anand,
Still not much time... but definitely nothing wrong with your program since its execution:
home/vbe $ ll
total 234
-rwxrwxrwx 1 vbe bin 28672 Jun 18 13:51 cob01
-rw-rw-rw- 1 vbe bin 575 Jun 18 13:35 cob01.cob
-rw-rw-rw- 1 vbe bin 1792 Jun 18 13:51 cob01.int
-rw-rw-rw- 1 vbe bin 2656 Jun 18 13:51 cob01.o
abenezra:/home/vbe $ ./cob01
EXECUTING LAB1...

abenezra:/home/vbe $
The cobol Im using is not the HP enhanced MF but the microfocus: cd /opt/cobol
# ll
total 10
drwxr-xr-x 2 root sys 1024 May 22 2001 bin
drwxr-xr-x 19 root sys 4096 May 22 2001 cobdir
drwxrwxrwx 2 root sys 96 May 22 2001 etc
# more cobdir/cobver
cobol v4.1.30-e
PRN=OXUPR/ZZB:8c.l5.13.03
PTI=NLS
PTI=LMF
PTI=ASLMF
PTI=Y2K
# more etc/env_cobol
export COBDIR=/opt/cobol/cobdir
export PATH=$PATH:/opt/cobol/bin
export SHLIB_PATH=/opt/cobol/cobdir/coblib
I would suggest you do the same (well almost): in your home directory create a cob_profile (chmod 775 on it after) with in it something like:
export COBDIR=/opt/lib/cobol
#export COBLIB=/opt/lib/cobol/lib
export PATH=$PATH:/opt/lib/cobol/bin
export SHLIB_PATH=$COBDIR/lib:%SHLIB_PATH
#export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/lib/cobol/lib

The commented line were for a later version but not compatible with some modules we have, and so I uninstalled it, and cant try it to see how your program would react.
The idea is to put in all paths the cobol needs first...

Sorry cant help more for now
Good luck
Victor