[ From:	CRDGW2::CRDGW2::MRGATE::"SMTP::CRVAX.SRI.COM::RELAY-INFO-VAX"  9-AUG-1990 22:06:14.25  To:	MRGATE::"ARISIA::EVERHART" CC:	 Subj:	re: READ/KEY=(binary)!  * Received:  by crdgw1.ge.com (5.57/GE 1.70)( 	 id AA10891; Thu, 9 Aug 90 21:49:44 EDT` Received: From CCNUCD.DENVER.COLORADO.EDU by CRVAX.SRI.COM with TCP; Thu,  9 AUG 90 15:54:02 PDT8 Received: by ccnucd.Denver.Colorado.EDU (cudenver.ether); Message-Id: <9008092248.AA12385@ccnucd.Denver.Colorado.EDU>  Date: Thu, 9 Aug 90 16:46 MDT L From: Pete Klammer 303/556-3915 <PKLAMMER%cudnvr@ccnucd.Denver.Colorado.EDU> Subject: re: READ/KEY=(binary)! ' To: Carl.J.Lydick@sol1.gps.caltech.edu, A         boulder!ncar!gatech!harvard!yale!LRW.COM!leichter@ccnucd, D         LEICHTER-JERRY@cs.yale.edu, don@gp.govt.nz, INFO-VAX@sri.com X-Vms-To: @BINARY-KEYS.DIS  < I'm stunned!  I've been around VAX{es|en|systems} since theyD were internally known as the Comet project -- a long time, anyway --I and here's a punctuation mark in DCL, "&", that I never used!  It works!! G Thank you all, this speeds ou access to SYSUAF for accounts management.   N /** --poko ________________________________* "cut on dashes for mailing label"O Pete Klammer (303)556-3915 FAX(303)556-4822|pklammer@cudnvr.Denver.Colorado.EDU E CU-Denver Computing Services Campus Box 169|bitnet: PKLAMMER@CUDENVER O 1200 Larimer St NC2506 Denver CO 80217-3364|uucp:...!boulder!pikes!pklammer **/   @ ================================================================O =From:	CUDNVR::PKLAMMER     "Pete Klammer 303/556-3915"  7-AUG-1990 15:10:11.69  = D =Has anyone figured out a way to READ/KEY= a file from DCL on a non-J =character key?  I'm thinking of the secondary /INDEX=1 of SYSUAF (UIC's). = A =================================================================  =Date: 7 Aug 1990 17:51:45 ESTD =From: Carl.J.Lydick%SOL1.GPS.CALTECH.EDU@ccnucd.denver.colorado.edu = J =You need to use the ampersand (&KEYVAL) instead of quotes and apostrophesL =("''KEYVAL'") because if there's a null byte in KEYVAL, DCL will ignore the =rest of the command. A ================================================================= ' =Date: Wed,  8 Aug 1990 10:19:11  +0200 0 =From: "GWDGV1::MOELLER" <U0012@DGOGWDG5.BITNET> = ( =Yes, it's possible via $ READ/KEY=&key.< =First you have to create a string-valued symbol "key" (say)@ =containing the binary data (e.g. via $ key[...,...]=<integer>).= =Note: in your case, the length of *this* string has to match  =the key length exactly.@ =Then apply the transformation outlined in the following writeupO =(posted earlier this year to INFO-VAX) - replace SBJCT by KEY in what follows:  =[...]M =(4) during the substitution of "&", quotation marks (") are still recognized L =    and must be doubled and quoted as in ordinary arguments - the remaining3 =    255 character codes are handled transparently. 0 =    e.g. to get a subject of ``"'' (5 bytes) by =        $ mail/subject=&sbjctA =    you need "``""''" (8 bytes) as the contents of <sbjct>, viz. 8 =        $ sbjct = """" + "``" + """""" + "'"+"'" + """"L =It takes quite a bit of DCL to convert an *arbitrary* string into something9 =that is guaranteed to work with "&", e.g. given <sbjct>,  =$ if SBJCT.eqs."" =$ then A =$    SBJCT = """"""                     ! quote the empty string  =$ else  =$    if (SBJCT-"""").nes.SBJCT D =$    then                               ! there is at least 1 quote =$       qq_i = 0  =$       qq_result = ""  =$      qq_loop:- =$       qq_temp = f$element(qq_i,"""",SBJCT) 2 =$       if qq_temp.eqs."""" then goto qq_loop_end6 =$       qq_result = qq_result + """" + qq_temp + """" =$       qq_i = qq_i + 1 =$       goto qq_loop  =$      qq_loop_end: =$       SBJCT = qq_result =$    endif  =$ endif =Hope this helps, K =Wolfgang J. Moeller, GWDG, D-3400 Goettingen, F.R.Germany | Disclaimer ... N =Bitnet/Earn: U0012@DGOGWDG5         Phone: +49 551 201516 | No claim intendedA ================================================================= " =Date: Wed,  8 Aug 90 07:33:10 EDT =From: Jerry Leichter n = <boulder!ncar.UCAR.EDU!gatech!harvard!yale!LRW.COM!leichter%boulder.Colorado.EDU@ccnucd.denver.colorado.edu> = N =Suppose THE_KEY is a symbol containing the binary key.  (Such DCL features asL =THE_KEY[a,b]=xxx and F$CVUI may be useful in creating and manipulating such =strings.)  Then read using: =	READ/KEY=&THE_KEY K =This SHOULD work.  I'm told that on some versions of VMS it doesn't always O =work, especially when one of the bytes of THE_KEY is 0.  But try it on current < =versions and let me know what happens - I'm curious myself! =							-- JerryA ================================================================= ! =Date: Thu, 9 Aug 90 17:15:45 GMT  =From: Don Stokes P = <comp.vuw.ac.nz!gp.govt.nz!zl2tnm!don%UUNET.UU.NET@ccnucd.denver.colorado.edu> = F =leichter@LRW.COM (Jerry Leichter, LEICHTER-JERRY@CS.YALE.EDU) writes:G => 	Has anyone figured out a way to READ/KEY= a file from DCL on a non- D => 	character key?  I'm thinking of the secondary /INDEX=1 of SYSUAF => 	(UIC's).P => Suppose THE_KEY is a symbol containing the binary key.  (Such DCL features asN => THE_KEY[a,b]=xxx and F$CVUI may be useful in creating and manipulating such => strings.)  Then read using: => 	READ/KEY=&THE_KEY M => This SHOULD work.  I'm told that on some versions of VMS it doesn't always P => work, especially when one of the bytes of THE_KEY is 0.  But try it on curren> => versions and let me know what happens - I'm curious myself!G =Not sure about nuls, but if THE_KEY has a quote character in the least F =significant eight bytes, the quote gets stripped.  It may be that theI =second character has to be a nul too.  I saw this happen recently, under 
 =VMS V5.2.P =Don Stokes, ZL2TNM  /  /                            Home: don@zl2tnm.gp.govt.nzP =Systems Programmer /GP/ Government Printing Office  Work:        don@gp.govt.nzP =__________________/  /__Wellington, New Zealand_____or:_PSI%(5301)47000028::DONA =================================================================   