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) (unless you know SPL).
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
Last option - use your favorite language to write a quick (ha!) program to do it.
John
-----Original Message-----
From: HP-3000 Systems Discussion [mailto:[log in to unmask]] On Behalf Of Keven Miller(3k)
Sent: Wednesday, June 07, 2017 5:50 PM
To: [log in to unmask]
Subject: Re: [HP3000-L] Need a down and dirty QUERY
My solution is to create a QUERY XEQ file.
Here is a sample JCL file
!JOB JCLQRY,MGR.KEVENM,DB
!
!setvar qdate1 "20170606"
!setvar qdate2 "20090710"
!
!echo find date=![qdate1] > q1
!echo find date=![qdate2] > q2
!
!query
b=stdb
;
5
s=upsell
xeq q1
r
d1,user-id,10
d1,date,20
d1,time,30
end
xeq q2
r
d1,user-id,10
d1,date,20
d1,time,30
end
exit
!
!EOJ
Then the spoolfile
:JOB JCLQRY,MGR.KEVENM,DB.
Priority = DS; Inpri = 8; Time = UNLIMITED seconds.
Job number = #j25.
WED, JUN 7, 2017, 2:38 PM.
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 (#S118) ON LDEV# 9
STREAM DATE: WED, JUN 7, 2017, 2:38 PM
:
:setvar qdate1 "20170606"
:setvar qdate2 "20090710"
:
:echo find date=![qdate1] > q1
:echo find date=![qdate2] > q2
:
:query
HP32216D.03.20 QUERY/NM WED, JUN 7, 2017, 2:38 PM COPYRIGHT HEWLETT-PACKARD CO. 1976
b=stdb
PASSWORD =
MODE =5
s=upsell
xeq q1
find date=20170606
0 ENTRIES QUALIFIED
END OF XEQ FILE
r
RECORD HAS NOT YET BEEN FOUND
d1,user-id,10
INVALID COMMAND
d1,date,20
INVALID COMMAND
d1,time,30
INVALID COMMAND
end
INVALID COMMAND
xeq q2
find date=20090710
21 ENTRIES QUALIFIED
END OF XEQ FILE
r
d1,user-id,10
d1,date,20
d1,time,30
end
MICHAELW 20090710 11503700
MICHAELW 20090710 11503700
MICHAELW 20090710 11503700
MICHAELW 20090710 11503700
MICHAELW 20090710 11503700
MICHAELW 20090710 11503700
MICHAELW 20090710 11503700
MICHAELW 20090710 11503700
MICHAELW 20090710 11503700
MICHAELW 20090710 11503700
MICHAELW 20090710 11503700
MICHAELW 20090710 11503700
MICHAELW 20090710 11503700
MICHAELW 20090710 11503700
MICHAELW 20090710 11503700
MICHAELW 20090710 11503700
MICHAELW 20090710 11503700
MICHAELW 20090710 11503700
MICHAELW 20090710 11503700
MICHAELW 20090710 11503700
MICHAELW 20090710 11503700
exit
:
:EOJ
CPU sec. = 2. elapsed min. = 1. WED, JUN 7, 2017, 2:38 PM.
Keven Miller
----- Original Message -----
From: "Ray Shahan" <[log in to unmask]>
To: <[log in to unmask]>
Sent: Wed 07 Jun 2017 03:29 PM
Subject: Re: [HP3000-L] Need a down and dirty QUERY
> Hi folks, sorry for the vague question…I was in a hurry (lol, still am).
> A better description of what I’m needing is how to supply QUERY a variable
> from within the JCL. That variable would simple be the value of today – 1
> (yesterday). Here’s a description:
>
> As physical paperwork for a file on the hp are copied to digital format,
> those files are marked as deleted on the hp (logically, not physically).
>
> At present, the tracking of the destroyed paperwork is done manually (a
> tedious and error prone process), but we have hired summer help to
> increase the number of files we shred paperwork on, and thus, that manual
> tracking process has become a problem.
>
> I was asked if I could write something on the hp to create a comma
> delimited file of the files shredded the day before. While it’s been
> years since I’ve done anything on the hp, I can do the JCL and the QUERY,
> I just can’t see where in the QUERY manual that I can use a variable
> supplied via the JCL?
>
> example:
>
> !Somejob.sys
>
> set DateToReport = Current_date - 1
>
> b=mybase
> s=myset
> m=5
> find destroy_date = !DateToReport
> r all
> exit
> !EOJ
>
>
>
>
> [http://hosting.republictitle.com/signature/25thannivlogo.png] Ray Shahan
> | Programmer
> Republic Title of Texas, Inc. | Corporate
> 2701 W. Plano Parkway, Suite 100 | Plano, Texas 75075
> Tel: 972-578-8611 | Direct: 214-556-0202
> [log in to unmask]<mailto:[log in to unmask]> |
> www.republictitle.com
> Proud to be ALTA Best Practices Certified
>
>
>
>
>
> WIRE FRAUD ALERT: Effective immediately, Republic Title must send Wire
> Instructions via secured email. If you receive any communication that
> appears to be from our office containing revised wire instructions,
> consider it suspect and call your closing team immediately. If you want
> us to wire funds to you, please bring your wiring instructions to closing.
>
>
> From: Ray Shahan
> Sent: Wednesday, June 07, 2017 3:40 PM
> To: [log in to unmask]
> Subject: Need a down and dirty QUERY
>
> Hi all, it’s been years since I’ve done QUERY, so could use some help?
>
> I need a query that runs in a JCL to pull some archived data off the hp
> each day (as files are marked as removed).
>
> No frills, runs every day, and just reports the files that were marked as
> removed the day before.
>
>
> Thanks for any help you can provide!
>
>
>
>
>
>
> [http://hosting.republictitle.com/signature/25thannivlogo.png]
>
> Ray Shahan | Programmer
> Republic Title of Texas, Inc. | Corporate
> 2701 W. Plano Parkway, Suite 100 | Plano, Texas 75075
> Tel: 972-578-8611 | Direct: 214-556-0202
> [log in to unmask]<mailto:[log in to unmask]> |
> www.republictitle.com
> Proud to be ALTA Best Practices Certified
>
>
>
>
>
>
> WIRE FRAUD ALERT: Effective immediately, Republic Title must send Wire
> Instructions via secured email. If you receive any communication that
> appears to be from our office containing revised wire instructions,
> consider it suspect and call your closing team immediately. If you want
> us to wire funds to you, please bring your wiring instructions to closing.
>
>
>
> CONFIDENTIALITY NOTICE: This email transmission (including attachments)
> is covered by the Electronic Communications Privacy Act, 18 U.S.C. 2510 et
> seq., and any information contained in this message is legally privileged,
> confidential and intended only for the individual or entity named herein.
> If the reader of this message is not the intended recipient, you are
> hereby notified that any dissemination, distribution or copy of this
> message is strictly prohibited. If you have received this message in
> error, please immediately notify us by telephone and purge all copies of
> this message from your system. Thank you. This communication does not
> constitute an intention by the sender to conduct a transaction or make any
> agreement or contract by electronic means.
>
>
>
> Although this e-mail and all attachments are believed to be free of any
> virus or other defect that might affect any computer system into which it
> is received and opened, it is the responsibility of the recipient to
> ensure that it is virus-free and Republic Title of Texas, Inc. bears no
> responsibility for any loss or damage arising in any way from its use.
>
> * 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 *
* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *
|