home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / os / vms / 22195 < prev    next >
Encoding:
Internet Message Format  |  1993-01-28  |  2.4 KB

  1. Path: sparky!uunet!charon.amdahl.com!amdahl!rtech!pacbell.com!sgiblab!swrinde!elroy.jpl.nasa.gov!nntp-server.caltech.edu!SOL1.GPS.CALTECH.EDU!CARL
  2. From: carl@SOL1.GPS.CALTECH.EDU (Carl J Lydick)
  3. Newsgroups: comp.os.vms
  4. Subject: Re: VAX FORTRAN
  5. Date: 28 Jan 1993 02:28:58 GMT
  6. Organization: HST Wide Field/Planetary Camera
  7. Lines: 54
  8. Distribution: world
  9. Message-ID: <1k7gdaINNn40@gap.caltech.edu>
  10. References: <27JAN199309324042@rdth2.rdth.luc.edu>
  11. Reply-To: carl@SOL1.GPS.CALTECH.EDU
  12. NNTP-Posting-Host: sol1.gps.caltech.edu
  13.  
  14. In article <27JAN199309324042@rdth2.rdth.luc.edu>, pbricker@rdth2.rdth.luc.edu
  15. (Preston Bricker) writes:
  16. >How do I send a file to a print queue from within a FORTRAN program?
  17. >There should be a hook equivalent to DCL PRINT.
  18. >If you post the answer, please also e-mail it.
  19.  
  20. Here's an example.  See the section on $SNDJBC in the System Services Reference
  21. Manual for details.
  22.  
  23.     INCLUDE '($SJCDEF)'
  24.     STRUCTURE /ITEM_LIST_3/
  25.         INTEGER*2 BUFLEN, ITMCOD
  26.         INTEGER*4 BUFADR, LENADR
  27.     ENDSTRUCTURE
  28.  
  29.     RECORD /ITEM_LIST_3/ ITMLST(4)
  30.     BYTE QUEUE_NAME(9) / 'S', 'Y', 'S', '$', 'P', 'R', 'I', 'N', 'T'/
  31.     BYTE FILE_NAME(8) / 'T', 'E', 'S', 'T', '.', 'D', 'A', 'T'/
  32.     BYTE FORM_NAME(7) / 'D', 'E', 'F', 'A', 'U', 'L', 'T'/
  33.     INTEGER*4 IOSB(2), STAT, SYS$SNDJBCW
  34.  
  35.     ITMLST(1).BUFLEN = 9
  36.     ITMLST(1).ITMCOD = SJC$_QUEUE
  37.     ITMLST(1).BUFADR = %LOC(QUEUE_NAME)
  38.     ITMLST(1).LENADR = 0
  39.     ITMLST(2).BUFLEN = 8
  40.     ITMLST(2).ITMCOD = SJC$_FILE_SPECIFICATION
  41.     ITMLST(2).BUFADR = %LOC(FILE_NAME)
  42.     ITMLST(2).LENADR = 0
  43.     ITMLST(3).BUFLEN = 7
  44.     ITMLST(3).ITMCOD = SJC$_FORM_NAME
  45.     ITMLST(3).BUFADR = %LOC(FORM_NAME)
  46.     ITMLST(3).LENADR = 0
  47.     ITMLST(4).BUFLEN = 0
  48.     ITMLST(4).ITMCOD = 0
  49.     ITMLST(4).BUFADR = 0
  50.     ITMLST(4).LENADR = 0
  51.     STAT = SYS$SNDJBCW(%VAL(0), %VAL(SJC$_ENTER_FILE), %VAL(0), ITMLST,
  52.     1    IOSB, %VAL(0), %VAL(0))
  53.     IF((STAT .AND. 7) .NE. 1) THEN
  54.         CALL SYS$EXIT(%VAL(STAT))
  55.     ENDIF
  56.     IF((IOSB(1) .AND. 7) .NE. 1) THEN
  57.         CALL SYS$EXIT(%VAL(IOSB(1)))
  58.     ENDIF
  59.     END
  60. --------------------------------------------------------------------------------
  61. Carl J Lydick | INTERnet: CARL@SOL1.GPS.CALTECH.EDU | NSI/HEPnet: SOL1::CARL
  62.  
  63. Disclaimer:  Hey, I understand VAXen and VMS.  That's what I get paid for.  My
  64. understanding of astronomy is purely at the amateur level (or below).  So
  65. unless what I'm saying is directly related to VAX/VMS, don't hold me or my
  66. organization responsible for it.  If it IS related to VAX/VMS, you can try to
  67. hold me responsible for it, but my organization had nothing to do with it.
  68.