Programming Examples

Getting ASCII Data with PRINt? ALL Query

Getting ASCII Data with PRINt? ALL Query

This program example shows you how to get ASCII data from a listing display, like the disk catalog or state listing, using the PRINt? ALL query. There are two things you must keep in mind:

You must select the mainframe, which is always SELECT 0 for the HP 16500C mainframe.

You must select the proper menu. The only menus that allow you to use the PRINt? ALL query are the disk menu and listing menus.

10

!

****** ASCII DATA *******

20!

30!

40! This program gets the hard disk directory from the HP 16500C mainframe

50! in ASCII form by using the PRINT? ALL query.

60!

70!****************************************************************

80!

90DIM Block$[32000]

100OUTPUT 707;"EOI ON"

110OUTPUT 707;":SYSTEM:HEAD OFF"

120OUTPUT 707;":SELECT 0" ! Always a 0 for the HP 16500C mainframe

130!

140!

150OUTPUT 707;":MENU 0,1" ! Selects the hard disk menu. Print? All

160

! will only work in disk menu and listings.

170

!

180OUTPUT 707;":SYSTEM:PRINT? ALL"

190ENTER 707 USING "-K";Block$

200!

210!****************************************************************

220! Now display the ASCII data you received.

230!

240PRINT USING "K";Block$

250!

260END

15–9

Page 243
Image 243
HP Sander 16500C manual Getting Ascii Data with PRINt? ALL Query