.PAGE SIZE 58,68 .RIGHT MARGIN 68 .RIGHT;PCITR .RIGHT;X530#to#VAX .B 3.C;Software Documentation Memo _# 41 .B.C;^&Reading Xerox-530 Tapes on the VAX-11/780 with PCITR\& .B.C;F_. J_. Nagy .FLAGS SUBSTITUTE .B.C;June#10,#1981 .NO FLAGS SUBSTITUTE .B .BR.P;PCITR was originally written to read the tape of RFP benchmarks generated on the CYBER's. PCITR stands for PDP-11 Card Image Tape Reader. The initial implementation of PCITR ran on a DEC PDP-11 under RSX-11M. This same version now runs on the VAX in compatability mode and can read tapes generated on the Xerox-530's. Other documentation on PCITR is available from the Fermilab Computer Center as PN0141. .BR.P;The X530 tapes must be 9-track, ASCII card image tapes. No binary or EBCDIC tapes are handled by PCITR. A native VAX program to handle bi-directional tape processing and EBCDIC and binary tapes is in the planning stages. PCITR can handle unblocked (one record per physical tape record) or blocked tapes. The PCITR default is to read 80-byte ASCII card images. .BR.P;PCITR allows the user to choose which physical tape file is to be read. The maximum physical tape block size can be changed as can the record size (to allow for blocked tapes). The program prompts for the name of the output file which can be a VMS disk file or any standard VMS file specification. Some control of the format of the records in the disk file is possible. .BR.P;Before running PCITR, a tape drive must be allocated and the tape mounted on the drive. A logical name must be assigned to the tape unit so PCITR can access it. A drive can be allocated to a logged on user and the logical name assigned by the VMS command_: .B.I+15;ALLOCATE MT_: TP0_: .B;VMS will respond with the name of a tape drive (_MTA0_: or _MTA1_:) that has been allocated to the process. At the same time, the logical name TP0_: is assigned to the device to allow PCITR to access it. The tape is then physically mounted on the unit; followed by a software mount operation using the VMS command_: .B.I+15;MOUNT/FOREIGN TP0_: .B;The /FOREIGN qualifier informs VMS that the tape is not a standard VMS file-structured tape, but has a foreign structure. .BR.P;PCITR may now be run by typing the command_: .B.I+15;RUN SYS$SYSTEM_:PCITR .B;The program will rewind the magnetic tape and prompt the user with a list of options_: .B.I+15;(READ, REW, EXIT, POS, EXIT)? .B;If the logical name TP0_: has not been set up, PCITR will immediately abort with an %RSX-E-NOSUCHDEV error. The reply to this prompt (one of the option words shown in the prompt) selects the operation PCITR is to perform. All replies to PCITR prompts must be in upper case. PCITR will not recognize a lower case reply. .B 2;REW .BR.P;This option will direct PCITR to rewind the magnetic tape. .B 2;EXIT .BR.P;This option will terminate PCITR. .B 2;POS .BR.P;This option is used to re-position the magnetic tape to the desired input file. When this option is selected, a further prompt is made_: .B.I+15;POSITION TO FILE= .B;The reply should be the number of the physical tape file to which the tape should be positioned. These are absolute file numbers, starting with 1 for the first file on the tape. If the tape is already positioned beyond the desired file, the tape is rewound and positioned forward to the desired file. .NOTE Logical end-of-tape Multiple end of file marks indicate the end of the information on the tape. If two consecutive EOF's are encountered, a message is printed and the tape is rewound. .END NOTE .PAGE SET .BR.P;This option can be used to change the record length and maximum block size which will be read from the tape. The initial value assumed for both quantities is 80 bytes. The maximum allowed physical block size is 4000 bytes. The tape may contain physical records up to the maximum block size specified. The new values for the quantities are solicited by the prompts_: .B.I+15;RECORD LENGTH (BYTES)= .B.I+15;MAXIMUM BLOCK LENGTH (BYTES)= .B2;READ .BR.P;This option will read the next physical tape file from the magnetic tape and create a VMS output file as specified. The VMS output file is gotten from the reply to the prompt_: .B.I+15;OUTPUT? .B;The reply should be a VMS device and file specifier for the output file. The program then prompts_: .B.I+15;FORTRAN SOURCE (Y/N)? .B;If the answer to the question is Y (yes), the magnetic tape is read and the input records are compressed as described below. A reply of N (no) produces a further prompt_: .B.I+15;TRUNCATE LINES (Y/N)? .B;An answer of Yes to this question will cause the magnetic tape file to be read and the trailing blanks to be truncated from the records before they are written to the output. This is useful for conserving disk space. .BR.P;A reply of No to the truncation question will produce a final prompt before the tape is read anyway_: .B.I+15;FORTRAN CARRIAGE CONTROL (Y/N)? .B;Either answer causes the input to be directly copied to the output with no truncation of the input records. However, a reply of Yes will cause the record attributes bit to be set that says the first byte of the record is a FORTRAN carriage control character. A No reply sets the CR (carriage control) bit which is also set if Yes is answered to either of the two previous prompts. The standard VMS source file format is variable length records with the CR bit set. The CR bit and the FORTRAN bit only have effect if the file is copied to a line printer or a terminal. In such a case, the device carriage control is given by the first byte (if the FORTRAN bit is set), or by preceeding the record by a line feed and following it with a carriage return (CR bit set). .TEST PAGE 4 .B2;FORTRAN SOURCE .BR.P;If the Yes answer was given to the FORTRAN source question, the input records are compressed to save disk space. The compression is done in the following manner. .LIST0 .B.LE;Columns 73-80 are deleted from the input records, .B.LE;All trailing blanks are truncated from the input records, .B.LE;Multiple spaces in a comment between the C in column 1 and the first non-blank character are converted to tabs and spaces, .B.LE;Labels are left-justified to start in column 1, .B.LE;The spaces before a statement or between a label and a statement are replaced by tabs, and .B.LE;The spaces before column 6 in a continuation line are replaced by a tab, and the continuation character is changed to be a single digit (1-9). .END LIST .B 2.P;Remember that the tape read by PCITR must contain blocked or unblocked ASCII records (usually card images). A normal Xerox EBCDIC tape will result in garbage on the output file. PCITR can also read ASCII tapes written by the CYBER. Refer to the Computer Center note PN0141 for more details. .BR.P;An ASCII card image tape can be written on the Xerox using the UTILITY COPY. The input is copied from operational label UI to a 9-track tape which must be assigned to label UO. The command top copy one file to the tape, converting from EBCDIC to ASCII and writing 80-byte records is: .B.I+15;!COPY F,1,,80,ETA .B 5 ^&Distribution\& .B Normal .BR;Operations Group .BR;J_. Elseth .BR;D_. Edwards .B4 USR$DISK:[NAGY]PCITR.MEM