View previous topic :: View next topic |
Author |
Message |
Rama_Prayaga Beginner

Joined: 20 May 2003 Posts: 45 Topics: 15
|
Posted: Wed Dec 22, 2004 7:17 am Post subject: Read ESDS file randomly in Pl/1 |
|
|
I have to read several ESDS files. Is there any way to read the records randomly. We need to do it in pl/1.
The requirment is as below.
1)
Code: | I have read a master file sequentially(this too is a sequential file).
then
read file1;
if record found in file1;
statement1;
statement2;
statement3;
----
else
read file2.
if record found in file2;
statement1;
statement2;
statement3;
else
read file3
if record found in file3;
statement1;
statement2;
statement3;
-----
-----
-----
------ |
like this I have to read 17 different files with different layouts for data.The first nine bytes of all the files all are unique fields(need not be ascending or descending order).I have to search for the first nine bytes in the sequential files which I take from the master.Is there any way i can do it.
Regards,
Rama Prayage |
|
Back to top |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
|
Back to top |
|
 |
Rama_Prayaga Beginner

Joined: 20 May 2003 Posts: 45 Topics: 15
|
Posted: Wed Dec 22, 2004 10:59 am Post subject: |
|
|
Hi Kolusu,
Thanks for your response.I am not able to get the clear picture from the link.is there any example that you can show me.That will be great help to me.
Just The declaration and how the file has to be read in the program will do for me.
Thanks once again
Regards,
Rama Prayaga |
|
Back to top |
|
 |
Rama_Prayaga Beginner

Joined: 20 May 2003 Posts: 45 Topics: 15
|
Posted: Wed Dec 22, 2004 12:01 pm Post subject: |
|
|
Hi Kolusu,
I tried doing as below.I got a oncode=1009..
DCL FILE1 FILE RECORD INPUT SEQUENTIAL BUFFERED.
THEN I the file as below.
file1record.TOFFVAL = '1234567';
READ FILE(file1) INTO(file1record) KEY(file1record.key).
I think I gave wrong attributes.
Regads,
Rama Prayaga |
|
Back to top |
|
 |
|
|