home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!charon.amdahl.com!amdahl!rtech!sgiblab!darwin.sura.net!haven.umd.edu!umd5!bill.ab.umd.edu!bill
- From: bill@bill.ab.umd.edu (Bill Bame)
- Newsgroups: comp.os.vms
- Subject: Re: VAX FORTRAN
- Keywords: FORTRAN PRINT QUEUE
- Message-ID: <18190@umd5.umd.edu>
- Date: 27 Jan 93 19:39:35 GMT
- References: <27JAN199309324042@rdth2.rdth.luc.edu>
- Sender: news@umd5.umd.edu
- Reply-To: bill@office.ab.umd.edu
- Followup-To: comp.os.vms
- Organization: M.I.E.M.S.S.
- Lines: 71
-
- 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.
-
- If you want to send it to the default print queue (SYS$PRINT) you
- can do this...
-
- CLOSE(LUN,DISPOSE='PRINT')
-
- Otherwise, you can use this (or a simillar) subroutine...
-
- !----------------------------------------------------------------------!
- ! Purpose: Send a file to a print queue (bare bones!) !
- ! Author : William P. Bame !
- ! History: WPB - 6/86 - Version 1.0 Created !
- !-----------------------------------------------------------------------
- integer*4 function send_file_to_print_queue(file,queue)
- implicit none
- include '($SJCDEF)'
-
- structure /itmlst/
- union
- map
- integer buflen*2,itmcod*2,bufadr*4,retadr*4
- end map
- map
- integer*4 end_list
- end map
- end union
- end structure
- record /itmlst/ job(3)
-
- structure /iosb/
- integer*4 status,zeroed
- end structure
- record /iosb/ iosb
-
- character queue*(*),file*(*),temp*252
- integer*4 sys$sndjbcw,status
-
- job(1).buflen=len(queue)
- job(1).itmcod=sjc$_queue
- job(1).bufadr=%loc(queue)
-
- temp=file
- job(2).buflen=len(file)
- job(2).itmcod=sjc$_file_specification
- job(2).bufadr=%loc(temp)
-
- job(3).end_list=0
-
- send_to_printer=sys$sndjbcw(,%val(sjc$_enter_file),,job,iosb,,)
- if (send_to_printer) send_to_printer=iosb.status
-
- end
-
-
- >Preston Bricker pbricker@rdth2.rdth.luc.edu
- >Radiotherapy
- >Loyola Univ Med Ctr
- >
-
- --
- --------------------------------------------------------------------------------
- William P. Bame | sneakernet: William P. Bame
- internet: bill@office.ab.umd.edu | M.I.E.M.S.S.
- bbame@achi1.ab.umd.edu | 22 South Greene Street
- AT&T : [Work] (410) 328-3062 | Baltimore, MD 21201
- CIS : 71620,425 | Room: T1R55
- --------------------------------------------------------------------------------
-