> -----Original Message-----
> From: IBM Mainframe Discussion List On Behalf Of McKown, John
> 
> Almost every VSAM file SELECT we have is coded as below:
> 
> 
> SELECT HISTORY-FILE
>     ASSIGN TO GCR05KSD
>     RECORD KEY IS HST05-KEY
>     ORGANIZATION IS INDEXED
>     ACCESS IS DYNAMIC
>     FILE STATUS IS HISTORY-STATUS.
> 
> That is, with ACCESS IS DYNAMIC. This despite the fact that the file
is opened only once, for INPUT:
> 
>     OPEN INPUT HISTORY-FILE.
> 
> I'm concerned that this results in less efficient I/O. In particular,
that it results in more CPU
> usage than if the ACCESS were changed from DYNAMIC to SEQUENTIAL. The
READ is of the form:
> 
> 
> READ HISTORY-FILE NEXT RECORD INTO HISTORY-RECORD
>     AT END MOVE 'Y' TO HISTORY-FILE-EOF-SW.
> 
> From what I can tell, sometime in the past, some programming manager
made ACCESS IS DYNAMIC a required
> standard for all VSAM files. I guess for "flexibility". Does this make
any significant difference in
> terms of CPU usage at all?

A long time ago (OS/VS COBOL) ACCESS DYNAMIC was considerably more
"expensive" than ACCESS SEQUENTIAL for a VSAM dataset that was processed
sequentially; I guess because of (lack of "proper") default VSAM
buffering.  Nowadays I don't get much chance to notice, because the vast
majority of our application code is DB2-based rather than VSAM-based.

    -jc-

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to