Re:
> I must have accidentally close file #0 at one point because I've
> successfully open it before. Actually this may help me with my current
> challenge, trying to tell VSHOWFORM to write to a file other than a
> terminal. I've tried saving FILEN of the comarea, opening a disc file
> and moving that fnum to filen, no go. Is VSHOWFORM hard coded to write
> to #0 or #1? If so, then if I close (FCLOSE(0,0,0)) file #0 or #1, and
> then open a disc file, and call VSHOWFORM, umm?
I doubt that VSHOWFORM is "hard coded" to write to file # 0 or 1, per se.
It is likely that it's writing to $STDLIST (which happens to be file 1).
Looking at VSHOWFORM, I see calls to Pascal's "WRITELN", so there's a chance
that you could redirect the file "OUTPUT" (the default file Pascal code
opens) to something. However, I don't know if a COBOL mainline calls the
Pascal file initialization code, and I don't know what P_WRITELN does if
that code hasn't been called (probably uses file 1 or opens OUTPUT).
But...here's what I'd do. I'd take a program that successfully calls
VSHOWFORM and do: set a Debug breakpoint at VSHOWFORM. When hit,
set a breakpoint at P_WRITELN. When hit, set a breakpoint at FWRITE.
When hit, look at r26 to see which file number is being used. If it's
1, then you can do: close 1, fopen to get 1 assigned, VSHOWFORM, close 1,
re-open 1 as $stdlist ... and *probably* not get into trouble :)
Stan
--
Stan Sieler
[log in to unmask]
www.allegro.com/sieler/wanted/index.html
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|