View previous topic :: View next topic
|
Author |
Message |
akodakka
New User
Joined: 20 May 2010 Posts: 75 Location: India
|
|
|
|
Hi
I have a code like below
Code: |
If Tab-Ptr is equal to Nulls
Display 'Ptr is null, '
Exec CICS Enq
Resource (PROGA)
Length (Length Of PROGA)
End-Exec
If Tab-Ptr is equal to Nulls
Display 'Ptr is null 2nd time'
|
Here my display will be only - Ptr is null,
Here Tab-Ptr is pointer and when i check the null for Tab-ptr its null and after ENQ PROGA ( where this progA using this Tab-ptr) the Tab-ptr is not null.
Could anyone advise if ENQ command will trigger or change the pointer values thats used in the program |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
Since you didn't bother to explain where TAB-PTR is defined, nor how it is used, why do you think ANYBODY on this forum could explain whatever behavior you're seeing? ENQ, as far as I know, does not do anything except suspend your program until the requested resource becomes available (or sets a flag if NONSUSPEND is used) -- it's not supposed to be doing things to your variables. |
|
Back to top |
|
|
akodakka
New User
Joined: 20 May 2010 Posts: 75 Location: India
|
|
|
|
Hi Robert
The tab-ptr is defined as a pointer in the same program.
But my actual query is there any possibilty of that a pointer = null changes after i do a ENQ(PROGA). And yes in PROGA i am dealing with tab-ptr.
I don't see any explanation for this as there is no other statements comes in between.
Thanks
Anoop |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
On the ENQ the PROGA is just a bit of text, establishing a name for a resource, isn't it?
If you are able to test it, change the PROGA text to something else to convince yourself there is no relationship. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
I think you are confusing PROGA the program with PROGA the ENQ resource. They are not the same -- do not think they are. |
|
Back to top |
|
|
akodakka
New User
Joined: 20 May 2010 Posts: 75 Location: India
|
|
|
|
Hi Bill
Yes PROGA is a variable with a value of a PROGRAM name.
and another thing before the above mentioned statemnt am calling another prog which is also using tab-ptr but there is no address will get assigned to the pointer in that prog
so the code is as below
Call PROGXX
end call
And then the above mentioned code
so am wondering if this giving some time of delay for the address get updated in the pointer. |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
No, no time delays. You're beginning to clutch at straws.
You are going to have to show the actual code. What you have given so far, looks re-typed.
Please past the definition of the pointer and fields before and after it, and all references in the program to the pointer, in their context.
For what you have shown so far, if the value was NULL before the EXEC CICS ENQ, then the value will be NULL immediately afterwards. The ENQ cannot be affecting the pointer.
So, it doesn't make sense. That's why you have to paste what is actually there. |
|
Back to top |
|
|
|