HP3000-L Archives

June 2017, Week 2

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:
"Keven Miller(3k)" <[log in to unmask]>
Reply To:
Keven Miller(3k)
Date:
Thu, 8 Jun 2017 08:21:36 -0600
Content-Type:
text/plain
Parts/Attachments:
text/plain (83 lines)
One thought on setting the DATE variable.
You can avoid any date calculation if you
1. have the job run daily (x7)
2. have the JCL create the Query XEQ file for the current date, for use 
tomorrow.
3. just have logic to EOJ on days you don't want it do run
4. Manually build the first QJCLDATE yourself.

:JOB JCLQRY2,MGR.KEVENM,DB.
Priority = DS; Inpri = 8; Time = UNLIMITED seconds.
Job number = #j30.
THU, JUN  8, 2017,  7:11 AM.
HP3000  Release: C.60.00   User Version: C.60.02
MPE/iX  HP31900 C.16.01  Copyright Hewlett-Packard 1987.
All rights reserved.
STREAMED BY KEV,MGR.KEVENM (#S119) ON LDEV# 9
   STREAM DATE:   THU, JUN  8, 2017,  7:11 AM
:
:INPUT TODATE < QJCLDATE
:
:SETVAR NEXTDATE ![HPYYYYMMDD]
:PURGE QJCLDATE
:BUILD QJCLDATE;REC=-10,,F,ASCII;NOCCTL
:FILE QJCLDATE,OLD
:ECHO ![NEXTDATE] > *QJCLDATE
:
:# Not Sunday or Saturday
:IF HPDAY = 1 OR HPDAY = 7 THEN
*** EXPRESSION FALSE: COMMANDS IGNORED UNTIL MATCHING ELSEIF/ELSE/ENDIF
:  ECHO  Weekend Abort
:  EOJ
:ENDIF
*** RESUME EXECUTION OF COMMANDS
:
:ECHO find date <= ![TODATE] > q1
:
:PRINT QJCLDATE
20170608
:PRINT q1
find date <= 20170607
:
:EOJ
CPU sec. = 1.  elapsed min. = 1.  THU, JUN  8, 2017,  7:11 AM.




Keven Miller


----- Original Message ----- 
From: "Long, John" <[log in to unmask]>
To: "Keven Miller(3k)" <[log in to unmask]>; <[log in to unmask]>
Sent: Thu 08 Jun 2017 06:20 AM
Subject: RE: [HP3000-L] Need a down and dirty QUERY


> Ray,
>
> Keven's answer is probably closest to what you're looking for.
>
> This may also help:
>
> :SETVAR PREVDATE, !HPYYYYMMDD - 1
> :SHOWVAR PREVDATE
> PREVDATE = 20170607
>
> I'm not sure how (or even if) query reads variables.  (Nothing in the 
> manual about it)
> Which is why you might have to do as he suggested and 'build' your 
> jobstream daily and replace the date in the 'USE file'
>
> I guessing you also don't have Suprtool which does allow reading, setting 
> and using of variables (unless you know SPL).
>
> Last option - use your favorite language to write a quick (ha!) program to 
> do it.
>
> John

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2