Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
How to create alternate index for ESDS
Goto page 1, 2  Next
 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Interview Questions
Author Message
vch

New User


Joined: 01 Feb 2008
Posts: 17
Location: chennai

PostPosted: Fri Mar 21, 2008 3:21 pm    Post subject: How to create alternate index for ESDS
Reply with quote

Hi,
how to create alternate index for ESDS..?

what is the difference between QSAM and ESDS??
Back to top
View user's profile Send private message
References
PostPosted: Fri Mar 21, 2008 3:21 pm    Post subject: Re: How to create alternate index for ESDS Reply with quote

Gnanas SNG

Senior Member


Joined: 06 Sep 2007
Posts: 417
Location: India

PostPosted: Fri Mar 21, 2008 3:43 pm    Post subject:
Reply with quote

I think of these.

Sequential(QSAM) files can be created on tape while ESDS files cannot.

Also, you can have ALTINDEX for an ESDS while no such facility exists for QSAM files.

You can this for creating alternate index.
Code:
DEFINE ALTERNATEINDEX ....
Back to top
View user's profile Send private message
dbzTHEdinosauer

Senior Member


Joined: 20 Oct 2006
Posts: 1392
Location: germany

PostPosted: Fri Mar 21, 2008 3:51 pm    Post subject:
Reply with quote

gnanas,

what would be the key? how would you define it?
Back to top
View user's profile Send private message
Gnanas SNG

Senior Member


Joined: 06 Sep 2007
Posts: 417
Location: India

PostPosted: Fri Mar 21, 2008 4:08 pm    Post subject:
Reply with quote

Dick,

Alternate Index Key Type for ESDS may be either Unique key or
Nonunique key


Please correct me if I am worng.
Back to top
View user's profile Send private message
Moved: Fri Mar 21, 2008 4:12 pm by mcmillan From JCL to Interview Questions
vch

New User


Joined: 01 Feb 2008
Posts: 17
Location: chennai

PostPosted: Fri Mar 21, 2008 5:52 pm    Post subject:
Reply with quote

ganas,

how to define alternate index for ESDS? can you give me full syntax for taht?
Back to top
View user's profile Send private message
Gnanas SNG

Senior Member


Joined: 06 Sep 2007
Posts: 417
Location: India

PostPosted: Fri Mar 21, 2008 5:59 pm    Post subject:
Reply with quote

This link might give you more information.

http://publib.boulder.ibm.com/infocenter/pdthelp/v1r1/index.jsp?topic=/com.ibm.entpli4.doc/ibma1mst266.htm
Back to top
View user's profile Send private message
Marso

Active User


Joined: 13 Mar 2006
Posts: 288
Location: Israel

PostPosted: Sun Mar 23, 2008 7:40 pm    Post subject: Re: How to create alternate index for ESDS
Reply with quote

vch wrote:
Hi,
how to create alternate index for ESDS..?

An alternate index ??? I'm quite sure you can't even have a primary index on ESDS files...
Back to top
View user's profile Send private message
Anuj D.

Senior Member


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

PostPosted: Sun Mar 23, 2008 11:53 pm    Post subject:
Reply with quote

Hi,

It seems relevant to have a definition of ESDS here:
Quote:
A VSAM file whose records are loaded without respect to their contents, and whose relative byte addresses (RBAs) cannot change. Records are retrieved and stored by addressed access, and new records are added at the end of the file.

And from Your link gnanas
Quote:
The NONINDEXED keyword causes an ESDS to be defined.

I hope you got the pointer why there are disagreement about Your post. And yes RBA is not INDEX.
Back to top
View user's profile Send private message
Anuj D.

Senior Member


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

PostPosted: Mon Mar 24, 2008 12:04 am    Post subject:
Reply with quote

Hi,

A little more, sometimes I'm not satisfied of myself and keep pouring in..

An ESDS is essentially a sequential dataset where new records are always inserted at the end. You cannot access records directly with a key. However, you may access specific records with a relative byte address (RBA), if you have or can calculate it. In fact, it's fairly common to see CICS application use an ESDS as a log file to write records in sequential order while retrieving the new record's RBA from the RIDFLD operand of the EXEC CICS WRITE command. If the application squirrels away the RBA it can later retrieve the log record directly. Also note that you cannot physically delete a record from an ESDS. Instead, most applications utilize a "logical delete" scheme where a field in the ESDS record is set to a value indicating the record is no longer valid.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 2561
Location: italy

PostPosted: Mon Mar 24, 2008 12:24 am    Post subject: Reply to: How to create alternate index for ESDS
Reply with quote

/ generic invitation on
please please review your vsam icon_biggrin.gif

From the manual
Quote:
RELATE(entryname)
names the alternate index's base cluster. The base cluster is an entry-sequenced cluster or a key-sequenced cluster to which the alternate index is to be related. You cannot relate an alternate index to a reusable cluster, to a relative record cluster, or to a VVDS (data set name 'SYS1.VVDS.Vvolser'). An SMS-managed alternate index has the same management class and storage class as its base cluster.
Back to top
View user's profile Send private message
the_gautam

Active User


Joined: 05 Jun 2005
Posts: 169
Location: Bangalore

PostPosted: Mon Mar 24, 2008 8:26 am    Post subject:
Reply with quote

here is a sample JCL to create the altenate Index on an ESDS.

Code:

//STEP1    EXEC  PGM=IDCAMS
//SYSPRINT DD   SYSOUT=*
//SYSIN    DD *
         DEFINE AIX(NAME(A.B.C.AIX)-
         RELATE(A.B.C)-
         VOLUMES()-
         TRK()-
         KEYS()-
         RECORDSIZE()-
         FREESPACE()-
         CISZ()-
         UNIQUEKEY-
         UPGRADE)
/*
Back to top
View user's profile Send private message
dbzTHEdinosauer

Senior Member


Joined: 20 Oct 2006
Posts: 1392
Location: germany

PostPosted: Tue Mar 25, 2008 12:57 pm    Post subject:
Reply with quote

that is what I like about this forum: reality or truth does not matter; each will continue to prattle-on showing how much he/she knows, when in reality, few can read, much less give a good answer.
Back to top
View user's profile Send private message
Anuj D.

Senior Member


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

PostPosted: Tue Mar 25, 2008 2:02 pm    Post subject:
Reply with quote

Hi,

Not sure if I'm also a victim here in this thread, if any how yes, please put your comments in, so that I can learn something new.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Senior Member


Joined: 20 Oct 2006
Posts: 1392
Location: germany

PostPosted: Tue Mar 25, 2008 2:14 pm    Post subject:
Reply with quote

Anuj D.,

The only Victims in this thread are those (like yourself) who continue to post meaningful and correct information.

It has only been stated 3 times (by different individuals) that an ESDS dataset does not have 'ALTERNATE' nor 'PRIMARY' index. But, others continue to post 'JCL' to create that which is not 'creatable'.

But that is why these threads are so long. Few people bother to read, they are too busy posting.
Back to top
View user's profile Send private message
vch

New User


Joined: 01 Feb 2008
Posts: 17
Location: chennai

PostPosted: Tue Mar 25, 2008 3:13 pm    Post subject:
Reply with quote

Thanks alot for all your responses..

I created an alternate index to an ESDS file successfully.

so it is confirmed that we can create an ESDS to an ESDS file.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Interview Questions All times are GMT + 6 HoursGoto page 1, 2  Next
Page 1 of 2