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
 

 

ENQ usage

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
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    Post subject: ENQ usage
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: 8057
Location: East Dubuque, Illinois, USA

PostPosted: Thu Mar 15, 2012 1:09 am    Post subject:
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    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Thu Mar 15, 2012 1:45 am    Post subject: Reply to: ENQ usage
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: 8057
Location: East Dubuque, Illinois, USA

PostPosted: Thu Mar 15, 2012 1:51 am    Post subject:
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    Post subject:
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

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

PostPosted: Thu Mar 15, 2012 4:23 am    Post subject: Reply to: ENQ usage
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    IBMMAINFRAMES.com Support Forums -> CICS All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Need inputs on Space requirement and... ashek15 IMS DB/DC 0 Sat Apr 01, 2017 8:26 am
No new posts How can amount of the Storage Usage b... esduman61 CICS 6 Wed Mar 09, 2016 1:19 pm
No new posts Controlling usage of resources by tasks raja1128 CICS 3 Fri Nov 06, 2015 9:53 am
No new posts TDQ & its usage as ATI akodakka CICS 3 Sat Oct 17, 2015 6:04 pm
No new posts XPED - When command usage anand1204 Compuware & Other Tools 3 Tue Sep 15, 2015 12:50 am


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