%OP%BON %OP%PL64 %OP%DP2 %OP%TM1 %OP%BM1 %OP%LM5 %OP%FO//p. @p@@// %CO:A,12,70% Analyse - Stripper - Cut and Paste - PD Linker These four programmes are related, believe it or not. Cut and Paste and PD Linker are closely related as are Cut and Paste. (NOTE A in white on black is shown as %H2%A%H2% just like %H8% being shown as %H2%8%H2%) Z203B ANALYSE lets you find the contents of a file in a semi dumped version. Normal printable characters are left alone. Control characters (below ASCII 32) have 64 added and ^put before it, hence CHR$(1) becomes ^A. Alternative character set (above ASCII 127) have an %H2%A%H2% put in front, 128 deleted and are then treated as normal. Thus CHR$(129) appears as %H2%A%H2%^A . I wrote the programme to help in my investigations into the contents of "captured" PipeDream printout and in the investigation of the contents of WORDSTAR files. Sometime, maybe never, I am going to write a file format converter working in the Z88! I present it here for general interest. It is not polished as it asks for the input file, the output file shows the number of characters and its progress through them. Z203C STRIPPER is the sister programme to Analyse. Having found the file format of the "captured" file I could write a programme to rub out all the %H2%E%H2%1S and other things that you do not want when you transfer the results into another file or programme. The rubbing out is done by overwriting the unwanted characters with CHR$(0) thus it modifies the original file. In use you are prompted for input file and are then informed of size and progress. To capture a file you need a little CLI which runs something like this #I|CARD#T~E .=:RAM.1/PD.SPL |PO~E You would go to filer #F and |EX the file (mine is called spool). This makes a file called :RAM.1/PD.SPL (rename it what you like) which contains everything that would have been sent to the Printer Driver. If you block mark a piece then only that (plus header and footer) will be in the file. Stripper can then be used to clean the file to make it suitable for inclusion in other documents. Z203D CUT AND PASTE This is my first attempt at PD Linker! and in some circumstances may be the better version. This was written because P.Hodson (0713) asked me at the October 1992 User Day if I could write a programme to transfer data from one PipeDream File to another (End of year results Carried forward). All other versions of PipeDream (including View Professional on the BBC) have linking files to do this job professionally. As in Stripper and spool I already had half the tools all that was necessary is to automate it. Thus Cut and Paste. %P0% Running Cut and Paste Chain the programme in and read the introduction. Either now or just before load the source file into a PipeDream and then mark the block you want to copy. (You can have any number of PipeDreams running if you have the room). When this is done, or if it is done already press a key. Select the RAM to be used for temporary files. Files E.CLI and EE.CLI are created and deleted during the running of the programme. RAM.- should be perfectly O.K. as long as you check it for the files if the Programme fails to complete the run. You are told that it is "Compiling the Cut File" and then "EXECUTING FILE NOW". Wait whilst a E.CLI is run and EE.CLI is created. The programme returns to BASIC and unless it could not create EE.CLI you are informed of the file size and are asked if you want to Continue or Restart. Select C or R. If it is very big or small then you may want to restart and check on the block marking. Next Question is whether you want the Columns kept, or all in Column A, Reply C or A. With the C option the %H2%E%H2%1S are converted to TAB with A they are deleted. The file is processed and you are informed of the progress. Multiple blank lines are compressed to single blank lines, hence a 66 line page with a 4 line deep marked block will give about 8 lines processed if it has header and footer, 6 if it does not. Next Question, Include in an existing file or New PipeDream E/N select E or N. With E you are prompted to go into the appropriate destination file and position the cursor before returning to the programme and pressing a key. At that point the programme goes to the PipeDream and loads the file at cursor as plain text and returns to BASIC. With N the programme creates a new PipeDream and loads the file as plain text. If you want to save the file (after editing) for inclusion into another file, save it as plain text and then Insert at slot Yes Load as plain text Yes. If you used Column option C you are reminded that you should use |ENT to convert any text into numbers. The format of the numbers is controlled by the option settings in the source file. Note if you are not pasting into col A PipeDream drops the second and subsequent lines into A. This means that you will have to use |BM to pull the lines across. Diagrammatic example below. (a) Existing File (cursor on %H2%%H3%C%H2%%H3%) (b)include file ABCDEF abc AB%H2%%H3%C%H3%%H2%DEF abc ABCDEF abc ABCDEF %P0% (c) Result of Insert at slot (d) Mark the misplaced c's and |BM and Load plain text to slot below correct c then do the same for a and b together ABCDEF ABCDEF ABabcF ABabcF abcDEF ABabcF abcDEF ABabcF ABCDE CDE ABC CDE C CDE Not easy but not my fault. Also pasted slots will not be referenced by Expressions unless you have fixed ranges. This programme does the job but there is another way if it suits. Z203E PD LINKER Whereas Cut and Paste is ad hoc PD Linker is run using pre-prepared LINK files. These put a responsibility on the user to get them right. The PipeDream commands |CGS |CSP |CRP along with TAB and cursor down are used to select the relavant slots in each file. As these do not create either Columns or Rows in either file if either do not exist then things will go wrong. Your existing files are not modified and the programme creates the new copy of PipeDream it requires. Only upon |FS the resulting file is any linked data stored. The programme creates and deletes two files :RAM.1/E.CLI and :RAM.1/EE.CLI . If there is insufficient room the programme may fail, but for most users RAM.1 is the largest RAM area. The link file is a Plain text file of at least 7 lines and would look something like this (but NO line numbers! See Demo Files I and J). :RAM.1/ACCOUNTS/OCT.PD A56 8 2 :RAM.1/ACCOUNTS/NOV.PD A3 3 X Lines 1 and 4 are the filenames of the source and destination files respectively. Maximum of 40 characters defined by cvSdim on line 60 Line 2 is the top left of the range you want to link. Line 3 is the number of columns and rows in the block to be linked. 8 columns starting from A gives H, 2 rows starting from 15 gives 16. Line 5 is the top right of the destination. Slots A3 to H4 will be referenced (H4 the projected slot) so column H and line 5 must exist already. Line 6 is the decimal places of the linked data use 0to9 or F to select the precision of linking. Use of space will use the displayed precision in the stored file. Other characters behave the same as space but also cause a beep. Your original file is NOT altered. Line 7 is the Transpose option. If T or t is put here then the range A56 H57 would create A3 B10 instead of the projected A3 H4. Thus Lines of Data are Transposed to Columns of Data and vice versa. Use X to ensure this line exists in the saved file if no transpose is wanted. (actually any character except T or t will do! See Demo Files I and J) Running PD Linker Chain the programme in. You are asked for LINK FILENAME ? reply with the appropriate name. You are told (in rapid succession) Files found - Compiling Data Capture File EXECUTING FILE NOW Alternatively you are told that it could not find one of the Files you wish to link or the file name is Bad. In either case you need to edit the LINK file before continuing. The Z88 goes into about 20 seconds of menus popping around before returning to the Programme. You are told (in rapid succession) Beginning Analysis of Data Error after this point indicates the source range did not exist. Compiling Data Transfer File COMMENCING TRANSFER The Z88 goes into about 30 seconds of menus popping around before returning to the Programme. You are told. LINKING COMPLETE Press a key to continue Takes you to the start. The process takes from 1 minute for 9 slots up to 1.5 minutes for 15 slots depending upon the contents. Via Index you can now examine the results of your labours. You will notice that text has been put in as "This is text" in expression slots. As a result some may not be visible. To correct this |ENT the slot and delete the " 's. This is a result of not being able to test if the destination PipeDream is in T or N mode and not wanting to change the setting to T without being able to set it back to the correct value. If any bugs are found contact me by post and I will see what I can do. M.Foweraker 21 Heol-y-Ddol Caerphilly Mid Glamorgan CF8 3JF %P0% Files Supplied as Z203A Z203B etc. Z203A This document PD Text Z203B Analyse BASIC Z203C Stripper BASIC Z203D Cut and Paste BASIC Z203E PD Linker BASIC Z203F Demo Source File RENAME :RAM.1/Source PD Sheet Z203G Demo Destination File RENAME :RAM.1/DESTnorm PD Sheet Z203H Demo Destination File RENAME :RAM.1/DESTtran PD Sheet Z203I Demo Link for F to G PossRENAME :RAM.1/norm.LNK PD Plain Txt Z203J Demo Link for F to H PossRENAME :RAM.1/tran.LNK PD Plain Txt %CO:B,12,60% NOTE Numbers that are too big (or small) to be displayed accurately will be transferred in the "visible" form thus 4.778e20 in a narrow column may be transferred as 4.778 or 4.778e or 4.778e2, but they would also show these values if printed. %CO:C,12,48%%CO:D,12,36% 1 2 3 4 5 6 7 %CO:E,12,24%%CO:F,12,12%