COBOL

  • 1.  JCL for compiling simple Cobol Hello Word source code to executable

    Posted Wed February 21, 2024 11:14 AM

    Good Evening

    I struggle with JCL and compilation. I have to admit I know nearly nothing about JCL.

    Could anybody provide me with valid JCL to compile simple source code file ?
    I have Cobol source file HELLO on dataset IBMUSER.APP.COBOL
    I have dataset IBMUSER.APP.O prepared for object files

    My compiler is IGY630.SIGYCOMP

    Regards,

    Piotr



    ------------------------------
    Piotr Synowiec
    ------------------------------


  • 2.  RE: JCL for compiling simple Cobol Hello Word source code to executable

    IBM Champion
    Posted Thu February 22, 2024 08:35 AM

    Here you go:

    //jobnameA JOB ,'your name',MSGCLASS=H
    //*
    //***************************************************************
    //*                                                                                                                  *
    //*              COBOL COMPILE, BIND AND FETCH JCL                         *
    //*                                                                                                                    *
    //***************************************************************
    //*
    //JSTEP01  EXEC PGM=IGYCRCTL,REGION=0M
    //*
    //STEPLIB  DD DSN=IGY630.SIGYCOMP,DISP=SHR
    //         DD DSN=CEE.SCEERUN,DISP=SHR
    //         DD DSN=CEE.SCEERUN2,DISP=SHR
    //*
    //SYSIN    DD DSN=IBMUSER.APP.COBOL(HELLO),DISP=(MOD,KEEP,KEEP)
    //*
    //SYSLIN   DD DSN=&&OBJMOD,SPACE=(CYL,(1,1)),DISP=(MOD,PASS,DELETE)
    //*
    //SYSPRINT DD SYSOUT=*
    //*
    //SYSUT1   DD SPACE=(CYL,(1,1))
    //SYSUT2   DD SPACE=(CYL,(1,1))
    //SYSUT3   DD SPACE=(CYL,(1,1))
    //SYSUT4   DD SPACE=(CYL,(1,1))
    //SYSUT5   DD SPACE=(CYL,(1,1))
    //SYSUT6   DD SPACE=(CYL,(1,1))
    //SYSUT7   DD SPACE=(CYL,(1,1))
    //SYSUT8   DD SPACE=(CYL,(1,1))
    //SYSUT9   DD SPACE=(CYL,(1,1))
    //SYSUT10  DD SPACE=(CYL,(1,1))
    //SYSUT11  DD SPACE=(CYL,(1,1))
    //SYSUT12  DD SPACE=(CYL,(1,1))
    //SYSUT13  DD SPACE=(CYL,(1,1))
    //SYSUT14  DD SPACE=(CYL,(1,1))
    //SYSUT15  DD SPACE=(CYL,(1,1))
    //SYSMDECK DD SPACE=(CYL,(1,1))
    //*
    //JSTEP02  EXEC PGM=IEWBLINK,COND=(0,LT)
    //*
    //SYSLIB   DD DSN=CEE.SCEELKED,DISP=SHR
    //*
    //SYSLIN   DD DSN=&&OBJMOD,DISP=(OLD,DELETE,DELETE)
    //*
    //SYSLMOD  DD DSN=IBMUSER.APP.O(HELLO),
    //            SPACE=(1024,(50,20,1)),
    //            DSNTYPE=LIBRARY,
    //            DISP=(MOD,CATLG,KEEP)
    //*
    //SYSPRINT DD SYSOUT=*
    //*
    //JSTEP03  EXEC PGM=HELLO,COND=(0,LT)
    //*
    //STEPLIB  DD DSN=IBMUSER.APP.O,DISP=SHR
    //*
    //input data set(s)
    //*
    //output data set(s)
    //*
    //SYSUDUMP DD SYSOUT=*
    //



    ------------------------------
    Geoffrey Decker
    Instructor
    Northern Illinois University
    DeKalb IL
    8155015250
    ------------------------------



  • 3.  RE: JCL for compiling simple Cobol Hello Word source code to executable

    IBM Champion
    Posted Thu February 22, 2024 08:39 AM

    If you have no input or output data sets, you can delete the lines at the bottom:

    //input data set(s)

    and

    //output data set(s)

    Good luck!



    ------------------------------
    Geoffrey Decker
    Instructor
    Northern Illinois University
    DeKalb IL
    8155015250
    ------------------------------



  • 4.  RE: JCL for compiling simple Cobol Hello Word source code to executable

    Posted Thu February 22, 2024 11:55 AM

    Hi Geoffrey,
    your script helped a lot, Thank you. I have it done.

    Could you please let me know what and where do I need to add to above JCL
    to be able to compile and link against my custom library (DLL) that I have in IBMUSER.APP.LIB(MYLIB)

    Regards,

    Piotr



    ------------------------------
    Piotr Synowiec
    ------------------------------