HP3000-L Archives

February 2005, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Larry Barnes <[log in to unmask]>
Reply To:
Larry Barnes <[log in to unmask]>
Date:
Wed, 16 Feb 2005 06:30:59 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (97 lines)
You can echo each Suprtool command to a temp file then run Suprtool
using the temp file.  By doing the echo commands they will substitute
the variable with the value you enter. See example below.    Notice the
'!Dept' variable.

!Purge tempxeq,temp
!Build tempxeq;temp;rec=-80,,f,ascii
!File tempxeq,tempxeq,oldtemp
!
!ECHO SET       PROGRESS 0              >> *tempxeq
!ECHO SET       VARSUB ON               >> *tempxeq
!ECHO BASE      HRDB.PROHR,5,CLERK      >> *tempxeq
!ECHO GET       EMPLOY                  >> *tempxeq
!ECHO IF        EMPLNO<>"0000000000" &  >> *tempxeq
!ECHO AND       STATUS="01" &           >> *tempxeq
!ECHO AND       EXPDT="99999999" &      >> *tempxeq
!ECHO AND       TERMDT=" " &            >> *tempxeq
!ECHO AND       DEPT="!DEPT" &          >> *tempxeq
!ECHO AND       GROUP<>"OC"             >> *tempxeq
!ECHO EXTRACT   EMPLNO                  >> *tempxeq
!ECHO SORT      EMPLNO                  >> *tempxeq
!ECHO DUPLICATE NONE KEYS               >> *tempxeq
!ECHO OUTPUT    TEMPFL,TEMP             >> *tempxeq
!ECHO XEQ                               >> *tempxeq
!ECHO INPUT     TEMPFL                  >> *tempxeq
!ECHO DEFINE    EMP,1,10                >> *tempxeq
!ECHO DEFINE    FILLER,1,70             >> *tempxeq
!ECHO EXTRACT   EMP                     >> *tempxeq
!ECHO EXTRACT   FILLER = " "            >> *tempxeq
!ECHO OUTPUT    RPTTEMP,TEMP            >> *tempxeq
!ECHO EXIT                              >> *tempxeq          
!RUN SUPRTOOL.PUB.ROBELLE;PARM=4 < tempxeq


-----Original Message-----
From: Jay Willis [mailto:[log in to unmask]] 
Sent: Tuesday, February 15, 2005 10:44 AM
To: [log in to unmask]
Subject: [HP3000-L] Suprtool, Streamx, and variable substitution

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 *

ATOM RSS1 RSS2