Hidden Value – April 2001

 

Q: I thought I set up DNS access correctly, but when I try to ftp by name I get

Cannot connect to host: xxxxx (FTPERR 9)

I know it is not our network because it works fine from my desktop system.

A: Chris Bartram pointed the way to the answer:

The word "namserver" in RESLVCNF.NET.SYS was in uppercase, not lowercase. As a general note, most "Posix" functionality is case-sensitive.

 

Q: Is there a way to display owning processes of mode 5 or mode 6 locks in Image?

A: Larry Barnes replied:

In DBUTIL, as the creator, the command

show <dbname> locks

will show all locks. Note that if you have SM capability, the "show <dbname>" command will work on any database on the system.

 

Q: I am attempting to programmatically via CI commands return to the originating system after a remote command has been issued. In other words, I remote from machine a to machine b, complete my task, issue a bye, but as we all know you get a machineb# prompt at which time you need to issue a : to return to machine a. I want this to happen automatically. Any ideas?

A: Mike Hornsby replied:

The trick is not to do the standalone remote, which takes you to the remote system prompt and removes local control, but to issue the commands appended to the remote command as in:

remote hello manager.sys
remote listf
remote run xyzzy
remote bye

This preserves the local control so that you don't need to leave home and thus don't need to get back again.

 

Q: Is there a way to backup spoolfiles by job number?

A: Jon Diercks replied:

With plain vanilla MPE tools, you can do:

:FILE T;DEV=TAPE
:SPIFF "STORE [JOBNUM=Jnnn];*T"

 

Q: Given an IP address, how can I retrieve the associated name from the MPE command line? (The network is using DHCP.)

A: Mark Bixby replied:

Assuming you have DNS and DHCP configured correctly, then on MPE 6.0 or greater:

:XEQ /BIND/PUB/bin/nslookup xxx.xxx.xxx.xxx

 

Q: Does anyone know of a compression program to compress files locally on the HP3000? It would have to be standard so that a vendor can decompress on the other side of an FTP without having to go through too much trouble getting the software to do so.

A: Andreas Schmidt replied:

tar with Z option is one method which is well known and fully supported on MPE by HP. The other one is gnu's zip but this requires gnu on both sites.

Mark Bixby added:

The POSIX compress/uncompress utilities are available in FOS:

/bin/compress (symlink to /SYS/HPBIN/COMPRESS)
/bin/uncompress (symlink to /SYS/HPBIN/UNCOMPRE)

These let you use standard .Z compression.

Finally, Doug Becker noted:

Go to ftp://nha.co.za/hp3000/

There is a zip and an unzip directory. The zip and unzip use the Winzip format which can be handy.

 

Q: We are planning to install 6.5 on 4 HP3000's but we only have a COBOL compiler on our development box. Since we always do new installs on our test box first, we will end up with a 6.5 compiler on the development box. I understand from HP that 6.5 compiled programs will not run on 5.5. Has anyone run into this dilemma and if so, how did you resolve it?

A: Mark Klein replied:

Actually, that's not entirely true. If you compile and link on the 6.5 box and move the programs back, you should be OK. The problem is that there is new millicode in 6.5 that the compilers will use. That means that if you attempt to link on an older version of the OS with an NMOBJ created on 6.5 or later, you can run into issues.

 

Q: We recently started the JINETD job on our 6.0 system to allow inbound telnet access. We are getting the following console message several times a minute:

hh:mm/#Jnnnn/pin/stat on "/etc/bootptab": No such file or directory

Now, this message is correct since there is no /etc/bootptab file. What is the JINETD job looking for and how do I stop these annoying messages?

A: Tom Brandt replied:

Look at INETDCNF.NET.SYS. You probably have bootp configured as a service for INETD to run. Comment it out.

 

Q: I am adding two drives to a HASS (Jamaica) enclosure that already has several drives. I think I know what to do but could use a cheat sheet.

A: Gilles Schipper, Lars Appel and Chris Bartram replied:

You do not even have to take down the system to add the drives to an HASS enclosure. The steps would be something like:

:volutil

>newvol mpexl_system_volume_set:member99 99 100 100

(This example is for ldev 99 - the "99" in member99 does not need to correspond to the ldev number, it only needs to be unique for that volume set.)

It might be a good idea to first run the drives in a NEWSET for a while, exercising them a little. You could also use that extra volume set to exercise seldom used VOLUTIL commands or NEWACCT options like ONVS/HOMEVS. Finally, SCRATCHVOL them and add them to the desired volume set.

One note of caution, if you dynamically add disk drives to, say, your MPEXL_SYSTEM_VOLUME_SET, you could find yourself in a pickle if you subsequently perform a START RECOVERY by accident or design. So, while you can add drives dynamically as a convenience, it is a good idea to schedule a SHUTDOWN, START NORECOVERY as soon as possible to "fix" the new drives in your base configuration.

 

Q: I have three system processes (Pin #61, #62 & #63) that are doing a large amount of I/Os (writes). All three pins have the same stack trace. Is it related to the SQE heartbeat problem with DTCs? The I/Os are strictly writes and sometimes large numbers are displayed (> 1200/sec) in SOS. I checked the "heartbeat" value using LINKCONTROL but it shows a "0" value.

A: Doug Werth replied:

If I had to guess I would say this (DTC heartbeat) is exactly the problem. Use SOS or Glance to list the open files for the process. It should show you two files in PUB.SYS in the format HxxxxxxA and HxxxxxxB. The 'xxxxxx' represents the last 6 digits of the MAC address for the DTC that is logging the event. If this indeed is the problem then adjust the transceiver of the offending DTC(s) to supply SQE Heartbeat or replace the transceiver.

The Heartbeat Losses statistic reported by LINKCONTROL will show you only when the transceiver for the system does not have SQE Heartbeat enabled and it has nothing to do with the DTCs and their SQE settings. Lack of SQE Heartbeat on the system has been shown to cause network performance degradation and should be corrected immediately when or if encountered.

 

Q: Our system backup is automatically scheduled every night, but someone has to put in a tape sometime during the day for the backup that night. Yesterday, we forgot and the backup job tied up all the files and sat there hung, waiting for the tape that never arrived. This meant that a user was unable to logon to the system, enter an invoice and print the required bar code labels for a shipment that had to go out. This also meant that the nightly update didn't run and reports for users weren't printed and ready. It was not a good morning.

What I'm wondering is if there is some way, in a job, to test to see if a tape is online or not?

A: John Burke replied:

Absolutely. I've been using a technique for several years that has worked well. Below, find the key parts of a job I use on one system. It is streamed by the backup job to start at 11:00am the next day. Basically, it does a SHOWDEV to a file, parses the output and, if tapes are not loaded, it

Note that I use "tell" commands with embedded control codes to switch to blinking inverse video (really gets your attention). Also, the "IF MOUNTED = 0" can be adjusted for multiple tape drives. For example, one system has 5 drives, so the line is changed to "IF MOUNTED < 5". The same technique can be used to prevent the backup from starting if tapes are not mounted and online.

One caveat: if you mount a tape and then dismount it for some reason, MPE/iX still shows the tape as mounted in the SHOWDEV display.

!JOB DDSWARN,OPERATOR.SYS;HIPRI
!FILE TAPEDEV;MSG
!SHOWDEV TAPE > *TAPEDEV
!SETVAR MOUNTED,0
!WHILE (FINFO('TAPEDEV','EOF')) > 0 DO
! INPUT MYVAR < TAPEDEV
! IF POS('(Nolabel)',MYVAR) > 0
! SETVAR MOUNTED,MOUNTED+1
! ENDIF
!ENDWHILE
!PURGE TAPEDEV,TEMP > $NULL
!DELETEVAR MYVAR
!RESET TAPEDEV
!IF MOUNTED = 0

< do notifications >

! STREAM DDSWARN.JOBS.SYS;IN=,,10
!ENDIF
!SET STDLIST=DELETE
!EOJ

 

Q: Prior to 6.0, (i.e. CSTM), we could use SYSDIAG\LOGTOOL to extract a virtual console log (anything written to the console), and then use an editor to find specific text. Since we no longer have access to SYSDIAG, we no longer have LOGTOOL. Does anyone have a solution to this problem? Is there a simple way to interrogate and extract (in printable form) the data in the system log files?

A: Doug Werth and Mike Hornsby replied:

LOGTOOL is still available, but on 6.5 you run it from the CI prompt.

There have been many programs written over the years to format system logs. Most of them are MUCH better than LOGTOOL. However, most of them will only format console logs. We have a freeware program at http://www.beechglen.com named CLUE3000 that formats console logs, optionally selecting console messages that contain a specified string, and it runs on 6.5.

Gilles Schipper added:

CONSLOG, from the Boeing TECHXL account, is pretty nifty and will do what you want. It lets you specify strings to search for, as well as date/time range. Requires no special capabilities to run, although the program itself uses PM capability.

Ron Horner also added:

Check out http://horner.horner.home.mindspring.com/, go to the free stuff area and get LOGREADR. With LOGREADR, you can see the messages that are displayed on your console. You can search your log files, by session number, job number, or by a special string. Look at the messages for a specific data range. And you have a help area to guide you.

Finally, from Philippe Dimonte:

Have a look on my site http://perso.wanadoo.fr/philippe.dimonte and get the "Get console messages from log files" program from the utilities part of the site.

[Editor's note: For any of these tools to work, you need to have Console Log, Event #115 enabled via the LOG section of SYSGEN.]

 

Q: Is there any way to get QUERY to display the minus sign of a negative value in front instead of at the end?

A: Paul Scott replied:

Query does support the leading minus sign. Use NOPUNCH and Query will put the minus sign up front.

 

Q: I have a command file that executes the following command:

xeq /bin/ls "-ltr /SYSTEMS/LastLogon"

and gives the following output:

-rw-rw-rw- 1 DSHAW.PIN2000 SYSTEMS 0 Aug 24 2000 _DSHAW_PIN2000
-rw-rw-rw- 1 PLTEMP.WIN2000 SYSTEMS 0 Aug 30 2000 _PLTEMP_WIN2000
-rw-rw-rw- 1 SUE.WIN2000 SYSTEMS 0 Aug 31 2000 _SUE_WIN2000
-rw-rw-rw- 1 DOM.ECOMM SYSTEMS 0 Aug 31 2000 _DOM_ECOMM

How do I stop the first 5 columns from displaying (I only need the date, time and filename)?

A: Bill Proudfoot replied:

Use awk, as in

ls -ltr | awk '{print $6" "$7" "$8" "$9}' | more