Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
What is basically QSAM file

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

New User


Joined: 12 Mar 2010
Posts: 64
Location: India

PostPosted: Fri Aug 13, 2010 5:05 pm    Post subject: What is basically QSAM file
Reply with quote

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
View user's profile Send private message

superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4650
Location: Raleigh, NC, USA

PostPosted: Fri Aug 13, 2010 5:13 pm    Post subject: Reply to: QSAM files
Reply with quote

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
View user's profile Send private message
superk

Moderator Team Head


Joined: 26 Apr 2004
Posts: 4650
Location: Raleigh, NC, USA

PostPosted: Fri Aug 13, 2010 5:16 pm    Post subject: Reply to: QSAM files
Reply with quote

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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8165
Location: East Dubuque, Illinois, USA

PostPosted: Fri Aug 13, 2010 5:22 pm    Post subject:
Reply with quote

This link may help explain it for you: http://publib.boulder.ibm.com/infocenter/zos/basics/index.jsp?topic=/com.ibm.zos.zconcepts/zconcepts_150.htm

If you are creating a tape, you cannot use VSAM -- so you must use QSAM (or BSAM). There are times when sequential files make sense, just as there are times when indexed or relative record files make sense. You pick the file access based on business requirements, and the way you access the file (i.e., the access method) then follows naturally.
Back to top
View user's profile Send private message
Amb

New User


Joined: 12 Mar 2010
Posts: 64
Location: India

PostPosted: Mon Aug 16, 2010 10:02 am    Post subject: Reply to: What is basically QSAM file
Reply with quote

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
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2442
Location: Netherlands, Amstelveen

PostPosted: Mon Aug 16, 2010 3:05 pm    Post subject:
Reply with quote

By using the SELECT statement you tell COBOL what access method to use.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8165
Location: East Dubuque, Illinois, USA

PostPosted: Mon Aug 16, 2010 4:32 pm    Post subject:
Reply with quote

QSAM is the default -- you would have to make changes to your JCL to use anything else.
Back to top
View user's profile Send private message
RMD

New User


Joined: 16 Feb 2017
Posts: 2
Location: US

PostPosted: Sun Feb 19, 2017 7:58 pm    Post subject: Reply to: What is basically QSAM file
Reply with quote

Processing QSAM files

https://www.ibm.com/support/knowledgecenter/en/SS6SG3_3.4.0/com.ibm.entcobol.doc_3.4/tpqsm01.htm
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8165
Location: East Dubuque, Illinois, USA

PostPosted: Sun Feb 19, 2017 8:35 pm    Post subject:
Reply with quote

RMD, adding to a topic after SIX AND A HALF YEARS is not really adding anything to the previous comments.
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 Execute JCL step based on the content... sprikitik JCL & VSAM 2 Tue Oct 03, 2017 10:03 am
This topic is locked: you cannot edit posts or make replies. PS file data should be passed as symb... d_sarlie JCL & VSAM 15 Tue Oct 03, 2017 5:18 am
No new posts Garbage on output file Hervey Martinez SYNCSORT 4 Wed Sep 27, 2017 12:50 am
No new posts File Aid tool to compare numeric data balaji81_k Compuware & Other Tools 2 Tue Sep 26, 2017 3:35 am
No new posts Compare yesterday's date to the one o... migusd SYNCSORT 11 Fri Sep 22, 2017 11:35 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us