Open System Services Porting Guide (G06.29+, H06.06+, J06.03+)
rm /home/stu01/report
ed /home/stu01/report
r /G/DATA01/REPORTS/JAN94
w
q
In the second command line, /home/stu01/report is automatically created when starting
the ed utility. The r command reads the Guardian file $DATA01.REPORTS.JAN94 into the
ed workspace. When the w command is executed, the contents of the workspace are written
to the /home/stu01/report file. The /home/stu01/report file is then in standard. The
q command terminates ed.
If the report file does not exist, you do not need to use the rm utility (the first command line in
this example).
• You can edit a type 180 file in the Guardian environment directly from the OSS environment,
but only with type 180 files:
gtacl -p EDITTOC \$DATA01.REPORTS.JAN94, \$DATA01.REPORTS.TEMP
vi /G/DATA01/REPORTS/TEMP
Moving Files From the OSS Environment to the Guardian Environment
An ASCII text file in OSS format can be created in the Guardian environment by almost any OSS
utility: cp, vi, ed, cat, grep, or awk. Many Guardian utilities can process the OSS file format
correctly, giving it a type of 180. (Some Guardian utilities or programs can require the EDIT-file
format: type 101.)
The following example of the cp utility creates a file in OSS format:
cp /home/stu01/report /G/data01/reports/temp2
After moving an OSS format file to the Guardian environment, converting a file to EDIT format is
done with the Guardian utility CTOEDIT, as follows:
CTOEDIT fromfile, tofile
Printing Files From TACL
ASCII text files or EDIT-format files are printed by copying the file to a spool location. A spool
location normally is named $S, followed by a printer name: for example, $S.#LASER.
The command to print the file $DATA01.REPORTS.JAN94 to the spool location $S.#LASER is as
follows:
FUP COPY $DATA01.REPORTS.JAN94, $S.#LASER
OSS Pathname and Guardian Filename Conversions
Two utilities are available for you to translate OSS pathnames to Guardian filenames and Guardian
filenames to OSS pathnames. The gname utility converts OSS pathnames into Guardian filenames;
the pname utility converts Guardian filenames into OSS pathnames.
The following gname command:
gname /bin/sh
results in the following output:
gname: /bin/sh ---> \KT22.$XPG.ZYQ00000.Z00005LS
The following pname command:
pname \$XPG.ZYQ00000.Z00005LS
results in the following output:
pname: $XPG.ZYQ00000.Z00005LS ---> /bin/sh
Use the ls utility in the OSS environment to list filenames in your OSS directories; use the FILES
command in the Guardian environment to list filenames in your Guardian subvolumes.
64 Interoperating Between User Environments