Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Re: Accessing a VSAM file
Just use Dynamic File access and move the EMP-ID
to the first part of the key and move LOW-VALUES
to the rest of the key and use a start statement.
After that read the file until you find what you want.

I suggest you use DYNAMIC file access.

You should have some kind of programming book
expaining what you can do for each type of file access.
You want a file access where you can both
use the start command and then do sequential
reads.  If you have to rewrite any records you
have to use a file access that allows that.

This looks like a homework assignment because
it is too goofy for a real program.  If you know the
person's age it looks like you can find a record where
the age is > than the start age and less than the
end age.  Most people would use dates or base the
rate on other factors like position years of service, etc.

>Hi,
>I have a VSAM file having 4 fields like this -
>---------------------------------------------
>Emp ID	Start Age	End Age	Rate
>---------------------------------------------
>124789	1	10	2.32
>124789	11	45	6.45
>124789	46	99	9.37
>245696	1	10	0.25
>245696	11	25	1.24
>245696	26	99	7.25
>---------------------------------------------
>The first three fileds are keys. I need to access this VSAM file and
>fetch the rate based on a Emp ID and Age.
>Suppose, I need the rate of the Emp ID 124789 with Age 36 (lies between
>11 and 45 ) and so rate will be 6.45
>
>How can i get the rate based on this data ? Can i get the rate directly
>or I have to fetch all the records with Emp ID 124789 and then check in
>my program to which Age-Range it belongs.
>
>Regards,
>Dib (New to VSAM)


Report this thread to moderator Post Follow-up to this message
Old Post
Last Boy Scout
11-24-05 11:55 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Cobol archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 05:51 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.