IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Code to create QSAM dataset


IBM Mainframe Forums -> IMS DB/DC
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
pingte

Active User


Joined: 03 Dec 2005
Posts: 120
Location: india

PostPosted: Tue Oct 16, 2007 2:54 pm
Reply with quote

PART 1: Will the below mentioned code create QSAM dataset?
Code:

//IDCAMS1  EXEC PGM=IDCAMS                     
//SYSPRINT DD SYSOUT=A                         
//SYSIN    DD *                               
 DEFINE GDG (NAME(X.QSAM) -
            LIMIT(48) NOEMPTY SCRATCH)         
/*


Code:

//ABCDEF EXEC IMSPAPI,MBR=IMSPROG,PSB=IMSPSB,DBRC=Y,
//BKO=N,MON=N,IRLM=Y,IRLMNM=IRLM,DMPDEST=STATVIEW
//XYZ      DD DSN=X.QSAM(+1),         
//            DISP=(NEW,CATLG),UNIT=T3480,               
//            DCB=(LRECL=2387,BLKSIZE=23476,RECFM=VB),   
//            LABEL=EXPDT=99365,VOLUME=(,,,10)


PART 2: IF you are given a file name, how will you determine if it's QSAM (i mean what attributes we need to look into) ?

PART3 : Is a QSAM always VB on TAPE?
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Tue Oct 16, 2007 3:06 pm
Reply with quote

pingte,

Quote:
Is a QSAM always VB on TAPE?

No. Other formats are also allowed.

Quote:
IF you are given a file name, how will you determine if it's QSAM (i mean what attributes we need to look into) ?

Are you taking in terms of IMS?


Quote:
Will the below mentioned code create QSAM dataset?

First step creates GDG base. Where second step creates generation (ps/qsam) for the above gdg.
Back to top
View user's profile Send private message
pingte

Active User


Joined: 03 Dec 2005
Posts: 120
Location: india

PostPosted: Tue Oct 16, 2007 3:22 pm
Reply with quote

Thanks for your ans.
I have some more Q's pertaining to QSAM... Can you throw little more light on them ...

PART1:
Quote:
Is a QSAM always VB on TAPE?

No. Other formats are also allowed.

What are the other formats allowed?
And is TAPE complusory for QSAM?

Part 2:
Quote:
IF you are given a file name, how will you determine if it's QSAM (i mean what attributes we need to look into) ?

Are you taking in terms of IMS?

Yes i would like to know in terms of IMS...
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Tue Oct 16, 2007 3:37 pm
Reply with quote

pingte,

Quote:
Yes i would like to know in terms of IMS...

Look in DBD.

Quote:
What are the other formats allowed?

Like FB.

Quote:
And is TAPE complusory for QSAM?

No. You can use dasd also (again dpends on size)... but in IMS its not tape (generally).
Back to top
View user's profile Send private message
pingte

Active User


Joined: 03 Dec 2005
Posts: 120
Location: india

PostPosted: Tue Oct 16, 2007 3:57 pm
Reply with quote

Can you please tell me which attributes to look at?

And if the QSAM is on tape, how will we look at the attributes using SHOW command .... ?
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Tue Oct 16, 2007 4:01 pm
Reply with quote

Pingte,

Quote:
Can you please tell me which attributes to look at?

Take one PS(QSAM) and PDS. Try using 'S' against these. You will find some difference (letting you to learn on your own).

Quote:
Can you please tell me which attributes to look at?

Use LISTCAT .
Back to top
View user's profile Send private message
pingte

Active User


Joined: 03 Dec 2005
Posts: 120
Location: india

PostPosted: Tue Oct 16, 2007 4:12 pm
Reply with quote

I used LISTCAT ENT(/) ALL .. these were the results..

I think NONVSAM tells it is a QSAM /PS .. Correct me if i am wrong!

I am not sure what FSQEN means...

Code:

NONVSAM ------- X.Y.Z.G001V001           
     IN-CAT --- CATALOG.A.NONVSAM                         
     HISTORY                                                 
       DATASET-OWNER-----(NULL)     CREATION--------2007.271

        RELEASE----------------2     EXPIRATION------0000.000                   
      VOLUMES                                                                   
        VOLSER------------858588     DEVTYPE------X'78048081'     FSEQN---------
---------1                                                                     
      ASSOCIATIONS                                                             
        GDG------X.Y.Z                                     
      ATTRIBUTES                                                               
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Tue Oct 16, 2007 5:02 pm
Reply with quote

Hi,

QSAM...pingte..Curiosity...check this link. icon_smile.gif

Further I can provide this, In IBM mainframe operating systems, a queued sequential access method (QSAM) is one of the access methods for files, or more properly data sets. QSAM files are unkeyed, with the records placed one after another, according to entry order. A program can process these files only sequentially, retrieving (with the READ statement or GET macro instruction) records in the same order as they are in the file. Each record is placed after the preceding record.

QSAM files can be on tape, direct access storage devices (DASDs), unit-record devices, and terminals. QSAM processing is best for tables and intermediate storage.

To process QSAM files in a program, a programmer could use COBOL language statements that:

Identify and describe the QSAM files in the ENVIRONMENT DIVISION and the DATA DIVISION.
Process the records in these files in the PROCEDURE DIVISION.
Back to top
View user's profile Send private message
Bitneuker

CICS Moderator


Joined: 07 Nov 2005
Posts: 1104
Location: The Netherlands at Hole 19

PostPosted: Thu Oct 18, 2007 2:56 pm
Reply with quote

Is this an IMS topic bcause of this? I don't really understand what it's doing here icon_question.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> IMS DB/DC

 


Similar Topics
Topic Forum Replies
No new posts run rexx code with jcl CLIST & REXX 15
No new posts Compile rexx code with jcl CLIST & REXX 6
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts How to create a list of SAR jobs with... CA Products 3
Search our Forums:

Back to Top