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
 

 

Compiler option AWO again

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7315

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: 7315

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

Senior Member


Joined: 22 Apr 2006
Posts: 6258
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
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts DFSORT - Overriding default option TU... Steve Ironmonger DFSORT/ICETOOL 3 Tue Apr 04, 2017 3:54 pm
No new posts Who can recomend or to know a PL1 com... Miguel Fernandez DB2 0 Tue Feb 14, 2017 1:42 pm
No new posts BWO option in VSAM blayek CICS 3 Sat Nov 05, 2016 10:47 am
No new posts Regarding COBOL Stored Procedure opti... selvamsrinivasan85 DB2 4 Fri Nov 04, 2016 8:57 pm
No new posts Any docs / links for isub- cobol comp... SRICOBSAS COBOL Programming 4 Fri Aug 26, 2016 2:35 pm


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