MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Read ESDS file randomly in Pl/1

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
Rama_Prayaga
Beginner


Joined: 20 May 2003
Posts: 45
Topics: 15

PostPosted: Wed Dec 22, 2004 7:17 am    Post subject: Read ESDS file randomly in Pl/1 Reply with quote

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
View user's profile Send private message Yahoo Messenger
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Wed Dec 22, 2004 8:57 am    Post subject: Reply with quote

Rama Prayaga,

Get the RBA of each record in the ESDS file and read the cluster using RBA as the key. Look up the KEYED phrase in the PLI programming guide

Check this link

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/C2714572/10.7?DT=20020918091353

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Rama_Prayaga
Beginner


Joined: 20 May 2003
Posts: 45
Topics: 15

PostPosted: Wed Dec 22, 2004 10:59 am    Post subject: Reply with quote

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
View user's profile Send private message Yahoo Messenger
Rama_Prayaga
Beginner


Joined: 20 May 2003
Posts: 45
Topics: 15

PostPosted: Wed Dec 22, 2004 12:01 pm    Post subject: Reply with quote

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
View user's profile Send private message Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group