View previous topic :: View next topic
|
Author |
Message |
Amb
New User
Joined: 12 Mar 2010 Posts: 64 Location: India
|
|
|
|
Hi,
can anyone let me know the following?
1) What is basically QSAM file?
(I searched the net but can anyone give me a simple answer. I am not able to understand the Queue concept)
2) Is there any advantage of using QSAM file over PS files?
Is there any advantage of using QSAM file over VSAM files?
I am not able to understand why would one go for QSAM files.
3) How to read/write a QSAM file from a COBOL program? Is it the same as we perform a read/write on a sequential file?
If it is not same can anyone provide me a sample code which read/writes in a QSAM file?
4) How to define a QSAM file in a JCL?
I know I am asking very basic questions but I am not able to find satisfactory and detailed answers for the same. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Let's get the terminology right. QSAM is the access method used to access sequential datasets, it's not a type of dataset.
Does that fact maybe answer all of your questions? |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Queued Sequential Access Method from the DFSMS Using Data Sets manual:
Quote: |
QSAM arranges records sequentially in the order that they are entered to form sequential data sets. The system organizes records with other records. QSAM anticipates the need for records based on their order. To improve performance, QSAM reads these records into storage before they are requested. This is called queued access. You can use QSAM with the following data types:
- sequential data sets
- extended-format data sets
- z/OS UNIX files
|
|
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
Back to top |
|
|
Amb
New User
Joined: 12 Mar 2010 Posts: 64 Location: India
|
|
|
|
From the above discussion I understand that QSAM is just an access method for a sequential file.
So if I read/write a sequential file in my COBOL program then how to ensure that the access method used is QSAM
For this do we need to make any changes to the JCL step which is referring to this QSAM file? |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
By using the SELECT statement you tell COBOL what access method to use. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
QSAM is the default -- you would have to make changes to your JCL to use anything else. |
|
Back to top |
|
|
RMD
New User
Joined: 16 Feb 2017 Posts: 2 Location: US
|
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
RMD, adding to a topic after SIX AND A HALF YEARS is not really adding anything to the previous comments. |
|
Back to top |
|
|
|