          <<< NOTED::DISK$NOTES7:[NOTES$LIBRARY_7OF4]HACKERS.NOTE;1 >>>
                               -< ** Hackers ** >-
================================================================================
Note 1776.0     Deleting records from RMS indexed file from DCL?       8 replies
BBQ::WOODWARDC "...but words can break my heart"     31 lines  21-AUG-1995 05:25
--------------------------------------------------------------------------------
    Hi,

    I hope you guys and gals can help me - I'm _sure_ you can :')

    I am trying to put together a procedure in dcl - my problem is this:

    a fixed record length indexed file with a key of string type - 47 bytes
    long

    an 'indexed' read the file is ok - after open/read/write

    When I finally get the record I want (after read/lock), I try to delete
    the record with write/update. I thought that using a 'nul length' string
    (viz. $ write/update in_q_file "") would work, but it fails with
    'invalid record length'.

    My next try is to put a string of {record length} long spaces - but I
    think this will give me a record with that key (47 spaces) - and as
    there are no duplicates, the second time I try this... :'/

    So - how do I delete a record from an indexed sequential file. I have
    successfully written to before, I can indexed read from, I can update
    fields. Now to delete.

    Can you help?

    Thanks in Advance,

    Harry

    p.s. I bet Hein has the most elegant solution :')
================================================================================
Note 1776.1     Deleting records from RMS indexed file from DCL?          1 of 8
BBQ::WOODWARDC "...but words can break my heart"      3 lines  21-AUG-1995 05:27
--------------------------------------------------------------------------------
    p.s. I did dir/titl="dcl" (lots of replys) "delete" (a few less - but
    nothing I was after) and a couple of others that I could think of, but
    my fogged brain must have missed the obvious keyword :')
================================================================================
Note 1776.2     Deleting records from RMS indexed file from DCL?          2 of 8
STAR::DUNHAM "Jim Dunham - SCSI Project Leader"       7 lines  21-AUG-1995 07:20
                           -< Try HELP READ /DELETE >-
--------------------------------------------------------------------------------
READ

  /DELETE

     Deletes a record from an indexed file after it has been read. An
     indexed file must be opened with the /READ and /WRITE qualifiers
     in order to use the READ/DELETE command.
================================================================================
Note 1776.3     Deleting records from RMS indexed file from DCL?          3 of 8
BBQ::WOODWARDC "...but words can break my heart"      8 lines  21-AUG-1995 18:04
--------------------------------------------------------------------------------
    how embaressing :'}

    RTFM!

    Just goes to show what happens when you ask someone around here (SNO),
    and they say 'I think it was something really tricky'.

    I think I'll just go away now, ok? :'/
================================================================================
Note 1776.4     Deleting records from RMS indexed file from DCL?          4 of 8
GIDDAY::GILLINGS "a crucible of informative mistakes" 8 lines  23-AUG-1995 22:36
                                 -< watch it! >-
--------------------------------------------------------------------------------
  Harry,

>   Just goes to show what happens when you ask someone around here (SNO),
>    and they say 'I think it was something really tricky'.

    That depends, of course, on who you ask! 

						John Gillings, Sydney CSC (SNO)
================================================================================
Note 1776.5     Deleting records from RMS indexed file from DCL?          5 of 8
BBQ::WOODWARDC "...but words can break my heart"      5 lines  24-AUG-1995 19:27
--------------------------------------------------------------------------------
    I sit corrected.

    Beaten up in public, beaten up in here. And I was trying _not_ to annoy
    the nice people in the CSC :'} All I succeeded in doing was annoy the
    people in the CSC? {sigh}
================================================================================
Note 1776.6     Deleting records from RMS indexed file from DCL?          6 of 8
MANANA::AMAC::CLARK "Lee Clark, 381-0422"             2 lines   6-SEP-1995 17:32
                                -< RE: 1776.3 >-
--------------------------------------------------------------------------------
Though, to be fair, "READ" is probably not the first verb that would 
pop into mind if someone were interested in deleting a record.
================================================================================
Note 1776.7     Deleting records from RMS indexed file from DCL?          7 of 8
CUJO::SAMPSON                                         3 lines  21-OCT-1995 09:36
                        -< and he claims not to snarf! >-
--------------------------------------------------------------------------------
	BTW, nice USA snarf note, Harry (1776)! ;')

					Bob Sampson
================================================================================
Note 1776.8     Deleting records from RMS indexed file from DCL?          8 of 8
BBQ::WOODWARDC "...but words can break my heart"       1 line  22-OCT-1995 21:32
                                    -< :') >-
--------------------------------------------------------------------------------
    bah! humbug!

================================================================================
Note 1777.0        Where to get sources for ZIP, tools, etc.?            1 reply
BES009::KURATH                                        6 lines   4-SEP-1995 02:41
--------------------------------------------------------------------------------
Hi there

is there anyone who has the source to ZIP/UNZIP? A couple of years ago I copied
the ZIP/UNZIP exe over the net. Now I need ZIP/UNZIP for different OS and
processor types (AXP; OFS/1; VMS; AIX; DOS, ...).
Thanks in advance.
================================================================================
Note 1777.1        Where to get sources for ZIP, tools, etc.?             1 of 1
STAR::FENSTER "Yaacov Fenster, Process Improvement," 37 lines   5-SEP-1995 12:41
--------------------------------------------------------------------------------
    >                                            <<< Note 1777.0 by BES009::KURATH >>>
    >                                                   -< ZIP/UNZIP SOurces >-
    
    First of all, I don't think that this conference is the correct place
    to ask this question. This conference deals with
    un{supported,documented} stuff.
    But since you asked, here is a partial list from gatekeeper:
    220 gatekeeper.dec.com FTP server (Version 5.181 Fri Jun 16 12:01:35
    PDT 1995) ready.
    Connected to GATEKEEPER.DEC.COM.
    Name (GATEKEEPER.DEC.COM:fenster): anonymous
    331 Guest login ok, send ident as password.
    Password:
    230 Guest login ok, access restrictions apply.
    FTP> quote site exec index unzip
    200- /bin/ftp-exec/index unzip
         94.03.04 14:50     327k /pub/Alpha/apps/unzip
         93.10.14 00:00       6k /pub/BSD/FreeBSD/FreeBSD-current/src/gnu/usr.bin/gzip/unzip.c
         95.05.30 10:55       5k /pub/BSD/FreeBSD/FreeBSD-current/src/sys/i386/boot/kzipboot/unzip.c
         93.10.15 00:00       6k /pub/BSD/NetBSD/NetBSD-current/src/gnu/usr.bin/gzip/unzip.c
         95.02.23 03:18       1k /pub/BSD/NetBSD/packages/binaries/NetBSD-current/i386/unzip-5.12.README
         95.02.22 23:51      76k /pub/BSD/NetBSD/packages/binaries/NetBSD-current/i386/unzip-5.12.tar.gz
         95.02.23 03:19       1k /pub/BSD/NetBSD/packages/src/unzip-5.12.readme
         94.02.05 08:57      49k /pub/DEC/FORTRAN/unzip-vax.exe
         93.12.16 10:51      29k /pub/DEC/PCI/pkunzip.exe
         94.06.07 07:21      21k /pub/DEC/hub900/firmware/ndu/pkunzip.exe
         94.12.09 09:52      89k /pub/VMS/gunzip-axp.exe
         94.12.09 09:52     113k /pub/VMS/gunzip-vax.exe
         94.12.09 09:52     125k /pub/VMS/unzip-axp.exe
         94.12.09 09:52     145k /pub/VMS/unzip-vax.exe
         94.08.23 00:00      22k /pub/mail/ua/pine/old/PC-PINE-3.89/pkunzip.exe
         93.12.16 00:00      29k /pub/mail/ua/pine/pcpine/pkunzip.exe
         94.08.26 00:00      22k /pub/mail/ua/pine/pcpine/pkunzip.exe.bad
         94.08.23 15:23      22k /pub/mail/user-agents/pine/old/PC-PINE-3.89/pkunzip.exe
         93.12.16 00:00      29k /pub/mail/user-agents/pine/pcpine/pkunzip.exe
         94.08.26 20:54      22k /pub/mail/user-agents/pine/pcpine/pkunzip.exe.bad
    

================================================================================
Note 1778.0         Relocating code from P0 to S0 Space (NPP)          6 replies
STAR::FENSTER "Yaacov Fenster, Process Improvement, " 6 lines  10-SEP-1995 09:07
--------------------------------------------------------------------------------
    On Vax copying some code from my process space to S0 so that another
    process could call it was easy: Allocate some NP space, copy the code
    there, and that was about it. On AXP it seems to be a "bit" more
    complex. Any good examples (Especially in C) ?
    
    	Yaacov
================================================================================
Note 1778.1         Relocating code from P0 to S0 Space (NPP)             1 of 6
VIVIAN::RANCE "http://vivian.hhl.dec.com/rance/busi" 11 lines  10-SEP-1995 14:17
                                -< One example >-
--------------------------------------------------------------------------------

> Any good examples (Especially in C) ?
  
     This is something that I found incredibly difficult to do.
     I can't offer a good example, but I did post an example of 
     how to copy code from P0 space to P1 space and execute it 
     in 402.59.    I spent a lot of time trying to do this in C 
     before I gave up and wrote the only piece of MACRO64 that 
     I have ever written.

     	Stuart
================================================================================
Note 1778.2         Relocating code from P0 to S0 Space (NPP)             2 of 6
XDELTA::HOFFMAN "Steve; VMS Engineering"             11 lines  11-SEP-1995 10:05
                               -< Use A Driver? >-
--------------------------------------------------------------------------------

   Uh, what are you up to?

   I'd likely first look at loading an execlet, device driver or similar
   construct, and using that as the basis for interprocess operations.

   With the interprocess memory read and write primitives present under
   OpenVMS Alpha, one can sometimes entirely avoid copying code around.

   There are a number of entries under the "Interprocess AST" keyword.
   (Yaacov, I suspect you've already checked most/all of these notes.)
================================================================================
Note 1778.3         Relocating code from P0 to S0 Space (NPP)             3 of 6
STAR::KUEHNEL "Andy Khnel"                           9 lines  12-SEP-1995 11:46
--------------------------------------------------------------------------------
    Much of it depends on how many global data you need to carry along.  
    For the 64-bit project, we wrote code to put procedure descriptors and
    code into P2 space and got it executed as AST routines.
    
    I have to admit that our AST routine is extremely trivial because we
    wanted to avoid run-time fixups.  If you can live with barely any
    global references or RTL routines, you can check the test pack for some
    example code (e.g. x..._vmstst$:[vmstest.sys_64.lis]enqdeq64.lis, and
    address64asts.lis)
================================================================================
Note 1778.4         Relocating code from P0 to S0 Space (NPP)             4 of 6
RDGENG::WOOD_J "..mnoQPRstu.."                       53 lines  16-JUL-1996 02:56
              -< converting VAX Macro to DEC C for OpenVMS Alpha >-
--------------------------------------------------------------------------------
An ISV is trying to convert the following VAX Macro-32 to use DEC C on OpenVMS
Alpha. He has a few questions for which I'd be grateful of any suggestions
which I can pass on to him.

Thanks,
  John Wood
-------------

I wish to relocate a section of data and code to a new memory area (Non paged
pool) ie:

; Start of section to be relocated
base_address::					; Base of common code
queue:		.LONG		0,0		; Queue header for buffered data
server_pcb::	.BLKL		1		; Address of server PCB
abort_flag:	.LONG		0		; Flag to signal abort to server
;
; First routine.
;
first:
	...
	rsb
;
; Second routine
;
second:
	...
	rsb
length == . - base_address
rel_queue = queue - base_address
rel_server_pcb = server_pcb - base_address
rel_abort_flag = abort_flag - base_address
rel_first = first - base_address
rel_second = second - base_address
; End of section to be relocated

; Section which moves to pool
        bsbw    allocate_pool			; Allocate pool
        movw    r1,common_size			; Save size actually allocated
        movl    r2,common_address		; Save common code base address
        movc3   #length,base_address,(r2)	; Move code to non-paged pool
; Example of access
	movl	common_address,r12		; Get address of common code
	clrl	rel_abort_flag(12)		; Clear abort flag
	jsb	w^rel_first(r12)		; Do first function


I can group the code and data together using the linkage_psect and code_psect
pragmas, and the linkage option COLLECT=.  Although this will not give me a
value for length I can at least move the whole of the resultant linkage cluster
containing the code, linkage and data sections.  The problem lies in
identifying offsets to the data and function entry points, and how to implement
a call to them referenced from the common_address.
================================================================================
Note 1778.5*        Relocating code from P0 to S0 Space (NPP)             5 of 6
HNDYMN::MCCARTHY "A Quinn Martin Production"           1 line  16-JUL-1996 06:03
                           -< try DEC C conference >-
--------------------------------------------------------------------------------
I'd suggest trying the turris::decc conference.
================================================================================
Note 1778.6         Relocating code from P0 to S0 Space (NPP)             6 of 6
XDELTA::HOFFMAN "Steve, OpenVMS Engineering"         29 lines  16-JUL-1996 08:16
--------------------------------------------------------------------------------

   Hackers is not the appropriate spot for customer questions. 

   I'll assume the ISV has access to the source listings -- access to
   the listings is a necessity for this level of coding.

   The tough part of this question has very little to do with porting the
   Macro32 code to C (Macro32 is available on Alpha), it has to do with
   getting the code (properly) relocated -- or prying this particular
   requirement out of the application.  (There is no mention of what
   task(s) the application will perform...)

   The relocation of code under OpenVMS Alpha is somewhat more difficult
   than under OpenVMS VAX -- see 1786.*, 1778.* (P2 space), 1753.*, and
   other notes for similar (previous) discussions.  (I'd personnally try
   to avoid this particular approach.)

   Depending on what the actual purpose of the application is, existing
   routines such as EXE$READ_PROCESS, and EXE$WRITE_PROCESS might be of
   interest.  SCH*$QAST is another call used in this area, and OpenVMS
   Alpha P2 space might be of interest.

   For somewhat more "static" applications, I'd *strongly* recommend the
   use of an execlet or a pseudo device driver.  (The pseudo driver has
   the advantages of avoiding all of the relocation headaches, providing
   all manner of code and data storage areas, providing security checking,
   providing a user-mode interface, and being `relatively' portable between
   OpenVMS VAX and Alpha.)

