BMSMAP2 is my mapname. i am using CICS to send the variable value to screen.
my cobol code :
Code:
IDENTIFICATION DIVISION.
PROGRAM-ID. "CBL1".
ENVIRONMENT DIVISION.
DATA DIVISION.
WORKING-STORAGE SECTION.
LINKAGE SECTION.
01 A PIC A.
01 B PIC A.
PROCEDURE DIVISION USING BY VALUE A RETURNING B.
MOVE A TO B.
GOBACK.
END PROGRAM "CBL1".
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
I think you missed in your reading of the previous topic my references to document SA22-7563, z/OS Language Environment Writing Interlanguage Communication Applications. You need to get a copy of this and read it thoroughly. I suspect you need a #pragma statement but I'm not sure since I haven't done a C calling COBOL under CICS program. There's an entire chapter of C calling COBOL and some examples using fetch that might help.
One thing that appears to be missing is your including the COBOL module into your C load module -- the message about CBL1@@FC is indicating that the COBOL module isn't being located (although why the @@FC is being appended, I'm not sure).
Joined: 13 Dec 2008 Posts: 38 Location: Mexico City
Hi,
I tried a lot...finally am able to call cobol from C( using C-COBOL)
but that is not including cics.
when i am including cics the c code, it is not working properly.
i think my C-CICS-COBOL(for calling cobol in C and including CICS in C) compiler has some problem.
if anyone has this compiler, can they post it here..!!??
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
Hello,
Quote:
if anyone has this compiler, can they post it here..!!??
The correct compile jcl will be specific to your environment. Suggest you talk with the people who support the compliers and link editor.
It is quite common to have separate callable modules for batch and cics. If you are trying to use the exact same module, this may be part of your problem.
Joined: 13 Dec 2008 Posts: 38 Location: Mexico City
i tried.
its not working.
i am able to compile CICS-C program (without calling cobol).
and able to run C-COBOL program(c progm calling cobol without any CICS).
they both have diff jcls.
the jcl of CICS-C is posted above and is working.
the jcl for C-COBOL is below :
Code:
/SMXSBSC JOB (XXXXX,X),'ZANY ',
// MSGCLASS=X,NOTIFY=&SYSUID,
// REGION=0M
//CC EXEC EDCC,CPARM='OPTF(DD:OPTIONS)',
// INFILE='SMXSBS.SCS.C(CICSCPG1)',
// OUTFILE='SMXSBS.SCS.OBJ(CICSCPG1),DISP=SHR'
//COMPILE.OPTIONS DD *
DLL RENT LONGNAME
/*
//BIND1 EXEC CBCB,BPARM='CALL,DYNAM=DLL,REUS=RENT',
// OUTFILE='SMXSBS.SCS.LOAD(CICSCPG1),DISP=SHR'
//INOBJ DD DISP=SHR,DSN=SMXSBS.SCS.OBJ
//SYSLIB DD DISP=SHR,DSN=SMXSBS.SCS.LOAD <--o/p pds of type LIBRARY
//INOBJ1 DD DISP=SHR,DSN=SMXSBS.SCS.CDLL.LOAD
//SYSLIN DD *
INCLUDE INOBJ(CICSCPG1) <-----c obj from previous step
INCLUDE INOBJ1(CBL1) <-----cobol dll
ENTRY CEESTART
NAME CICSCPG1(R)
/*
i just have to combine both the steps.
the problem is, i dont know where to add this bind step (C and COBOL).
if i add the bind step to C-CICS jcl, then where should i add it. And will i have to exclude the prelink or linkedit step from the C-CICS jcl if am adding the BIND1 step in it.
the other problem is, even if i add the BIND1 step in C-CICS jcl, it wont work because the PDS of OUTFILE is of type LIBRARY, and all the temporary PS that are being created in C-CICS jcl( which are being used to refer back to previous steps) , does not match the type.
i need help. i knw this is very complicated and difficult for some1 sitting someplace else to help without looking at the codes. but if some1 who has tried this out and had been successful, i request them to kindly reply to this.
at least give me some idea.
i tried to get hold of some materials to study. but there is none available on C calling COBOL with CICS in it.
Joined: 06 Jun 2008 Posts: 8700 Location: Dubuque, Iowa, USA
I've just gone through many of the CICS manuals and cannot find any mention of DLL. I suspect you cannot create a DLL that is used in CICS; you must create a load module that can be moved into the DFHRPL concatenation instead. I have not been able to confirm this, but there's no mention of DLL in the Resource Defintion manual, the Installation Guide, Application Programming Reference, Application Programming Guide, Customization Guide, or Intercommunications Guide.
Change your C program to generate a load module in a PDS instead of a DLL, which will simplify your binding (linkage editing) task as well.