I'm trying to call a C program from my COBOL module. I've found a sample code in the net that uses APIENTRY for every function in C that will be access by the COBOL module (i.e. int APIENTRY UpdateFields(char *, char *, int *) ). However, to use this function, windows.h must be included in the list of header files. Does anyone of you know the counterpart of this function in UNIX? Or is it ok if copy the windows.h header in UNIX?
MicroFocus COBOL compiles COBOL into C, then uses the C run-time, for example.
You should be able to create an object file like this
and then add myfile.o to the command line for the COBOL compile. See your compiler doc set, it will explain linking in external object files. You may have to modify the calling parameters for the function(s) you create in C to tell the C compiler how to clean up the stack. Your COBOL doc set will cover all that.
Thanks for the info Jim. However, when I tried to compile my C module without the APIENTRY (i.e. int bmodcheck (char *, char *, ...) ), I get the following errors ->
$ cc bmodcheck.c -o bmodcheck
Undefined first referenced
symbol in file
socket bmodcheck.o
gethostbyname bmodcheck.o
bind bmodcheck.o
sendto bmodcheck.o
inet_ntoa bmodcheck.o
main /opt/app/SUNWspro/WS6U2/lib/crt1.o
recvfrom bmodcheck.o
ld: fatal: Symbol referencing errors. No output written to bmodchek
I guess this has something to do with my C module wihch has no main() function inside. Would you know how I could fix this problem? If I tried to used the APIENTRY (i.e. int APIENTRY bmodcheck (char *, char *, ...) ), I get the following errors:
$ cc CMPCACVN.cbl bmodcheck.c
"./bmodcheck.h", line 11: syntax error before or at: BMODCHK
"./bmodcheck.h", line 31: warning: old-style declaration or incorrect type for:K
"bmodcheck.c", line 41: syntax error before or at: BMODCHK
cc: acomp failed for bmodcheck.c
Dear All,
Can someone help to command or program to transfer the file from windows to Unix server and from one unix server to another Unix server in secure way.
I would request no samba client. (4 Replies)
Hi Experts,
I have a requirement where i need to setup a batch job which runs everymonth and move the pdf files from unix server to windows servers.
Could some body provide the inputs for this.
and also please provide the inputs on how to map the network dirve in the unix like that... (1 Reply)
Hi,
is it possible to check out the speed limits of a box without a remote peer for netio and stuff?
I transferred 1 Terrabyte last night, which is not really much and need to find the bottleneck. The remote server is soon going to retire, yet I need to copy the 8T to the new machine. This... (9 Replies)
Hello All,
The frecover command on HP UX gives information about the backed up file in the format-
Magic Field:
Machine Identification:
System Identification:HP-UX
Release Identification:B.11.11
Node Identification:
User Identification:
Record Size:
Time:
Media Use:0
Volume Number:1... (1 Reply)
Hi,
How can we set per user core file size, etc in solaris, i.e. I want solaris counterpart/equivalent of linux /etc/security/limits.conf.
TIA (0 Replies)
Hi,
My local server is :/usr/abcd/
Remote server is :/Usr/host/test/
I want to send files from local unix directory(All files starting with O_999) to
remote host unix directory.
Can any body give me the Unix Shell script to do this.
One more doubt: Shall we need to change the file... (1 Reply)
hi
i want run an unix application from a windows program/application.i am using SSH(command line version)to log on to a unix machine from windows. the application has to read a configuration file inorder to run. the configuration file .CFG is in bin in my home directory. but the application... (1 Reply)
Okee problems...!!
What is happening: Unix server with some programms, workstations are windows 2000, the workstations work good but when you start a programm on the Unix server the CPU of the workstations go to 100% usage resulting that the system gets very slow. The programm well its running so... (2 Replies)