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

  1. Path: sparky!uunet!charon.amdahl.com!amdahl!rtech!sgiblab!darwin.sura.net!haven.umd.edu!umd5!bill.ab.umd.edu!bill
  2. From: bill@bill.ab.umd.edu (Bill Bame)
  3. Newsgroups: comp.os.vms
  4. Subject: Re: VAX FORTRAN
  5. Keywords: FORTRAN PRINT QUEUE
  6. Message-ID: <18190@umd5.umd.edu>
  7. Date: 27 Jan 93 19:39:35 GMT
  8. References: <27JAN199309324042@rdth2.rdth.luc.edu>
  9. Sender: news@umd5.umd.edu
  10. Reply-To: bill@office.ab.umd.edu
  11. Followup-To: comp.os.vms
  12. Organization: M.I.E.M.S.S.
  13. Lines: 71
  14.  
  15. In article <27JAN199309324042@rdth2.rdth.luc.edu>, pbricker@rdth2.rdth.luc.edu (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. If you want to send it to the default print queue (SYS$PRINT) you
  21. can do this...
  22.  
  23.     CLOSE(LUN,DISPOSE='PRINT')
  24.  
  25. Otherwise, you can use this (or a simillar) subroutine...
  26.  
  27. !----------------------------------------------------------------------!
  28. !    Purpose: Send a file to a print queue (bare bones!)            !
  29. !    Author : William P. Bame                                       !
  30. !    History: WPB - 6/86 - Version 1.0 Created                      !
  31. !-----------------------------------------------------------------------
  32.     integer*4 function send_file_to_print_queue(file,queue)
  33.     implicit none
  34.     include '($SJCDEF)'
  35.  
  36.     structure /itmlst/
  37.       union
  38.         map
  39.           integer buflen*2,itmcod*2,bufadr*4,retadr*4
  40.         end map
  41.         map
  42.           integer*4 end_list
  43.         end map
  44.       end union
  45.     end structure
  46.     record /itmlst/ job(3)
  47.  
  48.     structure /iosb/
  49.       integer*4 status,zeroed
  50.     end structure
  51.     record /iosb/ iosb
  52.  
  53.     character queue*(*),file*(*),temp*252
  54.     integer*4 sys$sndjbcw,status
  55.  
  56.     job(1).buflen=len(queue)
  57.     job(1).itmcod=sjc$_queue
  58.     job(1).bufadr=%loc(queue)
  59.  
  60.     temp=file
  61.     job(2).buflen=len(file)
  62.     job(2).itmcod=sjc$_file_specification
  63.     job(2).bufadr=%loc(temp)
  64.  
  65.     job(3).end_list=0
  66.  
  67.     send_to_printer=sys$sndjbcw(,%val(sjc$_enter_file),,job,iosb,,)
  68.     if (send_to_printer) send_to_printer=iosb.status
  69.       
  70.     end
  71.  
  72.  
  73. >Preston Bricker            pbricker@rdth2.rdth.luc.edu
  74. >Radiotherapy
  75. >Loyola Univ Med Ctr
  76. >
  77.  
  78. --
  79. --------------------------------------------------------------------------------
  80. William P. Bame                    | sneakernet: William P. Bame
  81. internet: bill@office.ab.umd.edu   |             M.I.E.M.S.S.
  82.           bbame@achi1.ab.umd.edu   |             22 South Greene Street
  83. AT&T    : [Work] (410) 328-3062    |             Baltimore, MD 21201
  84. CIS     : 71620,425                |             Room: T1R55
  85. --------------------------------------------------------------------------------
  86.