At 01:43 PM 2/15/2005, Jay Willis wrote:
Hi Jay,
Streamx can't see the "{DEPT}" in the use file, so it cannot be substituted
inside the use file. My suggestion would be to set DEPT to be
an MPE variable, which appears to be the direction you were headed in.
::PROMPT STRING DEPT = &
:: "Department (hit RETURN for all)......";&
:: DEFAULT = "99"
::SETBRACES ~~
!JOB TESTJOB
!
!setvar mydept "~DEPT~"
!
!IF "~DEPT~" <> "99" THEN
! RUN SUPRTOOL.PUB.ROBELLE;PARM=4;INFO="USE U033A;E"
!ENDIF
!
!EOJ
>SET PROGRESS 0
>SET VARSUB ON
>BASE HRDB.PROHR,5,CLERK
>GET EMPLOY
>IF EMPLNO<>"0000000000" &
>AND STATUS="01" &
>AND EXPDT="99999999" &
>AND TERMDT=" " &
>AND DEPT="!mydept" &
>AND GROUP<>"OC"
>EXTRACT EMPLNO
>SORT EMPLNO
>DUPLICATE NONE KEYS
>OUTPUT TEMPFL,TEMP
>XEQ
>INPUT TEMPFL
>DEFINE EMP,1,10
>DEFINE FILLER,1,70
>EXTRACT EMP
>EXTRACT FILLER = " "
>OUTPUT RPTTEMP,TEMP
>EXIT
Hope this helps.
Neil
>Wonder if anyone could offer some help with calling up suprtool with a
>streamx job. The job prompts for a dept code, then calls suprtool via a USE
>file to look up the records from an image db based on the dept.
>
>The part I'm having trouble with is with the dept variable. The job works
>fine when I do the lookup directly from suprtool and not through the USE
>file. But I want to do it with the USE file since later I will have several
>USE files that will be used in this job for other variables.
>
>Here's the job at this point:
>
>::PROMPT STRING DEPT = &
>:: "Department (hit RETURN for all)......";&
>:: DEFAULT = "99"
>::SETBRACES ~~
>!JOB TESTJOB
>!
>!IF "~DEPT~" <> "99" THEN
>! RUN SUPRTOOL.PUB.ROBELLE;PARM=4;INFO="USE U033A;E"
>!ENDIF
>!
>!EOJ
>And here's the USE file:
>
>SET PROGRESS 0
>SET VARSUB ON
>BASE HRDB.PROHR,5,CLERK
>GET EMPLOY
>IF EMPLNO<>"0000000000" &
>AND STATUS="01" &
>AND EXPDT="99999999" &
>AND TERMDT=" " &
>AND DEPT="{DEPT}" &
>AND GROUP<>"OC"
>EXTRACT EMPLNO
>SORT EMPLNO
>DUPLICATE NONE KEYS
>OUTPUT TEMPFL,TEMP
>XEQ
>INPUT TEMPFL
>DEFINE EMP,1,10
>DEFINE FILLER,1,70
>EXTRACT EMP
>EXTRACT FILLER = " "
>OUTPUT RPTTEMP,TEMP
>EXIT
>
>Thanks for any help,
>Jay
>
>* To join/leave the list, search archives, change list settings, *
>* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|