home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.vms
- 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
- From: fairfield@slacvx.slac.stanford.edu
- Subject: Re: VAX FORTRAN
- Message-ID: <1993Jan27.225851.1@slacvx.slac.stanford.edu>
- Lines: 45
- Sender: news@unixhub.SLAC.Stanford.EDU
- Organization: Stanford Linear Accelerator Center
- References: <27JAN199309324042@rdth2.rdth.luc.edu> <1k7gdaINNn40@gap.caltech.edu>
- Date: Thu, 28 Jan 1993 06:58:51 GMT
-
- In article <1k7gdaINNn40@gap.caltech.edu>, carl@SOL1.GPS.CALTECH.EDU (Carl J Lydick) writes:
- | In article <27JAN199309324042@rdth2.rdth.luc.edu>, pbricker@rdth2.rdth.luc.edu
- | (Preston Bricker) writes:
- |>How do I send a file to a print queue from within a FORTRAN program?
- |>There should be a hook equivalent to DCL PRINT.
- |>If you post the answer, please also e-mail it.
- |
- | Here's an example. See the section on $SNDJBC in the System Services Reference
- | Manual for details.
- |
- | INCLUDE '($SJCDEF)'
- | STRUCTURE /ITEM_LIST_3/
- | INTEGER*2 BUFLEN, ITMCOD
- | INTEGER*4 BUFADR, LENADR
- | ENDSTRUCTURE
- |
- | RECORD /ITEM_LIST_3/ ITMLST(4)
- | BYTE QUEUE_NAME(9) / 'S', 'Y', 'S', '$', 'P', 'R', 'I', 'N', 'T'/
- | BYTE FILE_NAME(8) / 'T', 'E', 'S', 'T', '.', 'D', 'A', 'T'/
- | BYTE FORM_NAME(7) / 'D', 'E', 'F', 'A', 'U', 'L', 'T'/
-
- [Rest of sample deleted]
-
- Geez, Carl, that's about the _ugliest_ fortran I've seen in a long time :-)
- How about:
-
- CHARACTER QUEUE_NAME*9, FILE_NAME*8, FORM_NAME*7
- PARAMETER (QUEUE_NAME = 'SYS$PRINT',
- > FILE_NAME = 'TEST.DAT',
- > FORM_NAME = 'DEFAULT')
-
- Or, at the very least:
-
- CHARACTER QUEUE_NAME*9/'SYS$PRINT'/, FILE_NAME*8/'TEST.DAT'/,
- > FORM_NAME*7/'DEFAULT'/
-
- You know, the youngsters are _impressionable_!
-
- Cheers, Ken
- --
- Dr. Kenneth H. Fairfield | Internet: Fairfield@Slac.Stanford.Edu
- SLAC, P.O.Box 4349, MS 98 | DECnet: 45537::FAIRFIELD (45537=SLACVX)
- Stanford, CA 94309 | BITNET Fairfield@Slacvx
- ----------------------------------------------------------------------------
- These opinions are mine, not SLAC's, Stanford's, nor the DOE's...
-