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
 

 

READQ TS returning inconsistent address pointer

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
View previous topic :: :: View next topic  
Author Message
moezbud

New User


Joined: 03 May 2016
Posts: 7
Location: usa

PostPosted: Wed May 04, 2016 1:09 am    Post subject: READQ TS returning inconsistent address pointer
Reply with quote

I have a program that is executing a READQ TS that is behaving very strangely. It is coded as follows:

Code:
MOVE +70 TO WS-LENGTH.
MOVE +1 TO WK-ITEM.

EXEC CICS READQ TS
        QUEUE ('TEMPQ001')
        SET     ('TEMP-PTR)
        LENGTH (WS-LENGTH)
        ITEM    (WK-ITEM)
        RESP    (WS-RESP)
        RESP2  (WS-RESP2)
        END-EXEC.

IF WS-RESP NOT GOOD .... DO SOMETHING

SET ADDRESS OF WK-STATUS-AREA TO TEMP-PTR.


My program was dying downstream because it had bad data in the WK-STATUS-AREA. However, when I'd step through the program (this logic) with expediter, everything worked fine. I finally found that, when I would do the following:

1. put expediter breaks immediately before the READQ command and then immediately after,
2. then use the expediter PF9 key to step through one line of code at a time (going from the exec to the IF statement)
3. kick off the remaining transaction with a PF12

Everything would work. However, if I would use expediter this way:

1. put expediter breaks immediately before the READQ command and then immediately after,
2. then use the expediter PF12 key to step through one line of code at a time (going from the exec to the IF statement)
3. kick off the remaining transaction with a PF12

Then my transaction would die (as it would when I processed the whole transaction normally).

What I found was that the TEMP-PTR is coming back with a different address when I step through (PF9) the code than when it executes in different ways. I determined this with an experiment - I stacked two identical READQ EXECs back to back in the program and used PF9 on one and PF12 on the other.

I hope I made sense here. The problem has me completely baffled. I've experimented with different compiler options (above the line, below, etcl) and I always get the same result - the logic only works when I step through one line at a time with expediter....

If anyone has any thoughts or insight, I would appreciate hearing from you.

Thanks!
Back to top
View user's profile Send private message

Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7904
Location: Bellevue, IA

PostPosted: Wed May 04, 2016 2:10 am    Post subject:
Reply with quote

What did the Xpediter vendor say when you raised the issue? If you haven't, then why not?

How is TEMP-PTR defined?
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1609
Location: NY,USA

PostPosted: Wed May 04, 2016 2:16 am    Post subject:
Reply with quote

Code:
SET(ptr-ref) Specifies the pointer reference that is set to the address of the retrieved data. The pointer reference, unless changed by other commands or statements, is valid until the next READQ TS command or the end of task.
If the application program is defined with DATALOCATION(ANY), the address of the data can be above or below the 16 MB line. If the application program is defined with DATALOCATION(BELOW), the address of the data is below the 16 MB line.

If TASKDATAKEY(USER) is specified for the running task, and storage protection is active, the data that is returned is in a user-key. If TASKDATAKEY(CICS) is specified and storage protection is active, the data that is returned is in a CICS-key.
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: Wed May 04, 2016 2:18 am    Post subject: Reply to: READQ TS returning inconsistent address pointer
Reply with quote

Is this TSQ shared by other programs or tasks? If so, then you'll need ENQ/DEQ API's to serialize access.

HTH....
Back to top
View user's profile Send private message
moezbud

New User


Joined: 03 May 2016
Posts: 7
Location: usa

PostPosted: Wed May 04, 2016 2:19 am    Post subject: Reply to: READQ TS returning inconsistent address pointer
Reply with quote

Thank you, Rohit. I had already looked that up. Unfortunately, it does not explain why the pointer address that is coming back from the READQ TS execution is invalid (unless I missed something). I did, however, attempt the various compile options that were noted in the text that you offered, but I got the same results.
Back to top
View user's profile Send private message
moezbud

New User


Joined: 03 May 2016
Posts: 7
Location: usa

PostPosted: Wed May 04, 2016 2:21 am    Post subject:
Reply with quote

Thank you, Bill. I will look into that.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7904
Location: Bellevue, IA

PostPosted: Wed May 04, 2016 2:23 am    Post subject:
Reply with quote

I'm not sure why you thought changing compile options would make any difference. What is the difference between using PF9 and PF12 in Xpediter?
Back to top
View user's profile Send private message
moezbud

New User


Joined: 03 May 2016
Posts: 7
Location: usa

PostPosted: Wed May 04, 2016 2:29 am    Post subject:
Reply with quote

Robert.... I was grasping at straws. When I read the part of the manual that Rohit listed above, it mentioned something about DATALOCATION. I started tweaking that option as well as AMODE, etc. Needless to say, they didn't work....

PF9 in xpediter executes one line of code. PF12 will execute until the next breakpoint. In my case, they should have essentially been the same thing. I put breakpoints on two consecutive lines (one for the EXEC statement and one on the line immediately after it). However, the results of the temp-ptr field were different based on using the PF9(correct pointer) versus the PF12(incorrect pointer).
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7904
Location: Bellevue, IA

PostPosted: Wed May 04, 2016 2:41 am    Post subject:
Reply with quote

One obvious difference is that Xpediter has to insert code to break for each line of code with F9 and doesn't have to do that for F12. I think your best bet is to contact the vendor for assistance -- they most likely have seen the problem before and know just how to resolve it.

I've seen a similar problem in the past -- a program wouldn't work until it was Xpedited at which time the code worked fine. IIFC (and it's been more than 20 years so that recall may not be correct), the issue was a storage overlay involving a map in CICS; since the Xpediter screen was injected in the middle it prevented the problem for showing up.
Back to top
View user's profile Send private message
moezbud

New User


Joined: 03 May 2016
Posts: 7
Location: usa

PostPosted: Wed May 04, 2016 2:53 am    Post subject:
Reply with quote

That's probably a wise course of action. My thinking was that this is not a "problem" with xpediter. It was only a tool to try to determine the root of the problem. It could have just as easily been a display.

It was just interesting and baffling to me that xpediter would allow the program to work in some way.

However, you have a good point. They likely have seen something like this before and may have an idea about how to correct it. I'll follow up with them.

Thanks for your input
Back to top
View user's profile Send private message
RahulG31

Active User


Joined: 20 Dec 2014
Posts: 331
Location: USA

PostPosted: Wed May 04, 2016 3:43 am    Post subject: Reply to: READQ TS returning inconsistent address pointer
Reply with quote

What are the RESP and RESP2 values, if I may ask?

.
Back to top
View user's profile Send private message
moezbud

New User


Joined: 03 May 2016
Posts: 7
Location: usa

PostPosted: Wed May 04, 2016 8:16 am    Post subject:
Reply with quote

The Resp values both came back with 0's.
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1609
Location: NY,USA

PostPosted: Wed May 04, 2016 4:35 pm    Post subject:
Reply with quote

Code:
Use the INTO or SET option to state whether the record is to be read into an area of main storage provided by your application program (READ INTO), or into an area of main storage CICS SET storage acquired by file control (READ SET). If the latter, the address of the data in the CICS SET storage is returned to your program. CICS SET storage normally remains valid until the next syncpoint, or the end of the task, or until next READ against the same file, whichever comes first.
If you have used the SET option, you do not have to specify the LENGTH option. However, you may specify it if you want to check whether the record length agrees with that originally defined to VSAM. The data area specified is set to the actual record length after the record has been retrieved.

Would you also try with INTO or has to be done by SET?
Back to top
View user's profile Send private message
prino

Active Member


Joined: 07 Feb 2009
Posts: 982
Location: Oostende, Belgium

PostPosted: Wed May 04, 2016 5:04 pm    Post subject:
Reply with quote

If you're running a program with a debugger, or compiler options that are different from those used on production compiles, you're running a different program!

Period. End of story.
Back to top
View user's profile Send private message
moezbud

New User


Joined: 03 May 2016
Posts: 7
Location: usa

PostPosted: Wed May 04, 2016 6:38 pm    Post subject:
Reply with quote

Rohit, yes I went the route you noted above late yesterday (using INTO). We got it working that way. I'll just chalk the SET problem up to one of the mysteries of the universe.... My problem was just getting stuck on something that "should" work and playing with it too long after I determined that it didn't.

Thanks to all for your input.
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 execute APP if they are not ADDRESS T... italo_pm CLIST & REXX 3 Fri Aug 12, 2016 2:15 am
This topic is locked: you cannot edit posts or make replies. Get and display content of an address... lind sh CICS 1 Mon Aug 08, 2016 9:18 am
No new posts OUTREC FILELDS FAILS WITH ICE126A 2 ... balaji81_k DFSORT/ICETOOL 8 Sat Jul 02, 2016 1:22 am
No new posts How to ADDRESS ACEE apart from CICS A... pkmurali CICS 3 Fri Apr 22, 2016 12:37 am
No new posts IP address of user's machine shreya19 TSO/ISPF 5 Wed Mar 16, 2016 3:24 pm


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