home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / os / vms / 22169 < prev    next >
Encoding:
Text File  |  1993-01-28  |  2.1 KB  |  57 lines

  1. Newsgroups: comp.os.vms
  2. Path: sparky!uunet!europa.eng.gtefsd.com!paladin.american.edu!howland.reston.ans.net!spool.mu.edu!uwm.edu!linac!unixhub!slacvx.slac.stanford.edu!fairfield
  3. From: fairfield@slacvx.slac.stanford.edu
  4. Subject: Re: VAX FORTRAN
  5. Message-ID: <1993Jan27.225851.1@slacvx.slac.stanford.edu>
  6. Lines: 45
  7. Sender: news@unixhub.SLAC.Stanford.EDU
  8. Organization: Stanford Linear Accelerator Center
  9. References: <27JAN199309324042@rdth2.rdth.luc.edu> <1k7gdaINNn40@gap.caltech.edu>
  10. Date: Thu, 28 Jan 1993 06:58:51 GMT
  11.  
  12. In article <1k7gdaINNn40@gap.caltech.edu>, carl@SOL1.GPS.CALTECH.EDU (Carl J Lydick) writes:
  13. | In article <27JAN199309324042@rdth2.rdth.luc.edu>, pbricker@rdth2.rdth.luc.edu
  14. | (Preston Bricker) writes:
  15. |>How do I send a file to a print queue from within a FORTRAN program?
  16. |>There should be a hook equivalent to DCL PRINT.
  17. |>If you post the answer, please also e-mail it.
  18. | Here's an example.  See the section on $SNDJBC in the System Services Reference
  19. | Manual for details.
  20. |     INCLUDE '($SJCDEF)'
  21. |     STRUCTURE /ITEM_LIST_3/
  22. |         INTEGER*2 BUFLEN, ITMCOD
  23. |         INTEGER*4 BUFADR, LENADR
  24. |     ENDSTRUCTURE
  25. |     RECORD /ITEM_LIST_3/ ITMLST(4)
  26. |     BYTE QUEUE_NAME(9) / 'S', 'Y', 'S', '$', 'P', 'R', 'I', 'N', 'T'/
  27. |     BYTE FILE_NAME(8) / 'T', 'E', 'S', 'T', '.', 'D', 'A', 'T'/
  28. |     BYTE FORM_NAME(7) / 'D', 'E', 'F', 'A', 'U', 'L', 'T'/
  29.  
  30. [Rest of sample deleted]
  31.  
  32.     Geez, Carl, that's about the _ugliest_ fortran I've seen in a long time :-)
  33. How about:
  34.  
  35.     CHARACTER  QUEUE_NAME*9, FILE_NAME*8, FORM_NAME*7
  36.     PARAMETER (QUEUE_NAME = 'SYS$PRINT', 
  37.      >           FILE_NAME = 'TEST.DAT',
  38.      >             FORM_NAME = 'DEFAULT')
  39.  
  40. Or, at the very least:
  41.  
  42.     CHARACTER  QUEUE_NAME*9/'SYS$PRINT'/, FILE_NAME*8/'TEST.DAT'/, 
  43.      >             FORM_NAME*7/'DEFAULT'/
  44.  
  45. You know, the youngsters are _impressionable_!  
  46.  
  47.         Cheers, Ken
  48. -- 
  49.  Dr. Kenneth H. Fairfield    |  Internet: Fairfield@Slac.Stanford.Edu
  50.  SLAC, P.O.Box 4349, MS 98   |  DECnet:   45537::FAIRFIELD (45537=SLACVX)
  51.  Stanford, CA   94309        |  BITNET    Fairfield@Slacvx
  52.  ----------------------------------------------------------------------------
  53.  These opinions are mine, not SLAC's, Stanford's, nor the DOE's...
  54.