|
Amit, I hope I understand the problem. If you have a logical that is composed of multiple files. You can control them consistently by performing SETL's to the record names. When a successful SETL is performed then read the logical file name. Example: We have a G/L Logical(GLLF1) over 2 FILES: GLPF1 is current year G/L GLPF2 is prior years G/L Record names are GLRF1 and GLRF2 repectively. I have a report program that recieves a year month parm to provide a G/L listing. YTDKEY KLIST KFLD YEAR KFLD MO YTDKEY SETLLGLRF1 11 *IN11 IFEQ *OFF YTDKEY SETLLGLRF2 11 ENDIF READ GLLF1 ETC..... I hope this helps. If I missed this one be kind I'm starting to get old. Vance Stanley Santa Fe Snyder Corp. Houston,Tx Hi, > I need a favour to solve my problem with a search and selection > program using a multiple record format logical file, say FILEA . It has > two record formats, say for example, RECA and RECB, both keyed. The two > record formats link to two different physical files.(RECA is based on > FILE1 > and RECB is based on FILE2) > > The program is using the logical file name (FILEA) to SETLL and READ, > whenever required, instead of record formats. > > The problem is, the program poistions correctly almost all the times but > sometimes it does not position to the correct record. Say for example, > > if SETLL to JOHN which is in the RECB(FILE2) - success > then SETLL to "KATHY" RECA(FILE1) - success > then > SETLL to JOHN again - failure > > Now the question is if I do a SETLL with the file name ,which physical > file > is it going to access. Does the logical file maintain an access path which > is the combination of both the PFs. > > The logic that the program uses is something like this. > > C Z-ADD0 #RRN > C KEYLIST SETLLFILEA 95 (Hi Indicator) > * Load the subfile.... > C READ FILEA 95 > C *IN95 DOWEQ*OFF > C #RRN ANDLT 10 (Subfile size) > C*** Load data to subfile fields > C ADD 1 #RRN > C WRITESFL01 (Write to Subfile) > C READ FILEA 95 > C ENDDO (End of *IN95) > > KEYLIST contains the value of the postiion to field. > > I do not whether there is a limitation on how SETLL works for multiple > record format logical file. > Thanks in advance. > > -Amit > __________________________________________________ Do You Yahoo!? Send instant messages & get email alerts with Yahoo! Messenger. http://im.yahoo.com/ +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com. | To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com. | Questions should be directed to the list owner/operator: david@midrange.com +---
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.