home *** CD-ROM | disk | FTP | other *** search
- Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
- Path: sparky!uunet!usc!howland.reston.ans.net!paladin.american.edu!auvm!VTVM1.BITNET!USDGK
- Organization: Computing Center, Virginia Tech.
- Message-ID: <SPIRES-L%92122313583862@PUCC.PRINCETON.EDU>
- Newsgroups: bit.listserv.spires-l
- Date: Wed, 23 Dec 1992 13:46:30 EST
- Sender: SPIRES Conference List <SPIRES-L@PUCC.BITNET>
- From: Greg Kroll <USDGK@VTVM1.BITNET>
- Subject: a solution found for reinitializing variables in input format
- Lines: 36
-
- Hi all,
-
- I thought I would post this in case anyone runs into a similar problem.
- Just to reiterate I was trying to detect an end-of-file condition from a
- line-by-line input format so I could reinitialize the local vgroup variables.
- Although I still do not know why the $ENDATA flag is never set (see my post
- of 12/21/92 for details) I found another solution. I began skimming the
- system variables (after all there are system variables for everything right?),
- and came across $FREC. Here is the "explain" text on this variable:
-
- $FREC VARIABLE
-
- FORMATS (CMS), section E.2.1.3
-
- This global flag is set when the first record is being processed during a
- multiple-record processing command, such as TYPE or DISPLAY REST; the flag
- is subsequently cleared. You may wish to test this flag for special
- first-record handling. It is set whether or not report mode processing is
- in effect -- that is, it may be used by non-report output formats. The
- $FREC flag may also be used in SPIBILD input formats.
-
- **Referenced by: HEADER FRAMES
-
- I figured as long as I get the vgroup reinitialized it does not matter if
- it is done before the first record is processed or after the last. So
- one line of code did the trick, here it is:
-
- FRAME-NAME = READ.MAIL;
- FRAME-TYPE = DATA;
- UPROC = If $FREC Then EVAL $VINIT(CHIPMAIL); <<<=== :-) :-) :-)
-
-
- Have a very Merry Christmas and a Happy New Year!
-
-
- --Greg Kroll
-