+ [ A bit of stuff off INFO-VAX off ARPAnet.]          - Glenn Everhart   Re: VMS: ...image questions > "Possible" is not the same thing as "DEC-supported."  It is in@ fact quite possible to run another image in the same process and? then return control to your own code.  Here is a little routine @ that will execute a DCL command and then transfer control to the@ program of your choice, which may or may not be the same program: that invokes this call.  I'll assume you are familiar with< techniques for maintaining context across image activations.  = Sorry I took so long to put this together; usual disclaimers.    					-=EPS=-0 Internet: EPS%EQL.Caltech.Edu@Hamlet.Caltech.Edu BITNET:	  EPS@CALTECH  HEP:	  EQL::EPS  -------	[DO_RUN.MAR]= 	.title	do_run	Combination LIB$DO_COMMAND and LIB$RUN_PROGRAM    ;;;	Eric P. Scott, May 1986    	$clidef 	$climsgdef  	$cliservdef 	$libdef 	$ssdef  	$stsdef   	.default	displacement,word   % 	.psect	do_run,nowrt,exe,shr,pic,long   ; ;;;	ret-status.wlc.v=DO_RUN(cmd-text.rt.dx, pgm-name.rt.dx) $ 	.entry	do_run,^m<r2,r3,r4,r5,r6,r7> 	assume	cli$k_srvdesc gt 63  	movab	-cli$k_srvdesc(sp),sp 	movl	4(ap),r0 	jsb	g^lib$analyze_sdesc_r2  	blbc	r0,28$
 	cmpw	r1,#256 
 	bgequ	27$   	movq	r1,r6 % 	movc5	#0,(sp),#0,#cli$k_srvdesc,(sp)  	assume	cli$b_rqtype eq 0  	assume	cli$w_servcod eq 1 	assume	cli$k_command le 255+ 	movw	#cli$k_cliserv!<cli$k_command@8>,(sp)  	movw	r6,cli$w_rqsize(sp)  	movl	r7,cli$a_rqaddr(sp) 	 	pushl	sp  	calls	#1,@#sys$cli  	blbc	r0,40$   	movl	8(ap),r0 	jsb	g^lib$analyze_sdesc_r2  	blbc	r0,28$
 	cmpw	r1,#132 
 	blequ	30$   27$:	movl	#lib$_invarg,r0  28$:	ret   30$:	movq	r1,r6 % 	movc5	#0,(sp),#0,#cli$k_srvdesc,(sp)  	assume	cli$b_rqtype eq 0  	assume	cli$w_servcod eq 1 	assume	cli$k_chain le 255) 	movw	#cli$k_cliserv!<cli$k_chain@8>,(sp)  	movw	r6,cli$w_rqsize(sp)  	movl	r7,cli$a_rqaddr(sp) 	 	pushl	sp  	calls	#1,@#sys$cli  	blbs	r0,50$  8 40$:	cmpzv	#sts$v_fac_no,#sts$s_fac_no,r0,#cli$_facility	 	bneq	44$ ! 	cmpw	r0,#<cli$_invreqtyp&^xffff> 	 	bneq	45$  	movl	#lib$_nocli,r0 44$:	ret 45$:	movl	#lib$_uneclierr,r0 	ret   50$:	movab	cli$k_srvdesc(sp),sp  	pushl	s^#ss$_normal 	calls	#1,@#sys$exit 	clrl	r0 	ret   	.end C 10 May 86 CUNNINGHAMR%HAW.SDSCNET@LLL-MFE.ARPA, A DECUS trip report   A [A shortened version of my DECUS trip report for your amusement.]    GENERAL COMMENTS  J The Dallas Convention Center was the largest such facility I've ever seen,G and the joke that they should have issued us horses & compasses instead H of cowboy hats didn't seem all that funny as the week wore on and I keptK walking the .5+ mile or so back and forth to different ends of the complex.   N At Dallas -- my 2nd DECUS -- I found myself was able to spend more time in theF less formal sessions (the Birds-of-a-Feather and "campground" informalL meetings), and the various question & answer sessions.  Many of these seemed6 more productive than some of the more formal sessions.  J I think my organization got its money's worth out of sending me, but afterE another DECUS or so this sort of thing will start reaching a point of M diminishing returns. My personal preference fron now on is to attend just the I "western" DECUS meetings once a year, starting with the next DECUS in San  Francisco this October.   G As before, pre-purchasing most of the session notes proved to be a very I good investment.  I also ended up ordering audio tapes for seven sessions L I would have liked to attend, but couldn't make due to scheduling conflicts.  N While I didn't get an official count, DECUS attendance seemed down (to perhapsJ < 5,000 from 6,000+ at Anaheim?).  DEC's new policy of not making many newM product announcements at DECUS symposia probably had an effect, but I suspect 7 the industry-wide depression made more of a difference. 1 [ Note: official count was about 5000 attendees.]      UPCOMING DECUS SYMPOSIA   8 6-10 Oct 1986           Moscone Center, San Francisco CA5 27 Apr - 1 May 1987     Opryland Hotel, Nashville, TN = 7-11 Dec 1987           Anaheim Convention Center, Anaheim CA C 16-20 May 1988          Cincinnati Convention Center, Cincinnati OH   G Boston is building a new convention center, and after 1988 we may see a I DECUS in the northeast.  Until then, New York is apparently the only spot O with adequate facilities ... and the consensus is that it's just too expensive.      PRODUCT ANNOUNCMENTS AT DECUS   F Digital had a "DECWORLD" presentation of new things back in March, andG announced most of their new products then.  In fact, they've officially O stated that they will no longer follow the longstanding practice of introducing H lots of new products at DECUS, but will announce new products separately, (or at special staged events like DECWORLD).  % The only announcements I caught were:   F         LN03 PLUS, an expanded-memory version of the LN03 (also shouldG         be available as an upgrade).  Enough memory to bitmap an entire H         page of output, provides Tektronix 4010/4014 plotting emulation.J         (significiantly, does not yet provide POSTSCRIPT support, althoughM         that might just happen later...).  We're planning on getting a couple          of them.  B         PRINTSERVER 40, a 40 page/minute (DEC calls this mid-rangeB         speed!?) laser printer.  Ethernet interface only, intendedE         as a print server.  Understands POSTSCRIPT.  300x300 dot/inch C         resolution.  50,000 pages/month rated capacity, 2,000 sheet ?         feed bin (+ 2 auxiliary trays), 2 output trays. uVAX-II D         controller and VT220 console.  Printserver software downlineF         loaded from a host VAX.  Host server symbiont does translationD         for non-postscript files: ANSI, LN03, REGIS, Tektronix 4010/         4014 plotting.  E         TU81 PLUS. New version of TU81 (6250/1600bpi tape drive) with H         buffering to allow it to stream nicely. (256K buffers internal.)  D         VAXcluster console.  Looked cute, I missed seeing any specs.E         However, requires you to buy a whole uVAX II for the cluster.          Expensive.   A SIGNIFICANT NON-ANNOUNCEMENT  M DEC had a "technology demonstration" that they emphasized "was not a product, N we only want your feed back at this time" consisting of a cluster of uVAX-II'sM and VAXstations (the workstation models of the uVAX-II with the nifty screens + and mouse -- rather like Sun workstations).   I The cluster used Ethernet, not star couplers.  Thin-wire Ethernet, at the  demonstration.  M The way it works is to have one "boot member" (a uVAX in their demonstration, K but could be a larger VAX) which holds the common system disk, and downline G boots the uVAXes via Ethernet.  Other "core member" machines can handle O printers and other utilities, but all systems software is on the "boot member".   M This makes the uVAX-IIs in the cluster "diskless" or potentially so.  Digital H recommends having a small, fast hard disk on each for paging & swapping.  E I attended the son that described how they did it, and came away with O the impression that the developers found it fairly simple.  Multi-cast Ethernet 7 packets effectively replace a systems bus/star coupler.   O It works.  Very well, in my opinion.  I think this could well be an interesting K development for those of us with VAX 750s ... turn them into "core members" 6 of a cluster of uVAX-IIs and do some very nice things.   A lot of people .  at DECUS liked the idea of clustering uVAXes.     SIGNIFICANT THINGS NOT SEEN   4 No sign of any new RA8n larger-capacity disk drives.  / No sign of any new higher-capacity tape drives.      INTERESTING RUMORS  N The performance of uVAX-IIs in real applications varies more than I suspected.M Since it doesn't handle the full VAX instruction set in hardware, performance D for a given application can vary anywhere from 10% of, to 110%+ of aJ VAX-11/780. [COBOL programs and the like that use the edit instructions orC packed decimal math are the slow ones. Most everything else is OK.]   H Expect the uVAX-III (full VAX instruction set in hardware, probably even' faster than the uVAX-II) within a year.   H The 8600 was originally supposed to come out much earlier than the otherH 8nnn processors, and in some ways isn't really part of the family of newF 8nnn processors.  Also notice that there is a bit of a gap between theG 8600/8650 machine and the 8800.  Don't be surprised if DEC announces an H 8700 in a year or so ... which might effectively obsolete the 8600/8650.  G A new board with a J-11 will be out for uVAX and the BI machines within L a short time. It will allow compat mode code to run on the PDP11 at hardwareM speeds. The emulator on the 8800 is comparatively slow and DEC VAX developers $ who use TECO need it to be faster...    $ VAX LANGUAGES & TOOLS RELEASE STATUS  I Here's a list of the current versions (and shipping dates) of various DEC / software products (courtesy of an L&T handout):   7         ADA             V1.2    shipment started Feb 86 &         VAX APL         V2.1    Apr 86&         VAX BASIC       V2.4    Sep 85&         VAX BLISS       V4.2    Feb 86&         VAX C           V2.2    May 86&         VAX COBOL       V3.3    Apr 86&         VAX FORTRAN     V4.4    Feb 86&         VAX Pascal      V3.3    Apr 86&         VAX PL/I        V2.4    Apr 86&         VAX RPG II      V2.0    Dec 85&         VAX PCA         V1.1    Dec 85&         VAX DEC/CMS     V2.2    May 86&         VAX DEC/MMS     V2.1    Dec 859         VAX DEC/Shell   V1.2    May 86  (Unix-like shell) C         VAX LSE         V1.3    May 86  (Language-Sensitive Editor) I         VAX Scan        V1.0    Nov 85  (awk-like pattern matching, etc.) ?         VAX NOTES       V1.?    May 86  (computer conferencing)   G My impression of the VAX NOTES demonstrated on the VAXes in the exhibit F hall was mixed, seems like it needs a few more features for the price.H Very handy teleconferencer, but the LBL Tools mail system does about the same things and is free.   VMS NEW VERSION NOTES   M Current version is VMS V4.3 (V4.3A, maybe V4.3B for the new 8nnn processors). H V4.4 used internally within DEC, but won't be shipped to customers until- summer ... they're still adding a few things.   K Back in December, the VMS developers talked about doing functional upgrades J every 8 months (even numbered .n releases), and bug-fix updates in betweenH (the odd numbered .n relseases).  In Dallas they admitted that's a tough: schedule to hold to, and they're slipping their schedules.  K What to expect in V4.4?  Primarily, support for all the new hardware (8200, N 8300, 8500, 8800, HSC70, TU81+) including multiprocessing support; secondarilyN some improvements in cluster support and some updated utilities (EDIT/ACL getsI fixed, DEBUG gets improved) ... and some refinements to DECNET; finally a " somewhat re-organized manual set.   G The new processor support major thing in V4.4 -- and what's causing the ) delays in producing a production version.   J For clustered systems V4.4 can co-exist with 4.3 in a rolling upgrade, butK not with earlier versions (4.2 or below).  Other DECNET systems can address I all the nodes of a homogeneous VAXcluster as a single DECnet node; access I to layered products on a common system directory can be restricted to one H or more nodes via ACLs.  SHOW CLUSTER tells you more.  ANALYZE/ERROR_LOGM tells you more about clusters.  There is a new version of the CI port driver.   O Utility changes involve a new SET RIGHTS_LIST command; a /[NO]RESTART qualifier N on START/QUEUE/MANAGER; queue-specific default forms for printer, terminal andC server queues; print symbiont now permits user-defined i/o routines E (offically).  ANALYZE/RMS has some new commands.  RMS supports shared K read/write access to any sequential files.  The symbolic debugger DEBUG has I even better screen support.  RMS performance should be a bit improved due  to cach interlock improvements.   I DECnet has to be re-installed.  Some routing features have been improved, I 802.2 and 802.3 Ethernet packets now supported.  Many minor DECnet fixes.   J Look for C2 (federal goverment) security classification for VMS with V4.4.( Maybe even B1 in a later version of VMS.    ( VMS DOCUMENTATION RE-ORGANIZED WITH V4.4  G Much of the VMS documentation has been re-organized.  Some manuals that H had been guides (books in small binders) are part of the reference shelfI (big binders).  Reference shelf manuals are now grouped into "functional" I volumes.  Specifically:  utilities are no longer part of one group called L "utilities", they're now part of "program development", "system management",J "networking" and other reference manuals.  DCL Dictionary is now just partK II of older manual, former part I is now the "VAX/VMS DCL Concepts Manual". L "User's Guide to EVE" and "VAXTPU EDT Keypad Emulator Quick-Reference Guide"@ have been merged into the "Guide to Text Processing on VAX/VMS".  J V4.4 release notes manual is the only release notes manual in the document$ and incorporates notes for V4.0-4.3.  I For document ordering purposes there are now several possible subsets you 
 can order:  A         1) VAX/VMS User's Document set (reference shelf vols 1-6) H         3) VAX/VMS Programmer's Document set (reference shelf vols 7-10))         4) VAX/VMS Condensed Document set C                 VAX/VMS User's Manual (nice, better than V3 Primer) L                 VAX/VMS Mini-Reference (superseeds quick-reference booklets)         5) VAX/VMS Guides   H But, of course, you can still order the whole bookcase full as one item.* (and you should get a full set with V4.4.)     SOME SUGGESTIONS FOR BACKUP   G Here's some suggestions for doing BACKUPs efficiently while maintaining E a reasonable amount of data integrity, gleaned from several sessions:   O For best tape drive performance use /BUFFER=5 (default is 3), and a large block ? size.  How large?  /BLOCKSIZE=64000 or (if you're conservative) K /BLOCKSIZE=16384 for 6250bpi tape units, and /BLOCKSIZE=32768 or (if you're G conservative) /BLOCKSIZE=16384 for 1600bpi tape units.  Use the smaller I BLOCKSIZEs for archival backup tapes, the larger for regular backups.  In H general /NOCRC is safe for 6250bpi tape drives, but use the default /CRC for 1600bpi tapes.  K For incremental backups using date selection criteria, use /FAST; otherwise K omit this (it doesn't buy you anything for wildcard selection nor if you're  backing up many, many files).   H Preferred method for full volume backup is /IMAGE (which turns on /FAST,M incidentally), but for volumes which are nearly full of files doing /PHYSICAL L instead goes quicker --- but you must use DSA-type disks (e.g. RA81) becauseH you effectively need a bad-block-free output disk when you do a restore.N /PHYSICAL is handy for "snapshot" system disk backups prior to doing upgrades, etc.  I Only a very rash person would want to change the /GROUP_SIZE (default 10) H parameter which controls the xor redundancy block calculation, since youI really get no performance increase by disabling it (what it means is that K an 11th xor check block is generated for each 10 data blocks on your backup  tape).  I BACKUP definitely goes faster if input and output devices are on separate G Unibuses, if you can do that.  Using the HSC backup (clustered systems) K gets the most out of your tape drives (and is equivalent to doing /PHYSICAL  on non-clustered systems).    & SOME SUGGESTIONS FOR SYSUAF PARAMETERS  I The VMS default parameters for users (what you get when you run AUTHORIZE L and take the original default parameters) are too low for many applications.  J In particular, the default BYTLIM parameter of 4096 is too low even to runM some of DEC's programs (try the DCL sub-command of TPU).  Everyone internally H at DEC has a BYTLIM of at least 20,000.  24,000 isn't unreasonable, it'sF a very "cheap" thing to increase (very small increase in working set).  O Here's a summary of recommended default SYSUAF parameters from various sources:            BYTLIM          24000          FILLM              64          BIOLM              24          DIOLM              24          ASTLM              64          TQELM              32          ENQLM              48          JTQUOTA          2048          PRCLM               6    All the rest at DEC's defaults.A  I Working set parameters also need careful attention, but vary according toi8 applications and your notion of how to tune your system.     KERMIT  G Current version of Kermit-32 for VMS VAXes is 3.2.074 .  Available from I Kermserv on BITNET and via FTP from COLUMBIA on ARPAnet.  Will be on fallh
 SIG tapes.  /                                                r USENET UNDER VMS  I An interesting BOF, continuing the discussion at Anaheim.  Several peopleiG are working on different approaches, and a small real working group was M formed.  I think we'll be hearing good news from those folks in a few months.QM Two separate issues were discussed:  the news-reading software; and transport-G mechanisms.  Consensus was that these were separate development issues.RG While a straight port of readnews/vnews/rnews was feasible, a couple ofrI people have already done much of the work involved in re-writing from thecI ground up sets of programs giving equivalent functionality under VMS, and.I that seems to be the preferred path.  Similarly, a consensus seemed to berK reached that several different transport mechanisms were not only feasible,eG but it was a good idea to have several.  Uucp under VMS programs exist,vH but typically require Unix licenses in order to run anyways.  In theory,I any sort of mail transport setup (including Kermit and FIDOnet) should be_H slightly hackable to transport Usenet news.  Doing a modified Kermit (orJ a set of programs that sits on top of Kermit) to transport the Usenet newsM seemed to appear popular, and several people said they were interested enough_ in the idea to hack on it.     INFO-VAX SUBSCRIBER'S BOF,  K Not sure that anyone else would, I scheduled one.  Was pleasantly surprisedaM to see more than a dozen people show up.  Had a free-form discussion touchingcL on many of the recently-active issues being discussed in INFO-VAX.  We spentO a fair amount of time discussing the features & bugs of various TCP/IP packages	N for VMS VAXes, the GNU effort, and just matching names dis-embodied electronicG addresses with real faces.  I'd like to see it happen again at a futures DECUS.  F 10 May 86 GKN%SDS.MFENET@LLL-MFE.ARPA, Backup, DECnet, and tape drives  
 Christian:  J Let me see if I understand the problem:  You want to have Backup deliver aF save set straight to a tape drive across DECnet.  If this is true, youD need to write a program which catches Backup save sets from a DECnetL logical link and does the right thing with them.  At the end of this messageG is a program which does such a thing, and a command file which is uses.   : Basically, you have to define an object for DECnet thusly:  L         $ NCP Define Object NetBackup Number 0 File SYS$SYSTEM:NetBackup.COM  K Stick NetBackup.COM and NetBackup.EXE on SYS$SYSTEM:, and then use it like:l  -         $ Backup [...] NODE::"Task=NetBackup"s  J The save set name will be the name of the source node.  I use this to backD up a uVAX-II which has no tape drive across an ethernet to an 11/785
 every day.   Hope this helps.  
 Gerard Newmant  P ---------------------------------NetBackup.COM---------------------------------- $       Set Verify $j $ !+ $ !w. $ ! ----- NetBackup.COM:   DECnet-based backup $ !  $ !DI $ ! This command file, along with NetBackup.EXE, provides a Backup server I $ ! process to receive save sets via  DECnet and place them directly in ar $ ! tape file. $ !r $ ! Version:    V01.00 $ ! Date:       05-Feb-1986o $ !t# $ ! Gerard K. Newman    05-Feb-1986  $ !  $ !- $gG $       Set NoOn                                        !Don't crap outrP $       Set Process/Priority=4                          !Don't be (much of) a ho gt $tN $       We_Were_Here_Before = 0                         !Only once thru so far $n? $ ! Get the node name from SYS$NET and use it as the tape label0 $tJ $       Node = F$Logical("SYS$NET")                     !Get the node nameC $       Node = F$Extract(0,F$Locate(":",Node),Node)     !       ...h? $       Set Process/Name="NetBack: ''Node'"             !Frillsa $mH $ ! Grab onto a TU78 if we can (note - just specify the device type, and* $ ! DCL will find a free device if it can) $ M $       Allocate MF TAPE:                               !Get a TU78 if we canaH $       Err_Status = $STATUS                            !Copy the statusG $       If .not. Err_Status     Then Goto No_Tape_Avl   !Die if we losti $a $ ! Initialize the tape et. al.f $wP $ Init_Tape:                                            !Here to initialize the  tape $fH $       If We_Were_Here_Before Then Goto Backup_Lost    !Punt if we loopP $       We_Were_Here_Before = 1                         !Mark that we've been he	 re beforeoL $       Initialize/Density=6250 TAPE: 'Node'            !Initialize the tapeH $       Err_Status = $STATUS                            !Save the statusK $       If Err_Status           Then Goto Mount_Tape    !Mount it if we wonr $ 7 $ ! See if we lost because the tape drive isn't spun upt $ I $       If Err_Status .neq. %X10750254 Then Goto Cant_Ini !%INIT-F-VOLINVt $l& $ ! Ask the operator to hang the tape. $rP $       Request/Reply "Please mount a tape on ''F$Logical("TAPE")' for backup of  _''Node'::" !Ask pretty please F $       If $STATUS Then Goto Init_Tape                  !Try try again> $       Goto Cant_Ini                                   !Sigh. $0O $ Mount_Tape:                                           !Here to mount the tapee $ G $       Mount TAPE: 'Node'                              !Mount the tape J $       Err_Status = $STATUS                            !Retain the status= $       If .not. Err_Status     Then Goto Cant_Mount    !Huh?  $o' $ ! Catch the save set from the network, $kK $       Run SYS$SYSTEM:NetBackup                        !Catch the save set1H $       Err_Status = $STATUS                            !Save the status= $       If .not. Err_Status     Then Goto Backup_Lost   !Sigh  $o $ ! We're done $sC $       Request "Backup is done!"                       !We're doneI $rI $ Clean_Up:                                             !Here to clean up  $ K $       Dismount TAPE:                                  !Dismount the taprelK $       Deallocate TAPE:                                !Let go of the tape = $       Exit                                            !Ciaot $c8 $ ! Here when we can't allocate the specified tape drive $lP $ No_Tape_Avl:                                          !Can't allocate the tape $ J $       Own_PID = F$GetDVI(P1,"PID")                    !Get the owner PIDP $       Own_Process = F$GetJPI(Own_PID,"PRCNAM")        !Get the owner process n ametP $       Request "Can't allocate ''P1', it's owned by ''Own_Process' (''Own_PID') "h< $       Exit                                            !Bye $ * $ ! Here when we can't initialize the tape $eP $ Cant_Ini:                                             !Can't initialize the ta pe $aK $       Request "Can't initialize ''P1', to wit:  ''F$Message(Err_Status)'"m< $       Goto Clean_Up                                   !Bye $s% $ ! Here when we can't mount the tapef $tM $ Cant_Mount:                                           !Can't mount the tapeo $ F $       Request "Can't mount ''P1', to wit:  ''F$Message(Err_Status)'"< $       Goto Clean_Up                                   !Bye $  $ ! Here when backup losti $t $ Backup_Lost: $pJ $       Request "Backup crapped out, viz: ''F$Message(Err_Status)'" !Sigh.= $       Goto Clean_Up                                   !Ciaoi  P ---------------------------------NetBackup.MAR----------------------------------/         .Title  NetBackup - DECnet based backupv         .Ident  /V01.000/.         .Enable SUPn"         .Default Displacement,Word$         .Subtitle       Introduction   ;+ ; ' ; ----- NetBackup:  DECnet based backupf ;  ;- ; Facility:L ;o5 ;       VAX/VMS system management, backup procedures.a ;d ; Abstract:  ; F ;       This routine will  operate as a network  server to  catch saveF ;       sets from systems which do not have tape drives.  This routine. ;       requires some help from NetBackup.COM. ;s ; Environment: ; 0 ;       VAX/VMS V4.0 or later, NETMBX privilege. ;w ;  ; Version:      V01.000f ; Date:         21-Jan-1986. ;l# ; Gerard K. Newman      21-Jan-1986p$ ; Science Applications International ; 800 Oak Ridge Turnpike ; Oak Ridge, TN  37830 ; (615) 482-9031 ;. ;w ; Modifications: ;y ;s ;-  
         .Page )         .Subtitle       Local definitionsV  4         .NoCross                        ;Save a tree  ;         $IODEF                          ;I/O function codesh1         $RMSDEF                         ;RMS junkC=         $SSDEF                          ;System service codes   :         .Cross                          ;Turn CREF back on     ; Local definitions   J ; Block size from the backup save set header.  This information taken from ; BACKDEF.SDL, fiche 9 B15.   I         $DEFINI BBH                     ;Start of the Backup Block Header   ? $DEF    BBH$W_SIZE      .Blkw           ;Size of this structure < $DEF    BBH$W_OPSYS     .Blkw           ;Operating system ID5 $DEF    BBH$W_SUBSYS    .Blkw           ;Subsystem ID67 $DEF    BBH$W_APPLIC    .Blkw           ;Application IDI> $DEF    BBH$L_NUMBER    .Blkl           ;Block sequence number/ $DEF    BBH$B_FILL1     .Blkb   20      ;SparesAD $DEF    BBH$K_COMMON                    ;Length of the common headerO $DEF    BBH$W_STRUCLEV                  ;Structure level, which is composed of: > $DEF    BBH$B_STRUCVER  .Blkb           ;The structure version< $DEF    BBH$B_STRUCLEV  .Blkb           ;The structure levelE $EQU    BBH$K_LEVEL1    257             ;Structure level 1, version 1p6 $DEF    BBH$W_VOLNUM    .Blkw           ;Volume number2 $DEF    BBH$L_CRC       .Blkl           ;Block CRC3 $DEF    BBH$L_BLOCKSIZE .Blkl           ;Block sizee. $DEF    BBH$L_FLAGS     .Blkl           ;Flags= $DEF    BBH$T_SSNAME    .Blkb   32      ;.Ascic save set namen4 $DEF    BBH$W_FID                       ;Current FID; $DEF    BBH$W_FID_NUM   .Blkw           ;File header numbert= $DEF    BBH$W_FID_SEQ   .Blkw           ;File sequence number ? $DEF    BBH$W_FID_RVN                   ;Relative volume numberu? $DEF    BBH$B_FID_RVN   .Blkb           ;Relative volume numberlP $DEF    BBH$B_FID_RVX   .Blkb           ;Relative volume file header extension ( ?)4 $DEF    BBH$W_DID                       ;Current DID@ $DEF    BBH$W_DID_NUM   .Blkw           ;Directory header numberB $DEF    BBH$W_DID_SEQ   .Blkw           ;Directory sequence numberI $DEF    BBH$W_DID_RVN                   ;Directory relative volume numbert. $DEF    BBH$B_DID_RVN   .Blkb           ;DittoP $DEF    BBH$B_DID_RVX   .Blkb           ;Relative volume file header extension ( ?): $DEF    BBH$T_FILENAME  .Blkb   128     ;Current file nameH $DEF    BBH$B_RTYPE     .Blkb           ;Record type of the current file: $DEF    BBH$B_RATTRIB   .Blkb           ;Record attributesH $DEF    BBH$W_RSIZE     .Blkw           ;Record size of the current fileH $DEF    BBH$B_BKTSIZE   .Blkb           ;Bucket size of the current fileE $DEF    BBH$B_VFCSIZE   .Blkb           ;VFC size of the current file P $DEF    BBH$W_MAXREC    .Blkw           ;Maximum record size of the current fileK $DEF    BBH$L_FILESIZE  .Blkl           ;Size of the current file in blocks.1 $DEF    BBH$T_RESERVED2 .Blkb   22      ;Reserved 8 $DEF    BBH$W_CHECKSUM  .Blkw           ;Header checksumJ $DEF    BBH$K_LENGTH                    ;Length of the Backup Block Header  G         $DEFEND BBH                     ;End of the Backup Block Headerd    I ; Buffer size we allocate  to catch blocks from the network.  Do not makepI ; this bigger than 32K, as VMS can't cope with transfers larger than thatg ; from DECnet.  L MAX_BUFF        =       32768           ;Largest buffer we care to cope with  
         .Pager&         .Subtitle       Impure storage  ;         .Psect  IMPURE_DATA     NOEXE,RD,WRT,PIC,NOSHR,PAGE.    C ; RMS control blocks to create the file on our tape drive.  This isCC ; easier to do  than trying to figure  out how  to use  the ACP QIOb ; interface.  G TAPE_FAB:       $FAB    -                       ;FAB for the tape drivehB                         DNM=<TAPE:.BKP>,-       ;Default file name=                         FAC=<PUT>,-             ;Write accessrB                         FNA=NODE_BUFF,-         ;File name addressB                         FOP=<UFO>,-             ;Let me do the I/OE                         RFM=<FIX>               ;Fixed length recordse  
 ; Random datae  ? NET_CHAN:       .Blkw                   ;Channel to the networki@ IOSB:           .Blkq                   ;Random I/O status block: BUFF_DESC:      .Long   MAX_BUFF,0      ;Buffer descriptor2 NODE_DESC:      .Long   64              ;Node name4                 .Address NODE_BUFF      ; descriptor  @ NODE_BUFF:      .Blkb   64              ;Space for our node name  
         .Pageu$         .Subtitle       Pure storage  ;         .Psect  PURE_DATA       NOEXE,RD,NOWRT,PIC,SHR,PAGEs   ; Random strings  G SYS$NET:        .Ascid  "SYS$NET"               ;To confirm our connect1  
         .PageV#         .Subtitle       Entry pointe  9         .Psect  CODE            EXE,RD,NOWRT,PIC,SHR,PAGE   3         .Entry  START,^M<>              ;Entry heree  5 ; First things first.  Confirm our DECnet connection.e  9         $ASSIGN_S DEVNAM=SYS$NET,-      ;Assign a channeliC                 CHAN=NET_CHAN           ; to confirm the connections8         BLBC    R0,10$                  ;Die if we can't  < ; Allocate a buffer big enough to hold onto backup save sets  @         PUSHAL  BUFF_DESC+4             ;Return the address hereA         PUSHAL  BUFF_DESC               ;We need this much memoryv@         CALLS   #2,G^LIB$GET_VM         ;Go allocate some memory.         BLBC    R0,10$                  ;Sigh.;         MOVQ    BUFF_DESC,R10           ;Address our buffer/  P ; Read the Backup Block Header record to find out how big to make the blocks, et c.  >         $QIOW_S CHAN=NET_CHAN,-         ;Read from the network=                 FUNC=#IO$_READLBLK,-    ; to find out how bigt=                 IOSB=IOSB,-             ;  to make our blocks :                 P1=(R11),P2=R10         ;Put the data here<         MOVZWL  IOSB,R0                 ;Grab the I/O status9         BLBS    R0,20$                  ;Branch if we won   7 10$:    BRW     50$                     ;Leave if errorh  1 ; Fill in the block size and maximum record size.h  2 20$:    $FAB_STORE FAB=TAPE_FAB,-       ;Store the6                 BLS=BBH$L_BLOCKSIZE(R11),- ;Block size=                 MRS=BBH$L_BLOCKSIZE(R11) ;Maximum record sizeh  F ; Use the  node name as the save set name, as the save set name in theA ; BBH looks a lot like "Task=NetBackup", which is no good at all.a  4         $TRNLOG_S LOGNAM=SYS$NET,-      ;Get the NCB4                 RSLBUF=NODE_DESC,-      ;Put it here?                 RSLLEN=NODE_DESC        ;Tell me how long it isiF         MOVQ    NODE_DESC,R0            ;Grab a copy of the descriptorG         LOCC    #^A/:/,R0,(R1)          ;See if we can find a node nameaL         SUBL3   R0,NODE_DESC,R1         ;Compute the length of the node name2         $FAB_STORE FAB=TAPE_FAB,-       ;Store the;                 FNS=R1                  ;Save set name sizen  J ; Create the file, but let me do I/O to it.  Use RMS, as it's a lot easier' ; than the QIO interface to the ACPs...t  8         $CREATE FAB=TAPE_FAB            ;Create the fileO         BLBS    R0,40$                  ;Branch into the rest of this if we wona7         RET                             ;Lose otherwiseg  H ; Ok - now all we have to do is to loop copying records from the networkH ; into our file.  When we deassign the channel at the end of all of this ; we should be just fine.a  < 30$:    $QIOW_S CHAN=NET_CHAN,-         ;Read another record:                 FUNC=#IO$_READLBLK,-    ; from the network8                 IOSB=IOSB,-             ;I/O status here7                 P1=(R11),P2=R10         ;Buffer is here2;         MOVZWL  IOSB,R0                 ;Get the I/O status A         BLBC    R0,50$                  ;Maybe the other guy quit   L 40$:    MOVZWL  IOSB+2,R1               ;Get the size of the buffer to write4         $QIOW_S CHAN=TAPE_FAB+FAB$L_STV,- ;Write out:                 FUNC=#IO$_WRITEVBLK,-     ; the next block8                 IOSB=IOSB,-               ;  on the tape3                 P1=(R11),P2=R1            ;     ... ;         MOVZWL  IOSB,R0                 ;Get the I/O statush;         BLBS    R0,30$                  ;Loop if successful   C 50$:    CMPL    #SS$_LINKDISCON,R0      ;Did the other guy go away?tA         BEQL    60$                     ;If EQL yes, not an errordD         CMPL    #SS$_LINKABORT,R0       ;This happens sometimes, too=         BNEQ    70$                     ;Must be a real error   : 60$:    MOVL    #SS$_NORMAL,R0          ;Else not an error  P 70$:    RET                             ;Back to DCL (all deassigns done for me)               .End    STARTn