[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: SQR Open and Close of Files
- Subject: Re: SQR Open and Close of Files
- From: Robert Foster <robert.foster@RADIOLOGY.MSU.EDU>
- Date: Thu, 21 Mar 2002 14:35:31 -0500
- Organization: Mid-Michigan MRI, Inc.
- References: <200203210700.g2L70rH20761@list.iex.net>
> Date: Wed, 20 Mar 2002 08:36:15 -0600
> From: Danielle Henkels <Danielle.Henkels@GENMILLS.COM>
> Subject: Re: SQR Open and Close of Files
>
> Actually, I have an existing report that runs things through printer, fax
> and EDI in a batch process. It currently works, however it works going
> through an Amdahl server that is being removed. We have to send it now
> through a Rightfax utility. I can now send things that print and things that
> fax at the same time, however, it only reads the first fax number that comes
> through and sends all things to that fax. I need it to send things to
> different faxes, printer and EDI all at the same time, which is why we are
> now looking at a way to open and close each file as it's processed and still
> send the bath out.
Danielle,
This is long winded but I hope it will work out for you.
SQR is not the problem, I've used it for years and been able to do lots
of things with it. I've seen lots of different styles in the way people
write their sqr. The examples you've shown are written in a cryptic way
at best.
Look for "encode" or "define" commands in the sqr program to find where
the embedded rightFax commands are being setup. Perhaps these are
antiquated or incorrectly coded for your new server. You say that one
fax goes through so likely they are correctly coded.
Here's what you want to do using sqr, I think, in plain english:
do a loop based on the number of faxes to send
name a new output file
create the fax document(goes to the file just named)
make a header that stupid rightfax will understand
make the body of your fax document
make the footer that stupid rightfax will understand
setup the fax command parameters that actually send the fax
run the fax command(everything is in the named file and your fax
command line so go for it)
repeat the loop until all faxes are sent to rightfax
* * *
Now in SQR:
! not sure what these two lines do without more info.
use-report AutoFax
move 'AutoFax' to $currentrpt
! have to calculate somewhere how many faxes you need to create for this
run or
! use some other test that tells you when you are done sending faxes.
while #loop < #number_of_faxes
! you probably should change the report name for each run.
! following line creates the filename
let $faxrpt = $rptpath || 'f121pofx' || substr(&posysdate,18,2) ||
'.lis'
new-report $faxrpt
! you are now writing to the file named in the previous line
do createTheFax ! see below for this procedure
let $FAXCMD = $path || 'pcntf1.exe /F' || $faxpath || ' /T' ||
{AutoFaxRemote}
let $FAXCMDCall = $COMSPEC || ' /C ' || $FAXCMD
! should be a command here to actually run $FAXCMDCall to send the fax.
add 1 to #loop
end-while
begin-procedure createTheFax
! all of the stuff that the current sqr report does to create the fax
header,
! body, and footer goes here. Create this procedure if you have to and
put
! everything inside of it.
end-procedure
* * *
There is more detail to make this work but SQR is a progamming language
so nit-picking details are par for the course. Let me know if this helps
or if there is anything else I can add.
Thanks,
Bob.
===
Bob Foster
I/S Coordinator
Mid-Michigan MRI, Inc.
Direct Line: (517) 483-2673
mailto:rkf@radiology.msu.edu