Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Using IBM utility CEE3DLY to invoke a delay in cobol program

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
Sumit Jindal

New User


Joined: 19 Apr 2012
Posts: 8
Location: India

PostPosted: Sat Apr 21, 2012 10:53 pm    Post subject: Using IBM utility CEE3DLY to invoke a delay in cobol program
Reply with quote

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.

For this I am using CEE3DLY utility of IBM.
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"

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

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.
I am defining CURR-TIME as "01 CURR-TIME PIC 9(8)" and is not having any relation with the WAIT-TIME.

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

Thanks in advance for the time spent on my doubt.
Back to top
View user's profile Send private message

Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Sat Apr 21, 2012 11:19 pm    Post subject: Reply to: Using IBM utility CEE3DLY to invoke a delay in cob
Reply with quote

Are you passing the WAIT-TIME (seconds) in the JCL (PARM=) as 4-Bytes Hex/Binary or are you Calling a sub-program which issues the CEE3DLY, passing the WAIT-TIME as 4-Bytes Binary in a Parameter (CALL USING)?

If you're passing the WAIT-TIME, pass it as DISPLAY-NUMERIC and then move it to an S9(09) BINARY (Fullword) in WORKING-STORAGE when the program gains control.

Please provide an example (in hex) of your passed WAIT-TIME value.

Also, I'm assuming this is a Batch program? Are you specifying DYNAM as your compile option? If so, then define a WS field "WS-CEE3DLY" as PIC X(08) with a values of "CEE3DLY" and use this in your CALL.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Sun Apr 22, 2012 2:47 am    Post subject:
Reply with quote

Quote:
Calling CEE3DLY as : Call "CEE3DLY" USING WAIT-TIME.


maybe you just need to use the proper syntax

it is obvious why you are experiencing a soc4.
the reason you are not receiving the soc4 after a function call to current_date
is because some register contains a valid address.

fix your syntax.
Back to top
View user's profile Send private message
Jose Mateo

Active User


Joined: 29 Oct 2010
Posts: 110
Location: Puerto Rico

PostPosted: Mon Apr 23, 2012 7:32 pm    Post subject:
Reply with quote

Good day to all!

Do you have AMODE(31) and DATA(31) in your compile options? If no, then do so and test again your first scenario.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Mon Apr 23, 2012 8:59 pm    Post subject: Reply to: Using IBM utility CEE3DLY to invoke a delay in cob
Reply with quote

Jose,

DBZ replied, pointing out that the 2nd-parm is missing, which is the 12-byte feedback-code and that's what's needed.

LE Callable routines can be CALLED from 31-Bit and 24-Bit callers without consequence.

Once the feedback-code field is added as the 2nd-parm, then all should be OK.
Back to top
View user's profile Send private message
Sumit Jindal

New User


Joined: 19 Apr 2012
Posts: 8
Location: India

PostPosted: Tue Apr 24, 2012 12:41 pm    Post subject:
Reply with quote

Thanks everyone for your replies.

What is was doing is just calling CEE3DLY only using one of the parameter (input seconds) as its mentioned in manuals that other parameter(feedback Code)is optional and that's the reason I was getting S0C4

So as suggested by DBZ and Bill O'Boyle to remove the S0C4 we can define a 12 byte feedback code in working storage and call the utility as:

CALL "CEE3DLY" USING wait-time, feedback-code

Also if we don't want to use Feedback code, we can call CEE3DLY as:

CALL "CEE3DLY" USING wait-time OMITTED.

In the above case feedback code will be omitted.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Tue Apr 24, 2012 5:45 pm    Post subject: Reply to: Using IBM utility CEE3DLY to invoke a delay in cob
Reply with quote

The first two-bytes of the feedback-code act as a "Return-Code" and informs the Caller of success (X'0000's) or failure (not X'0000's).

I think it's wise to always supply a feedback-code when calling all LE Callable Service routines, even though IBM may indicate that it's optional, because someday, they may change their minds and make it mandatory. icon_eek.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts INVOKE WEBSERVICE error danik56 CICS 11 Thu Mar 09, 2017 11:52 am
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am
No new posts SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm
No new posts Execute TSO ACF commands from COBOL-I... supreethi.srid TSO/ISPF 0 Tue Feb 21, 2017 5:19 pm
No new posts Mainframe Interview Questions CICS,CO... akshathan Mainframe Interview Questions 6 Thu Feb 09, 2017 6:38 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us