Using IBM utility CEE3DLY to invoke a delay in cobol program

This is a Mainframe COBOL forum - you can post your queries on Mainframe COBOL, VS COBOL II, COBOL/370 , Enterprise COBOL

Moderators: dbzTHEdinosauer, Moderator Group

Post Reply
Sumit Jindal
Member
Posts: 2
Joined: Thu Apr 19, 2012 8:31 am
Location: India

Using IBM utility CEE3DLY to invoke a delay in cobol program

Post by Sumit Jindal » Thu Apr 19, 2012 9:04 am

My requirement is : I am passing number of seconds I want my program to wait through JCL.

Calling CEE3DLY as : Call "CEE3DLY" USING WAIT-TIME
WAIT-TIME is having the no of seconds passed through JCL and was defined in data division as: PIC S9(9) BINARY

Problem I am facing:
Getting S0C4 when I am trying to call CEE3DLY"
Error is : "CEE3204S The system detected a protection exception (System Completion Code=0C4)"

Though this error is removed when i invoke cobol inbuilt function of date just before calling the CEE3DLY as shown below(for example):

MOVE FUNCTION CURRENT-DATE (9:8) TO CURR-TIME
Call "CEE3DLY" USING WAIT-TIME
In this case my program works successfully.

So I was wondering how is protection exception (S0C4) removed in later case.

Thanks in advance for the time spent on my doubt.

DikDude
Moderator
Posts: 1001
Joined: Fri Jul 22, 2011 8:39 am
Location: usa

Post by DikDude » Thu Apr 19, 2012 7:59 pm

Suggest you reconsider what you are trying to do.

Many organizations (most, in my long experience) will not permit a batch job to just sit in an initiator. Why does someone believe there is a need for a delay after the job begins executing?

How is curr-time defined? Is it part of wait-time?

Is the link edit different when the 2 different compiles are run?
Have a good one

Sumit Jindal
Member
Posts: 2
Joined: Thu Apr 19, 2012 8:31 am
Location: India

Post by Sumit Jindal » Fri Apr 20, 2012 9:29 am

Hi DikDude
Thanks for you reply.
I very well agree what you said, but basically what I am doing is converting a Assembler program which is using STIMER Macro to Cobol.
So for this I need to put delay in my COBOL program too.

I have defined wait-time and curr time as:
01 WAIT-TIME PIC S9(9) BINARY.
01 CURR-TIME PIC 9(8).

I have defined wait-time as binary because CEE3DLY utility expects input as full word binary in range from 0 to 3600

Link Edits are same in both the compiles.

DikDude
Moderator
Posts: 1001
Joined: Fri Jul 22, 2011 8:39 am
Location: usa

Post by DikDude » Fri Apr 20, 2012 9:40 pm

Hello,

Just because the code has "always" used STIMER does not mean that should remain "forever". Depending on the requirement, it may be accomplished thru the Scheduling System for the environment.

If you are forced to implement the delay, why not clone the old assembler code that issues the STIMER and create a new "delay" assembler module. You could call this from the COBOL code and basically be where you are today.

Sorry i don't have any CEE3DLY experience.
Have a good one

NicC
Active Member
Posts: 650
Joined: Sun Jul 24, 2011 5:27 pm
Location: Down on the pig farm

Post by NicC » Sun Apr 22, 2012 12:33 pm

Please do not post in multiple forums at the same time - it is considered impolite and as a lot of the people offering help visit most forums you are wasting their time as they read duplicates.
Regards
Nic

User avatar
dbzTHEdinosauer
Moderator
Posts: 981
Joined: Mon Oct 02, 2006 8:31 pm

Post by dbzTHEdinosauer » Sun Apr 22, 2012 4:50 pm

besides your problem is a syntax error,
you could not even be bothered to code the instruction properly.

refer to an LE manaul for proper syntax of CEE3DLY.

the invokation of current_date probably loaded a register,
that was still loaded when your incorrectly coded instruction was invoked.

really all first grader stuff,
use the proper syntax and a lot of your problems go away.
Dick Brenholtz
JCL, SQL and code in programs have an irritating habit of doing what you say,
not what you meant.

Post Reply

FREE TUTORIALS

Tutorials
Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Interview
Mainframe Interview questions



Other References
Mainframe Tools and others