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

Binary fields being corrupted in linkage


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

New User


Joined: 12 Sep 2008
Posts: 8
Location: USA

PostPosted: Fri Sep 12, 2008 5:31 pm
Reply with quote

I have been in the business for over 20 years and this one is new to me.

I am testing a new enhancement to our large mainframe system and everything has been going fine. We recently migrated our code to a new CICS region for the business team to do their QA testing. All of a sudden we get an 0C4 storage violation ABEND. According to the Abend-Aid dump two fields that are being passed to a called program have garbage in them. They are defined as PIC S9(4) COMP. They should have had values of 1 and 0 in them but what I see in the dump taken while in the called program is x'40414040' (the 2 fields are adjacent to one another).

So then I recompile the program with Expediter to see what is going on and it works perfectly. Just as it always has. I figure that I picked up something different when I recompiled or something, so I recompiled without XPED again. Two days later the same thing happens. This time I call in a couple teammates to get some new eyes, but they don't see anything I don't see. Once again when the program is put back in a non-XPED state is STILL works.

I have a feeling that it is going to keep happening this way till I can work out the problem. We don't see any issues with the code. I compared the compile options between our Expediter and non-Exped jobs and the only difference is that the Exped compile has NOOPTOMIZE vs. OPTOMIZE for the regular.

Can anyone help me Thanks.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Fri Sep 12, 2008 6:37 pm
Reply with quote

What's really strange is that if you "OR" either one of these halfwords with a X'F0F0' mask, you get the equivalent of X'0000' (X'F0F0') and X'0001' (X'F0F1') in display-numeric format and you're expecting X'0000' and X'0001' in these halfwords.

What's your TRUNC compiler option set to (BIN, STD or OPT) or are these halfwords defined as COMP-5 (Native Binary), which overrides any TRUNC compiler setting? Minimum COBOL version/release for COMP-5 support was OS/390 2.2.1 and any version/release of Enterprise COBOL.

Could this be a clue?

Just a SWAG....

Regards,

Bill
Back to top
View user's profile Send private message
Flasharino

New User


Joined: 12 Sep 2008
Posts: 8
Location: USA

PostPosted: Fri Sep 12, 2008 6:49 pm
Reply with quote

Thanks for the reply Bill. To answer your question, the TRUNC(BIN), but as I pointed out that it true all the time - either XPED or not.

Also - IBM Enterprise COBOL for z/OS 3.4.1
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Fri Sep 12, 2008 10:56 pm
Reply with quote

Optomize does remove code that the compiler assumes will never execute.
Does the program initialize the fields to zero at some point and then later set the one to one?
Can you put a display in the code whare the fields are initialized and/or set and run it both ways?
Back to top
View user's profile Send private message
Flasharino

New User


Joined: 12 Sep 2008
Posts: 8
Location: USA

PostPosted: Fri Sep 12, 2008 11:10 pm
Reply with quote

I am pretty cinfident that the fields are fine when they are initialized. A few lines after that values are moved into them from two counters. The problem seems to come in the program that is then called using these fields as part of the passed linkage data.

How can you put displays in CICS programs??
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Fri Sep 12, 2008 11:52 pm
Reply with quote

Flasharino wrote:
How can you put displays in CICS programs??
Simply display and it magicly appears on the msguser (IIRC)....
Give it a try, it could be helpful.....
Back to top
View user's profile Send private message
Flasharino

New User


Joined: 12 Sep 2008
Posts: 8
Location: USA

PostPosted: Fri Sep 12, 2008 11:54 pm
Reply with quote

I think I have tried that before and it didn't work here. Is that an option that CICS can turn on of off?
Back to top
View user's profile Send private message
Earl Haigh

Active User


Joined: 25 Jul 2006
Posts: 475

PostPosted: Sat Sep 13, 2008 12:08 am
Reply with quote

How can you put displays in CICS programs??

try EXEC CICS WRITE OPERATOR

or

write to the CEEOUT TDO <-- ask your Systems Programmer.

The problem seems to come in the program that is then called using these fields as part of the passed linkage data.

Since you indicate these are S9(4) COMP // halfword 2 bytes.

make sure the called program has storage definitions with correct
storage alignment.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Sat Sep 13, 2008 12:50 am
Reply with quote

Use of the DISPLAY VERB in CICS/COBOL comes under control of LE and message are routed to TDQ "CESE" and is perfectly legal to use in CICS.

Optionally, LE Callable Service routine "CEEMOUT" can also be used as a substitute in CICS.

Regards,

Bill
Back to top
View user's profile Send private message
Flasharino

New User


Joined: 12 Sep 2008
Posts: 8
Location: USA

PostPosted: Wed Sep 17, 2008 11:37 pm
Reply with quote

Doesn't it swap out the entire TCB when you do a DISPLAY in CICS??
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


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

PostPosted: Thu Sep 18, 2008 12:21 am
Reply with quote

Flasharino, I've seen a few of these subtle abends when there's a linkage section (i.e., COMMAREA) mismatch -- frequently due to a copybook problem. The storage violation occurred because the CICS trailer identity block on a chunk of memory had 6 bytes overlaid with application data due to a program not recompiled with the new copybook definition and using the old linkage section length.
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2501
Location: Atlanta, Georgia, USA

PostPosted: Thu Sep 18, 2008 1:34 am
Reply with quote

Flasharino asked "Doesn't it swap out the entire TCB when you do a DISPLAY in CICS??"

I'm assume you're referring to the QR? If there was any giving up of control by the QR (EIP), it would mimic that of a WRITEQ TD QUEUE API.

No, LE is in control of serially operating the TDQ "PUTS" and perhaps (under the covers), DISPLAY in CICS uses CEEMOUT, but that would be a SWAG on my part icon_wink.gif

But, if you're not on OS/VS COBOL, all should be fine.

IIRC, it will even work with COBOL2 but, the key is LE is a run-environment requirement, which is true (and builtin) on all current HLL compilers.

Regards,

Bill
Back to top
View user's profile Send private message
Flasharino

New User


Joined: 12 Sep 2008
Posts: 8
Location: USA

PostPosted: Thu Sep 18, 2008 5:48 pm
Reply with quote

Thanks for all the input.

One last question. How would I look at the contents of the TDQ "CESE" after writing to it? Is that using CECI?

Thanks.
Back to top
View user's profile Send private message
Earl Haigh

Active User


Joined: 25 Jul 2006
Posts: 475

PostPosted: Thu Sep 18, 2008 7:18 pm
Reply with quote

One last question. How would I look at the contents of the TDQ "CESE" after writing to it? Is that using CECI?


ASK YOUR CICS SYSTEMS PROGRAMMER !
Back to top
View user's profile Send private message
Flasharino

New User


Joined: 12 Sep 2008
Posts: 8
Location: USA

PostPosted: Thu Sep 18, 2008 7:21 pm
Reply with quote

Earl Haigh wrote:
ASK YOUR CICS SYSTEMS PROGRAMMER !



I don't know my CICS system programmer. He/she is most likely in a different part of the country.
Back to top
View user's profile Send private message
Earl Haigh

Active User


Joined: 25 Jul 2006
Posts: 475

PostPosted: Thu Sep 18, 2008 8:45 pm
Reply with quote

I don't know my CICS system programmer. He/she is most likely in a different part of the country.

Do they have a phone ?
Back to top
View user's profile Send private message
Flasharino

New User


Joined: 12 Sep 2008
Posts: 8
Location: USA

PostPosted: Thu Sep 18, 2008 9:29 pm
Reply with quote

Earl Haigh wrote:
Do they have a phone ?


I don't know who "they" are. I thought we were talking about a single person, not 'them'.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Sep 18, 2008 10:23 pm
Reply with quote

Hello,

Quote:
I don't know my CICS system programmer. He/she is most likely in a different part of the country.
Ask your help desk - they should at least have a name and an e-mail address if not the phone#.
Back to top
View user's profile Send private message
Earl Haigh

Active User


Joined: 25 Jul 2006
Posts: 475

PostPosted: Thu Sep 18, 2008 10:36 pm
Reply with quote

I don't know who "they" are. I thought we were talking about a single person, not 'them'.


Depends on the size of your organization. Many installations have
several (more than one) CICS systems programmer.

I would think with your 20 years experience you would already know
that.
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 COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts Concatenate 2 fields (usage national)... COBOL Programming 2
No new posts Cobol COMP-2 fields getting scrambled... Java & MQSeries 6
No new posts OPTLINK linkage convention PL/I & Assembler 3
No new posts Converting unpacked fields to pack us... SYNCSORT 4
Search our Forums:

Back to Top