Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules | Buy Our Software DVD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
Compiler option AWO again

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe COBOL
Author Message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 5447
Location: Computer

PostPosted: Fri Aug 24, 2012 6:13 am    Post subject: Compiler option AWO again
Reply with quote

OK, following on from this one.

Go down a bit, and you'll get to AWO and some discussion of what abends and what doesn't.

I have carefully hand-crafted four programs.

The first has one QSAM VB input and one QSAM VB output. Prior to opening the input, something is moved to record area defined under the FD.

Without compiler option AWO, BANG! S0C4.

With compiler option AWO, RC=0.

The second has one QSAM VB input and one QSAM VB output. After closing the input,
something is moved to record area defined under the FD.

Without compiler option AWO, BANG! S0C4.

With compiler option AWO, RC=0.

The third has one QSAM VB input and one QSAM VB which is not referenced. Prior to opening the input, something is moved to record area defined under the FD.

Without compiler option AWO, BANG! S0C4.

With compiler option AWO, RC=0.

The fourth has one QSAM VB input and one QSAM VB which is not referenced. After closing the input, something is moved to record area defined under the FD.

Without compiler option AWO, BANG! S0C4.

With compiler option AWO, RC=0.

Beginning to sense a pattern, I carefully hand-crafted a further two programs.

These are similar to the above, but only contain one file, which is opened for input.

With both:

Without compiler option AWO, BANG! S0C4.

With compiler option AWO, RC=0.

I decided not to bother testing to prove that the MOVE to the record-area after end of tile would abend with AWO - if it doesn't abend after the close, it won't abend after end of file.

I suppose worth one more carefully hand-crafted program. FB.

As expected. S0C4 irrespective of AWO.

My advice remains: use APPLY WRITE ONLY for all QSAM VB output files. Do not use compiler option AWO,

Of course, you may have no choice :-)

So be aware of what is going on...
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 5447
Location: Computer

PostPosted: Mon Aug 27, 2012 2:20 pm    Post subject: Reply to: Compiler option AWO again
Reply with quote

Just a run-through on why not to use compiler option AWO.

AWO applies to all QSAM VB In the program, including input files.

What this means for the input files (since the WRITE part obviously does not apply) is that the record is moved from the buffer to a record-area which is pointed-to by the FD.

The is no advantage for you in this.

Although this allows for sloppy coding, like using the FD before the file is open, after the file is closed or after end-of-file, as soon as you recompile without AWO, or go to another site which does not use AWO, your sloppy code will fail (in the case of the first two) and may fail in the case of the latter.

With no advantage, you are left with the disadvantage of each input record being moved, and the additional processing time that that takes. MVCL is a "slow" instruction, and that is what will be used.

APPLY WRITE ONLY is good to use on all your QSAM VB output files. Spell it out for each of them and don't use (unless forced to by site standards) compiler option AWO.
Back to top
View user's profile Send private message
Anuj Dhawan

Global Moderator


Joined: 22 Apr 2006
Posts: 6256
Location: Mumbai, India

PostPosted: Mon Aug 27, 2012 3:51 pm    Post subject:
Reply with quote

Thanks Bill. You got me thinking now... icon_smile.gif
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe COBOL All times are GMT + 6 Hours
Page 1 of 1

 



 
Master the Mainframes | Bookmarks | Subscriptions | Site Map | Polls | Photos | FAQ | Rules | Contact Us