IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

ENQ usage


IBM Mainframe Forums -> CICS
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
akodakka

New User


Joined: 20 May 2010
Posts: 75
Location: India

PostPosted: Thu Mar 15, 2012 12:47 am
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Thu Mar 15, 2012 1:09 am
Reply with quote

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
View user's profile Send private message
akodakka

New User


Joined: 20 May 2010
Posts: 75
Location: India

PostPosted: Thu Mar 15, 2012 1:15 am
Reply with quote

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
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Mar 15, 2012 1:45 am
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Thu Mar 15, 2012 1:51 am
Reply with quote

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
View user's profile Send private message
akodakka

New User


Joined: 20 May 2010
Posts: 75
Location: India

PostPosted: Thu Mar 15, 2012 1:51 am
Reply with quote

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
View user's profile Send private message
Bill Woodger

Moderator Emeritus


Joined: 09 Mar 2011
Posts: 7309
Location: Inside the Matrix

PostPosted: Thu Mar 15, 2012 4:23 am
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CICS

 


Similar Topics
Topic Forum Replies
No new posts STEM usage in REXX CLIST & REXX 14
No new posts z/OS Modules Usage report using SMF 42 DFSORT/ICETOOL 2
No new posts Concatenate 2 fields (usage national)... COBOL Programming 2
No new posts JCL and TAPE drives: how to maximize ... JCL & VSAM 9
No new posts Usage of BINSEARCH PL/I PL/I & Assembler 1
Search our Forums:

Back to Top