On Thu, Sep 16, 2010 at 12:43 PM, Scott Ford <scott_j_f...@yahoo.com> wrote:

>  INCLUDE SYSLIB(EDCSTART)
>  INCLUDE SYSLIB(CEEROOTB)
>  IN
> Sam:
>
>  INCLUDE SYSLIB(EDCSTART)
>  INCLUDE SYSLIB(CEEROOTB)
>  INCLUDE SYSLIB(IGZEBST)
>  INCLUDE SYSLIB(@@CBL2C)
>  INCLUDE SYSMOD(xxx)    <-  I think this should be the C module
>  ENTRY TS04B                     <- C module
>  NAME  THRALLC(R)                <- name for the cobol routine
>
>
Hi Scott,
My error, I should have been more clear.  Use the entry TS04B when you
compile/bind TS04B.

Do not use it for your cobol program.  sorry about that.

Sam


> Yields a S0C1 ...
>
> SYSTEM COMPLETION CODE=0C1  REASON CODE=00000001
>  TIME=15.38.39  SEQ=00058  CPU=0000  ASID=001A
>  PSW AT TIME OF ERROR  078D0000   91A01718  ILC 2  INTC 01
>    ACTIVE LOAD MODULE           ADDRESS=11A00A28  OFFSET=00000CF0
>    NAME=THRALLC
>    DATA AT PSW  11A01712 - F34407FF  000011A0  1A200000
>    GR 0: FD000008   1: 00006FF8
>       2: 00000040   3: 008D79D4
>       4: 008D79B0   5: 008FF350
>       6: 008C6FE0   7: FD000000
>       8: 91A017E0   9: 008CFCC8
>       A: 00000000   B: 11A01680
>       C: 00000000   D: 00006F60
>       E: 91A0168A   F: 11A01A20
>
> Regards,
>
> Scott J Ford
>
>
>
>
>
> ________________________________
> From: Sam Siegel <s...@pscsi.net>
> To: IBM-MAIN@bama.ua.edu
> Sent: Thu, September 16, 2010 3:33:49 PM
> Subject: Re: Cobol calling C function
>
> On Thu, Sep 16, 2010 at 12:26 PM, Scott Ford <scott_j_f...@yahoo.com>
> wrote:
>
> > Good point, but that compiled C module is in that library but i
> > Sam:
> >
> > Good point, but that compiled C module is in that library but it brings
> a
> > good
> > point. According the the LE/C manuals the binder should look like this:
> >
> > INCLUDE SYSLIB(EDCSTART)
> > INCLUDE SYSLIB(CEEROOTB)
> > INCLUDE SYSLIB(IGZEBST)
> > INCLUDE SYSLIB(@@CBL2C)
> > INCLUDE SYSMOD(xxx)    <-  I think this should be the C module
> > ENTRY CBLRTN                <- cobol routine
> > NAME  XXXX(R)                <- name for the cobol routine
> >
> > The CSECT for C was wrong in the linkage output , here is the line from
> the
> > Binder...
> >
> > z/OS V1 R10 BINDER    12:52:13 THURSDAY SEPTEMBER 16, 2010
> > BATCH EMULATOR  JOB(ADCDMETA) STEP(LKED    ) PGM= HEWL
> > IEW2278I B352 INVOCATION PARAMETERS - AMODE=31,MAP
> >
> > IEW2650I 5102 MODULE ENTRY NOT PROVIDED.  ENTRY DEFAULTS TO SECTION
> > $PRIV000010.
> >
> > Maybe its me, but this looks wrong
> >
> >
> That message occurs when your 'c' function does not have a 'main' in it and
> no ENTRY control card is specified for the binder.
>
> Try ENTRY TS04B in your binder and see if it goes away.
>
> Sam
>
>
> > Scott J Ford
> >
> >
> >
> >
> >
> > ________________________________
> > From: Sam Siegel <s...@pscsi.net>
> > To: IBM-MAIN@bama.ua.edu
> > Sent: Thu, September 16, 2010 2:38:31 PM
> > Subject: Re: Cobol calling C function
> >
> > On Thu, Sep 16, 2010 at 11:27 AM, Scott Ford <scott_j_f...@yahoo.com>
> > wrote:
> >
> > > START OF TS04A
> > > CEE3207S The system detected a data exception (
> > > zMan:
> > >
> > > START OF TS04A
> > > CEE3207S The system detected a data exception (System Completion
> > Code=0C7).
> > >          From compile unit THRALLC at entry point THRALLC at compile
> unit
> > > offset
> > >          at address 11A00E4E.
> > >
> > > Looks like I have something wrong in C. I am not a C heavy...So any
> help
> > is
> > > super great !
> > > Thanks
> > >
> > > I'm not sure if this is related but you appear to be dynamically
> calling
> > a
> > > function that you have statically linked.  Are you sure that you are
> > picking
> > > up the correct version of TSO4B?
> > >
> >
> > Sam
> >
> > >
> > > Scott J Ford
> > >
> > >
> > >
> > >
> > >
> > > ________________________________
> > > From: zMan <zedgarhoo...@gmail.com>
> > > To: IBM-MAIN@bama.ua.edu
> > > Sent: Thu, September 16, 2010 1:58:43 PM
> > > Subject: Re: Cobol calling C function
> > >
> > > What is the failure you're seeing?
> > >
> > > On Thu, Sep 16, 2010 at 1:38 PM, Scott Ford <scott_j_f...@yahoo.com>
> > > wrote:
> > > > I have seen several 'bit and piece' posts on LE Cobol calling C
> > > > All:
> > > >
> > > > I have seen several 'bit and piece' posts on LE Cobol calling C. I
> have
> > > written
> > > > a sample C call and here is the source and have included the C source
> > and
> > > JCL
> > > ,
> > > > Cobol source and JCL, I dont understand what I have missed, I have
> been
> > > through
> > > > the LE Books and C-C++ books and I am confused and the execution is
> > > receiving
> > > a
> > > > S0C7 :
> > > >
> > > > JCL for 'C' compile:
> > > > ----------------------
> > > >
> > > > //ADCDMETA JOB SYSTEMS,MSGLEVEL=(1,1),MSGCLASS=X,CLASS=A,PRTY=8,
> > > > //    NOTIFY=&SYSUID,REGION=0M
> > > > //    EXEC EDCCL,
> > > > //  INFILE=SFORD.JCLLIB.CNTL(TESTC)',
> > > > //  OUTFILE='SFORD.CLINKLIB(TS04B),DISP=SHR'
> > > >
> > > > 'C'  Source:
> > > > -------------------
> > > >
> > > > #include <stdio.h>
> > > > #include <string.h>
> > > > #pragma linkage(TS04B,COBOL)
> > > > void TS04B( char *pBuffer )
> > > > {
> > > >  strcpy( pBuffer, "OK      ");
> > > >  fprintf(stderr,"ok trans\n");
> > > > }
> > > >
> > > > LE Cobol V4r1 JCL:
> > > > --------------------------
> > > >
> > > > //ADCDTHRA JOB SYSTEMS,MSGLEVEL=(1,1),MSGCLASS=X,CLASS=A,PRTY=8,
> > > > //    NOTIFY=&SYSUID,REGION=4096K
> > > > //*----------------------------------------------------------------
> > > > //COB    EXEC PGM=IGYCRCTL,
> > > > //            PARM=('NOC(E)','FLAG(W)','DATA(31)',NODYN,RES,RENT,OPT,
> > > > //            MAP,NOSSR,NOZWB,NUM,NOTERM,NOVBREF,X,APOST,LIB,LIST),
> > > > //            REGION=1024K
> > > > //STEPLIB  DD DISP=SHR,DSN=IGY410.SIGYCOMP
> > > > //SYSLIB    DD DISP=SHR,DSN=CEE.ACEESRC1
> > > > //          DD DISP=SHR,DSN=SFORD.CLINKLIB
> > > > //SYSPRINT  DD SYSOUT=X
> > > > //SYSUT1    DD UNIT=VIO
> > > > //SYSUT2    DD UNIT=VIO
> > > > //SYSUT3    DD UNIT=VIO
> > > > //SYSUT4    DD UNIT=VIO
> > > > //SYSUT5    DD UNIT=VIO
> > > > //SYSUT6    DD UNIT=VIO
> > > > //SYSUT7    DD UNIT=VIO
> > > > //SYSLIN    DD DISP=(,PASS),DSN=&&LOADSET,
> > > > //            UNIT=VIO,
> > > > //            DCB=BLKSIZE=3200
> > > > //SYSIN    DD DISP=SHR,DSN=SFORD.COBOL.SOURCE(THRALLC)
> > > > //*
> > > > //LNK    EXEC PGM=IEWL,
> > > > //            COND=(4,LT,COB),
> > > > //            PARM='LIST,XREF',
> > > > //            REGION=4096K
> > > > //SYSLIB    DD DISP=SHR,DSN=SFORD.CLINKLIB
> > > > //          DD DISP=SHR,DSN=CEE.SCEELKED
> > > > //          DD DISP=SHR,DSN=SYS1.CSSLIB
> > > > //          DD DISP=SHR,DSN=TCPIP.SEZATCP
> > > > //SYSLMOD  DD DISP=SHR,DSN=SFORD.CLINKLIB
> > > > //SYSUT1    DD UNIT=SYSDA,
> > > > //            DCB=BLKSIZE=1024,
> > > > //            SPACE=(1024,(200,20))
> > > > //SYSPRINT  DD SYSOUT=X
> > > > //SYSLOUT  DD SYSOUT=X
> > > > //SYSLIN    DD DISP=(OLD,DELETE),DSN=&&LOADSET
> > > > //          DD DDNAME=SYSIN
> > > > //SYSIN    DD *
> > > >  MODE AMODE(31),RMODE(ANY)
> > > >  INCLUDE SYSLIB(EDCSTART)
> > > >  INCLUDE SYSLIB(CEEROOTB)
> > > >  INCLUDE SYSLIB(@@CBL2C)
> > > >  INCLUDE SYSLMOD(TS04B)
> > > >  ENTRY THRALLC
> > > >  NAME THRALLC(R)
> > > > /*
> > > > //
> > > >
> > > > LE Cobol Source:
> > > > ---------------------
> > > >
> > > >        IDENTIFICATION DIVISION.
> > > >        PROGRAM-ID. THRALLC.
> > > >        ENVIRONMENT DIVISION.
> > > >        INPUT-OUTPUT SECTION.
> > > >        FILE-CONTROL.
> > > >        DATA DIVISION.
> > > >        FILE SECTION.
> > > >        WORKING-STORAGE SECTION.
> > > >        01 TS04B        PIC X(8) VALUE 'TS04B'.
> > > >        01 TESTIT      PIC X(10) VALUE 'SCOTT'.
> > > >        PROCEDURE DIVISION.
> > > >            DISPLAY 'START OF TS04A'.
> > > >            CALL TS04B USING TESTIT.
> > > >            DISPLAY TESTIT.
> > > >            GOBACK.
> > > >
> > > > Sorry for the long post, but I think one has to see all the pieces.
> > > > Please tell me am I blind in my old age or what...
> > > > Thanks in advance.
> > > >
> > > >
> > > > Scott J Ford
> > > >
> > > >
> > > >
> > > >
> > > >
> ----------------------------------------------------------------------
> > > > For IBM-MAIN subscribe / signoff / archive access instructions,
> > > > send email to lists...@bama.ua.edu with the message: GET IBM-MAIN
> INFO
> > > > Search the archives at http://bama.ua.edu/archives/ibm-main.html
> > > >
> > >
> > >
> > >
> > > --
> > > zMan -- "I've got a mainframe and I'm not afraid to use it"
> > >
> > > ----------------------------------------------------------------------
> > > For IBM-MAIN subscribe / signoff / archive access instructions,
> > > send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
> > > Search the archives at http://bama.ua.edu/archives/ibm-main.html
> > >
> > >
> > >
> > >
> > >
> > > ----------------------------------------------------------------------
> > > For IBM-MAIN subscribe / signoff / archive access instructions,
> > > send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
> > > Search the archives at http://bama.ua.edu/archives/ibm-main.html
> > >
> >
> > ----------------------------------------------------------------------
> > For IBM-MAIN subscribe / signoff / archive access instructions,
> > send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
> > Search the archives at http://bama.ua.edu/archives/ibm-main.html
> >
> >
> >
> >
> >
> > ----------------------------------------------------------------------
> > For IBM-MAIN subscribe / signoff / archive access instructions,
> > send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
> > Search the archives at http://bama.ua.edu/archives/ibm-main.html
> >
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
> Search the archives at http://bama.ua.edu/archives/ibm-main.html
>
>
>
>
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
> Search the archives at http://bama.ua.edu/archives/ibm-main.html
>

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to