View previous topic :: View next topic
|
Author |
Message |
Sumit Jindal
New User
Joined: 19 Apr 2012 Posts: 8 Location: India
|
|
|
|
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 |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
Jose Mateo
Active User
Joined: 29 Oct 2010 Posts: 121 Location: Puerto Rico
|
|
|
|
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 |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
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 |
|
|
Sumit Jindal
New User
Joined: 19 Apr 2012 Posts: 8 Location: India
|
|
|
|
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 |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
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. |
|
Back to top |
|
|
|