home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / bit / listserv / spiresl / 75 < prev    next >
Encoding:
Text File  |  1992-12-23  |  1.9 KB  |  48 lines

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