Table defs in VSAM file processing



Unicenter CA-Easytrieve Plus Report Generator: CA's information retrieval and data management tool

Table defs in VSAM file processing

Postby LPSSJW » Sun Apr 11, 2010 4:16 am

new guy again.

Now I need to define a table in the VSAM file def area.

Never done it and there are not too many examples. And the admins of this site might want to allow a search on "TABLE" as it gives an error that it is too common of a word.

Anyway...

As an example:

FILEIN VS
KEY 1 20 A
FILL 21 100 A
DATA-TABLE 101 201 A OCCURS 10
STUFF1 101 1 A INDEX INDX
STUFF2 102 8 A INDEX INDX
STUFF2 109 2 A INDEX INDX

What I need to know is is the above correct?

Then if I want to examine STUFF2 do I just cycle through the table using INDX by adding +1 to INDX and it moves to the next STUFF2 even though I have only defined as being in position 102?

Thanks again.
LPSSJW
 
Posts: 4
Joined: Mon Apr 05, 2010 9:57 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Table defs in VSAM file processing

Postby dick scherrer » Sun Apr 11, 2010 4:45 am

Hello,

What you are asking does not appear to be a vsam question. . .

Is that code Easytrieve? If it is, the syntax does not appear to be correct. Suggest you review using an array in Easytrieve.

And yes, table is not a good search argument. . . It is simply used in too many places to be worth much as a keyword. . .
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: Table defs in VSAM file processing

Postby LPSSJW » Mon Apr 12, 2010 5:05 pm

I was using the manual. Example from manual p. 12-13

DEPEND-INFO 30 26 A OCCURS 20
DEPEND-NAME 30 20 A INDEX DEPINDEX
DEPEND-BIRTH 50 6 N INDEX DEPINDEX

Looks right to me...

Anyway I figured it out. the index is incremented by adding the number of bytes of each occurance. The manual was not clearly stating how to increment the index, but I saw it after examining the example a bit more.
LPSSJW
 
Posts: 4
Joined: Mon Apr 05, 2010 9:57 pm
Has thanked: 0 time
Been thanked: 0 time


Return to CA-Easytrieve

 


  • Related topics
    Replies
    Views
    Last post