CICS Program & JCL - Failure



Support for CICS/ESA, CICS/TS & Transaction Gateway, CICS Configuration Manager and CICS Performance Analyzer

CICS Program & JCL - Failure

Postby aamirhirani » Sat Jan 14, 2012 12:11 am

Hello,

I am trying to run a CICS program but am not sure whether the JCL being created is of the CICS program or not. Secondly what is DFHRPL for and how can one install that in CICS? Lastly, I had assigned a DSN to Loadlib 'USER.CICSAOR1.LOADLIB' in my JCL as this was not present but on submitting the JCL it did not work.

I have created a program and transation in CICS and on running the transaction I get a message 'Transaction cannot run because program is not available.'

My Program and JCL are below

-------------------------------------------------------------------------------------------------------------------------

*************************************************************************
*
*
*************************************************************************



IDENTIFICATION DIVISION.
PROGRAM-ID. TCICS2.
AUTHOR. AAMIR.


ENVIRONMENT DIVISION.


DATA DIVISION.

01 TEXT-LENGTH PIC S9(4) COMP-4 VALUE +792.
*
01 PRINT-LINE.
05 FILLER PIC X(40) VALUE
'ONCE-UPON A TIME, THERE WERE THREE BEARS'.
05 FILLER PIC X(40) VALUE
', DADDY BEAR, MUMMY BEAR, AND LITTLE BAB'.
05 FILLER PIC X(40) VALUE
'Y BEAR. ONE DAY, EARLY IN THE MORNING BE'.
05 FILLER PIC X(40) VALUE
'FORE BREAKFAST, THEY ALL WENT OUT FOR A '.
05 FILLER PIC X(40) VALUE
'WALK, LEAVING THE PORRIDGE TO COOL ON TH'.
05 FILLER PIC X(40) VALUE
'E KITCHEN TABLE. WHILE THEY WERE AWAY, G'.
05 FILLER PIC X(40) VALUE
'OLDILOCKS CAME UPON THE HOUSE WHILE SHE '.
05 FILLER PIC X(40) VALUE
'WAS SKIPPING THROUGH THE FOREST AND, UPO'.
05 FILLER PIC X(40) VALUE
'N SEEING THE PORRIDGE SITTING INVITINGLY'.
05 FILLER PIC X(40) VALUE
' ON THE TABLE, DECIDED THAT SHE WAS HUNG'.
05 FILLER PIC X(40) VALUE
'RY AND PROMPTLY ATE EVERY BOWL OF PORRID'.
05 FILLER PIC X(40) VALUE
'GE IN SIGHT. FEELING TIRED, SHE THEN RET'.
05 FILLER PIC X(40) VALUE
'IRED TO THE BEDROOM AND FELL ASLEEP IN T'.
05 FILLER PIC X(40) VALUE
'HE BABY BEARS BED. WELL, YOU CAN IMAGINE'.
05 FILLER PIC X(40) VALUE
' THE COMMOTION WHEN THE BEARS GOT BACK. '.
05 FILLER PIC X(40) VALUE
'IT WAS ALL SORTED OUT, THOUGH, WHEN THEY'.
05 FILLER PIC X(40) VALUE
' WENT UPSTAIRS AND FOUND GOLDILOCKS - TH'.
05 FILLER PIC X(40) VALUE
'EY DECIDED THAT SHE''D TASTE MUCH BETTER '.
05 FILLER PIC X(40) VALUE
'THAN THE PORRIDGE ANYWAY SO THEY ATE HER'.
05 FILLER PIC X(32) VALUE
' WITH SOME FRIED WILD MUSHROOMS.'.

LINKAGE SECTION.
01 DFHCOMMAREA PIC S9(4) COMP.
PROCEDURE DIVISION.
EXEC CICS SEND TEXT FROM(PRINT-LINE)
LENGTH(TEXT-LENGTH)
FREEKB
PRINT
END-EXEC.
-------------------------------------------------------------------------------------------------------------------------

//RTPOT04 JOB ,
// MSGCLASS=H,MSGLEVEL=(1,1),TIME=(,4),REGION=0M,COND=(16,LT)
//*
//T0000 EXEC PROC=ELAXFCOT
//COBTRAN.SYSLIB DD DSN=CICSTS.V4R1.CICS.SDFHCOB,DISP=SHR
//COBTRAN.SYSIN DD DISP=SHR,
// DSN=RTPOT04.TEST.COBOL(TCICS2)
//*
//*
//STP0000 EXEC PROC=ELAXFCOC,
// CICS=,
// DB2=,
// COMP=
//COBOL.SYSPRINT DD DISP=SHR,
// DSN=RTPOT04.TEST.LISTING(TCICS2)
//COBOL.SYSDEBUG DD DISP=SHR,
// DSN=RTPOT04.TEST.SYSDEBUG(TCICS2)
//COBOL.SYSLIN DD DISP=SHR,
// DSN=RTPOT04.TEST.OBJ(TCICS2)
//COBOL.SYSLIB DD DISP=SHR,
// DSN=RTPOT04.TEST.COPYLIB
//COBOL.SYSXMLSD DD DUMMY
//COBOL.SYSIN DD DISP=(OLD,DELETE),DSN=&&SYSCIN
//******* ADDITIONAL JCL FOR COMPILE HERE ******
//LKED EXEC PROC=ELAXFLNK
//LINK.SYSLIB DD DSN=RTPOT04.TEST.OBJ,
// DISP=SHR
// DD DSN=CEE.SCEELKED,
// DISP=SHR
//LINK.OBJ0000 DD DISP=SHR,
// DSN=RTPOT04.TEST.OBJ(TCICS2)
//LINK.SYSLIN DD *
INCLUDE OBJ0000
/*
//LINK.SYSLMOD DD DISP=SHR,
// DSN=RTPOT04.TEST.LOAD(TCICS2)
// DD DSN=USER.CICSAOR1.LOADLIB(TCICS2),DISP=SHR
//*
//******* ADDITIONAL JCL FOR LINK HERE ******
//

-------------------------------------------------------------------------------------------------------------------------

Thanks,

Aamir Hirani.
aamirhirani
 
Posts: 1
Joined: Sat Jan 14, 2012 12:07 am
Has thanked: 0 time
Been thanked: 0 time

Re: CICS Program & JCL - Failure

Postby Robert Sample » Sat Jan 14, 2012 12:54 am

1. CICS programs are NOT run through JCL. They run under the control of CICS. The program needs to be compiled into a load library that is concatenated into the DFHPRL for the CICS region your program will run in. DFHRPL is merely a special DD name used by CICS to indicate where to load programs from.

2. Depending upon how the region is set up, you may need to define the transaction and program (and files, if any) to CICS before you can execute your program. These days, CICS transaction CEDA is used to define programs and transactions.

3. JCL to execute CICS will start something like this:
//CICS220  EXEC PGM=DFHSIP,                                             00320029
//         REGION=&REG,                                                 00330029
//         TIME=1440,                                                   00340029
//         PARM='START=&START,SYSIN'                                    00350029
//*                                                                     00360000
//********************************************************************* 00370000
//*        THE CICS STEPLIB CONCATENATION                               00380000
//********************************************************************* 00390000
//STEPLIB  DD   DISP=SHR,DSN=&INDEX1..PROD.SDFHAUTH                     00400061
//*TEPLIB  DD   DISP=SHR,DSN=&INDEX1..CICS.SDFHAUTH                     00400061
//         DD   DISP=SHR,DSN=SYS5.MAINVIEW.V505.BBLINK                  00420029
//         DD   DISP=SHR,DSN=CEE.SCEERUN                                00430044
//********************************************************************* 00440000
//*    THE CICS RELOCATABLE PROGRAM LIBRARY (DFHRPL) CONCATENATION      00450000
//********************************************************************* 00460000
//*                                                                     00500036
//DFHRPL   DD   DISP=SHR,DSN=CICS.JPUE.R242.CICS.LOADLIB                00620061
//*        DD   DISP=SHR,DSN=&INDEX1..OS390.V210.UPGRADE.SDFHLOAD       00620061
//         DD   DISP=SHR,DSN=&INDEX1..PROD.SDFHLOAD                     00620061
//*        DD   DISP=SHR,DSN=&INDEX1..CICS.SDFHLOAD                     00620061
//         DD   DISP=SHR,DSN=TCPIP.SEZATCP
but there will be plenty of other DD names -- usually dump data sets, intrapartition definition, extrapartition data sets, along with other internal files used by CICS.
Robert Sample
Global moderator
 
Posts: 3720
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: CICS Program & JCL - Failure

Postby dick scherrer » Sat Jan 14, 2012 1:50 am

Hello and welcome to the forum,

Suggest you talk with whoever gave you the assignment to write this cics program. They should be able to tell you in which cics region you should compile, link, and run your program. Most often someone writing their first cics program will not have the security permissions to create their own cics region. . .

Later, this may be part of the learning, but i would not think for the very first coding attempt.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to CICS

 


  • Related topics
    Replies
    Views
    Last post