<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://debianws.lexgopc.com/wiki143/index.php?action=history&amp;feed=atom&amp;title=Basic_sequential_access_method</id>
	<title>Basic sequential access method - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://debianws.lexgopc.com/wiki143/index.php?action=history&amp;feed=atom&amp;title=Basic_sequential_access_method"/>
	<link rel="alternate" type="text/html" href="http://debianws.lexgopc.com/wiki143/index.php?title=Basic_sequential_access_method&amp;action=history"/>
	<updated>2026-04-22T15:38:19Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>http://debianws.lexgopc.com/wiki143/index.php?title=Basic_sequential_access_method&amp;diff=5628302&amp;oldid=prev</id>
		<title>imported&gt;BD2412: clean up spacing around commas and other punctuation, replaced: ,and  → , and  (2)</title>
		<link rel="alternate" type="text/html" href="http://debianws.lexgopc.com/wiki143/index.php?title=Basic_sequential_access_method&amp;diff=5628302&amp;oldid=prev"/>
		<updated>2025-06-20T01:23:49Z</updated>

		<summary type="html">&lt;p&gt;clean up spacing around commas and other punctuation, replaced: ,and  → , and  (2)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Short description|Access method to read and write datasets sequentially}}&lt;br /&gt;
In [[IBM mainframe]] [[operating system]]s, &amp;#039;&amp;#039;&amp;#039;Basic sequential access method&amp;#039;&amp;#039;&amp;#039; (&amp;#039;&amp;#039;&amp;#039;BSAM&amp;#039;&amp;#039;&amp;#039;)&amp;lt;ref&amp;gt;{{cite book|publisher=IBM|title=IBM System/360 Operating System Sequential Access Methods Program Logic Manual|id=Y28-6604-1|date=January 1967|url=http://www.bitsavers.org/pdf/ibm/360/os/plm_1966-67/Y28-6604-1_Sequential_Access_Methods_PLM_Jan67.pdf}}&amp;lt;/ref&amp;gt; is an [[access method]] to read and write [[data set (IBM mainframe)|dataset]]s sequentially. BSAM is available on [[OS/360]], [[OS/VS2]], [[MVS]], [[z/OS]], and related operating systems.&lt;br /&gt;
&lt;br /&gt;
BSAM is used for devices that are naturally sequential, such as [[punched card]] readers, punches, [[line printer]]s, and [[Magnetic tape data storage|magnetic tape]]. It is also used for data on devices that could also be addressed directly, such as [[Disk storage|magnetic disks]]. BSAM offers device independence: to the extent possible, the same [[Application programming interface|API]] calls are used for different devices.&lt;br /&gt;
&lt;br /&gt;
BSAM allows programs to read and write physical [[Block (data storage)|blocks]] of data, as opposed to the more powerful but less flexible [[Queued Sequential Access Method]] (QSAM) which allows programs to access logical records within physical blocks of data.&lt;br /&gt;
The BSAM user must be aware of the possibility of encountering short (truncated) blocks (blocks within a dataset which are shorter than the BLKSIZE of the dataset), particularly at the end of a dataset, but also in many cases within a dataset. QSAM has none of these limitations.&lt;br /&gt;
&lt;br /&gt;
==Application program interface==&lt;br /&gt;
The programmer specifies &amp;lt;code&amp;gt;DSORG=PS&amp;lt;/code&amp;gt; in his [[Data Control Block]] (DCB) to indicate use of BSAM.&lt;br /&gt;
As a &amp;#039;&amp;#039;basic&amp;#039;&amp;#039; access method BSAM reads and writes member data in [[Block (data storage)|blocks]] and the I/O operation proceeds [[Asynchronous I/O|asynchronously]] and must be tested for completion using the &amp;lt;code&amp;gt;CHECK&amp;lt;/code&amp;gt; macro.&amp;lt;ref name=Macro&amp;gt;{{cite book|last1=IBM Corporation|title=OS Data Management Macro Instructions|date=June 1973|url=http://bitsavers.informatik.uni-stuttgart.de/pdf/ibm/360/os/R21.7_Apr73/GC26-3794-1_OS_Data_Management_Macro_Instructions_Rel_21.7_Jun73.pdf|accessdate=August 19, 2016}}&amp;lt;/ref&amp;gt; BSAM uses the standard system macros &amp;lt;code&amp;gt;OPEN&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;CLOSE&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;READ&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;WRITE&amp;lt;/code&amp;gt;, and &amp;lt;code&amp;gt;CHECK&amp;lt;/code&amp;gt;. The &amp;lt;code&amp;gt;NOTE&amp;lt;/code&amp;gt; macro instruction returns position of the last block read or written, and the &amp;lt;code&amp;gt;POINT&amp;lt;/code&amp;gt; macro will reposition to the location identified by a previous &amp;lt;code&amp;gt;NOTE&amp;lt;/code&amp;gt;.&amp;lt;ref name=Macro /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the dataset is unblocked, that is, the logical record length (LRECL) is equal to the physical block size (BLKSIZE), BSAM may be utilized to simulate a directly accessed dataset using &amp;lt;code&amp;gt;NOTE&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;POINT&amp;lt;/code&amp;gt; on any supported direct access device type (DEVD=DA), and some primitive applications were designed in this way.&lt;br /&gt;
&lt;br /&gt;
==Similar facilities==&lt;br /&gt;
The BSAM application program interface can be compared with the interface offered by &amp;#039;&amp;#039;open&amp;#039;&amp;#039;, &amp;#039;&amp;#039;read&amp;#039;&amp;#039;, &amp;#039;&amp;#039;write&amp;#039;&amp;#039; and &amp;#039;&amp;#039;close&amp;#039;&amp;#039; calls (using file handles) in other operating systems such as [[Unix]] and [[Microsoft Windows|Windows]]. &amp;lt;code&amp;gt;POINT&amp;lt;/code&amp;gt; provides an analog of &amp;#039;&amp;#039;seek&amp;#039;&amp;#039; or &amp;#039;&amp;#039;lseek&amp;#039;&amp;#039;, and &amp;#039;&amp;#039;ftell&amp;#039;&amp;#039; is the equivalent of &amp;lt;code&amp;gt;NOTE&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
==See also==&lt;br /&gt;
*[[Queued Sequential Access Method]] (QSAM)&lt;br /&gt;
*[[Hierarchical Sequential Access Method]] (HSAM)&lt;br /&gt;
*[[Basic Indexed Sequential Access Method]] (BISAM)&lt;br /&gt;
*[[Queued Indexed Sequential Access Method]] (QISAM)&lt;br /&gt;
*[[Hierarchical Indexed Sequential Access Method]] (HISAM)&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Mainframe I/O access methods}}&lt;br /&gt;
&lt;br /&gt;
[[Category:IBM mainframe operating systems]]&lt;/div&gt;</summary>
		<author><name>imported&gt;BD2412</name></author>
	</entry>
</feed>