I'd like to thank those who offered help with my problem of how to "save" a file equation for later use.
The problem was how to come up with a way to save a file equation for a report, the parameters of which the user would enter (ldev, copies, priority). This was necessary since within the job that this report would print is a following file equation for printing forms (checks). Other reports - that would use the print settings the user had entered - would follow the checks. This is when the job would re-use these settings.
Reid's was on the mark. Here's what I ended up with:
!JOB
!FILE APPRINT=JAP301 ;DEV=LP ,08,001 (these are the settings entered by the user)
!FILE FILEQ = FILEQ;MSG
!LISTEQ > *FILEQ
!WHILE FINFO("FILEQ",19) > 1
! INPUT PRINTER < FILEQ
! IF STR("!PRINTER",7,7) = "APPRINT"
! SETVAR PRINTER_POSITION POS("DEV=","!PRINTER",1)
! SETVAR PRINTERNAME RTRIM(STR("!PRINTER",26,10))
! ENDIF
!ENDWHILE
!SHOWVAR PRINTERNAME
!PURGE FILEQ,TEMP > $NULL
!RESET FILEQ
!FILE APPRINT=CHECKS;DEV=MIS1,1
!RESET APPRINT
!FILE APPRINT=JAP301;DEV=!PRINTERNAME
!EOJ
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|