Hello group,
I sent my code for the dat tape checking to a friend of mine who is been
my mentor on the HP3000. He made the following observations about my use
of the pause intrinsic in the father program. After reading several
emails in this list about the pause intrinsic and its need for a real
number motivated me to forward his email to the list.
thanks again to all who helped me on this project.
#Joseph Norris (Perl - what else is there?/HP3000/Linux/CGI/Msql)
print @c=map chr $_+100,(6,17,15,16,-68,-3,10,11,16,4,1,14,-68,12,1,14,8,
-68,4,-3,-1,7,1,14,-68,6,11,15,1,12,4,-68,-22,11,14,14,5,15,-90);
---------- Forwarded message ----------
Date: Tue, 25 May 1999 12:45:56 -0500
From: "Eric H. Sand" <[log in to unmask]>
To: 'Joseph Norris' <[log in to unmask]>
Subject: RE: You should check this out
Joseph,
Looks like you wrote a winner...! Have you checked out the intrinsic
HPEXTIN? It converts an "alpha" number to a real number. It looks like:
Text-name WSREAL
001000 01 ONE-MINUTE PIC X(4) VALUE "0060".
001100 01 ANYVAR-LEN PIC S9(4) COMP VALUE +4.
001200 01 ANYVAR-DEC PIC S9(4) COMP VALUE +0.
001300 01 ANYVAR-TYPE PIC S9(4) COMP VALUE +1.
001400 01 ANYVAR-SCALE PIC S9(4) COMP VALUE +0.
001500 01 ANYVAR-DEL PIC S9(4) COMP VALUE +0.
001600 01 ONE-MINUTE-REAL PIC S9(9) COMP VALUE +0.
001700 01 ANYVAR-ERR PIC S9(4) COMP VALUE +0.
Text-name CONVREAL
001000 CALL INTRINSIC "HPEXTIN" USING ONE-MINUTE
001100 ANYVAR-LEN
001200 ANYVAR-DEC
001300 ANYVAR-TYPE
001400 ANYVAR-SCALE
001500 ANYVAR-DEL
001600 ONE-MINUTE-REAL
001700 ANYVAR-ERR.
001800*
001900 IF ANYVAR-ERR NOT = +0
002000 MOVE ANYVAR-ERR TO DIS-Z
002100 DISPLAY DIS-Z " INTRINSIC EXTIN' ERROR VALUE"
002200 STOP RUN.
I put them in a copylib and have access anytime. I forget what
manual I found this is but its not in the Intrinsic manual for
some reason, maybe the COBOL manual. I could probably find them
in the HPLaserRom if I looked. Anyway, you sound like you haven't
changed at all. Its good to see you still have that "fire in the belly"..!
Eric S.
> -----Original Message-----
> From: Joseph Norris [SMTP:[log in to unmask]]
> Sent: Tuesday, May 25, 1999 9:06 AM
> To: Eric H. Sand
> Subject: RE: You should check this out
>
> Have you got into Linux - its fantastic. Very powerful. My new server on
> the HP (written in Perl) and my client on the Linux box are running just
> fine and I keep extending the power of the server to cover new needs.
>
> I have a couple Cobol programs for you to look at that I just wrote
> yesterday to address a problem we are have with our dat drive and backup.
> The problem is that when our operator is not around, we have trouble
> remembering to drop a new backup tape in the drive. Backup runs at 11:00
> pm, dumps everyone off and then sits there waiting for a tape. Next
> morning, many angry users who came in at 6:00 am to get work done and have
> no place to do it. Enter your's truly!
>
> This is something that should have been addressed years ago - but no one
> tackled it - oh how I love a challenge. You would think that you could
> just do a showdev on the dat drive, send it out to a file, parse the file
> and determine if the drive is available or has a tape loaded. Enter the HP
> overlords - it appears that if you load a tape, then take the tape out you
> will always get a showdev that looks the same - as if the tape were
> loaded. It will continue to look like this:
> LDEV AVAIL OWNERSHIP VOLID DEN ASSOCIATION
>
> 8 AVAIL (W) (Nolabel) 1600
>
> Even after you take the tape out!!!
>
> What I did was write a program that uses intrinsic hpdevcontrol. You pass
> parm 100 to this intrinsic to load the media and then a 101 to put the
> tape drive online. If there is no tape, the intrinsic sits and waits for a
> tape or an abortio. How could this resolve the problem? I wrote a father
> program that creates and activates my tape check program. It stays awake
> while the son goes out and checks the tape drive. The son process, checks
> the tape drive and if it can put the tape online (hpdevcontrol clears), it
> sets an hpvar. The father wakes up after a pause (you should see what I
> had to do to get the pause to work), checks the hpvar and determines what
> should be done next.
>
> Here's a test job stream looks:
> !job TESTJ1,!user.!acct;OUTCLASS=LP,1
> !CRDEVCHK.PROG.JOSEPHN
> !IF KILLB = "DOIT"
> ! TELLOP DOIT
> ! EOJ
> !ELSE
> ! TELLOP TAPE IS IN
> !ENDIF
> !SHOWVAR
> !eoj
>
> #Joseph Norris (Perl - what else is there?/HP3000/Linux/CGI/Msql)
> print @c=map chr $_+100,(6,17,15,16,-68,-3,10,11,16,4,1,14,-68,12,1,14,8,
> -68,4,-3,-1,7,1,14,-68,6,11,15,1,12,4,-68,-22,11,14,14,5,15,-90);
>
>
> On Tue, 25 May 1999, Eric H. Sand wrote:
>
> Hey Joseph,
> Researched this about 2 months ago and came away very impressed..!
> It seems the HP Labs guys ported Image to HP-UX as well as NT and Linux.
> If I only had the time for all the software I'd like to get to know...!
>
> Thanks for the good word Joseph......Eric S.
>
>
> > -----Original Message-----
> > From: Joseph Norris [SMTP:[log in to unmask]]
> > Sent: Tuesday, May 25, 1999 7:49 AM
> > To: Eric H. Sand
> > Subject: You should check this out
> >
> > Hey Eric,
> >
> > Thought that this might interest you: http://www.hp-eloquence.com/
> >
> > #Joseph Norris (Perl - what else is there?/HP3000/Linux/CGI/Msql)
> > print @c=map chr
> $_+100,(6,17,15,16,-68,-3,10,11,16,4,1,14,-68,12,1,14,8,
> > -68,4,-3,-1,7,1,14,-68,6,11,15,1,12,4,-68,-22,11,14,14,5,15,-90);
> > << File: >> << File: >>
|