How to view online the new data added to a PF?
210 pts.
0
Q:
How to view online the new data added to a PF?
Hi, I need to display in a subfile the new data added to a phisical file, in real time. Who knows unix, this is something like the command "tail -f".

Thanks a lot!
ASKED: Dec 10 2008  1:24 AM GMT
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
0
23625 pts.
0
A:
 RATE THIS ANSWER
0
Click to Vote:
  •   0
  •  0
  • AddThis Social Bookmark Button

Hi,

Assuming that you have a reload of your subfile in a loop together with your EXFMT, you need to replace the EXFMT with a WRITE to your display file or you can change the display file to have a wait time specified (you'll then need to handle the time out error). You may also need to change/compile your display file to be DFRWRT(*NO).

Regards,

Martin Gilbert.
Last Answered: Dec 10 2008  10:21 AM GMT by Gilly400   23625 pts.
0
0
Discuss This Answer:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _



_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Philpl1jb   24570 pts.  |   Dec 10 2008  7:55PM GMT

You want to show the last records in the file.

1. Leave the ‘K’ off your f-spec - the file will be delivered in arrival secquence

2. Start the load at the bottom of the file
*HIVAL SETGT MyFile

3. Read records backwards from the bottom - rough code
READP Myfile
dow not %TOF(Myfile) and count < pagesize
count += 1
load and write a record to the subfile
if count < pagesize)
READP Myfile
endif
enddo
exfmt sflctl

ReadP is read previous record

this will load a page - it will appear backwards (newest at the top)
You can set pagedown to call this routine again to load the next page.

 
0