home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 11 Util
/
11-Util.zip
/
DCFVBA.ZIP
/
DCFVBA.DOC
< prev
next >
Wrap
Text File
|
1990-05-07
|
7KB
|
165 lines
DCFVBA
DCFVBA is a language translater that converts HPPCL datastreams
to IBM Document Composition Facility (Script/VS). It was
written so documentation for our mainframe PROFS system could
be done with a PC word processor instead of using the
cumbersome DCF commands in XEDIT on the host.
The basic flow of events are:
o Prepare document on the PC using your word processor of
choice.
o Print to file with a printer driver that generates HP PCL.
o Run the DCFVBA program to convert the PCL stream to DCF
o Upload the DCF file to the host.
COMMAND SYNTAX
The syntax of the command follows:
DCFVBA pclfile vbafile
where "pclfile" is the name of the file that contains the PCL
file that was outputted from the word processor and "vbafile"
is the file that will contain the DCF commands and will be
uploaded to the host.
GENERAL NOTES
DCFVBA is a family application. It will run under DOS and
OS/2. It has been tested under DOS 4.01 and OS/2 1.2.
Due to the restrictions of DCF, certain conventions need to be
followed when creating the document on the PC.
o This program supports bold face, underlining and
italics. Italics are displayed by underlining those
characters.
o This program will support 12 point Courier typeface
only. If there are other typefaces are used in the
document, a warning message will be displayed and the
formatting will be ignored. If the typeface that was
the attempted in the document is proportional, you may
have problems with lines being too long.
o This program does not use the ".fo off" DCF command.
Instead, it exploits the fact that DCF will not format a
line that starts with a blank. You must assure that you
specify a word processor margin that will output at
least a one character margin.
NOTES FOR PROFS USERS
This code was written as a preprocesssor to PROFS. Since it
generates native DCF commands, PROFS is not prerequisite. The
output should be able to be processed by the native SCRIPT
processor under MVS or VM. This does not output any GML tags.
If you do use the output under PROFS, be aware of the following
points:
o This file does not contain any of the document format
commands. Therefore, you will want to upload the output
as CMS flat file with an extension of SCRIPT. Then
create a new PROFS document, get out of input mode and
issue the GET command to load in the SCRIPT document
that was uploaded from the PC.
o Most PROFS document formats will put margins in the
document. Most PC word processors will also put a
margin in the document. To keep from getting a double
margin, create the PC file with a one character margin.
NOTES FOR MS WORD USERS
Microsoft Word is my word processor of choice. This code has
been tested using only the output of Word. Since I didn't
exploit any functions of Word when writing this program, it
should be independant of the word processor used. The
following are notes and tips that I used when creating the
document using Word.
o I am a heavy user of style sheets under Word. I
exploited this in a way that might be helpful to other
Word users. I have a NORMAL.STY that contains all the
styles using TmsRmn and Helvetica typefaces. I cloned
my NORMAL.STY into a PROFS.STY. The PROFS.STY uses the
same variants as NORMAL.STY, but the characters are
formatted as Courier and the Division margins are set to
eliminate the left margin. I can therefore create a
document using multiple fonts. When I want to create
the PROFS version of the document, I attach the PROFS
style sheet. This automatically takes care of all
formatting.
o As noted in the section for PROFS users, you will need
to take steps to assure that you don't get double
margins. To get a one character margin, format your
margins for a 0.35" left margin in Word 5.0. In Word
5.0, the HP printer driver "knows" that there is a 0.25"
physical area on which the printer won't print. Word
will subtract that quarter inch from the margin that you
specify. The other 0.1" inch is the width of a single
12 point Courier character that is required to keep DCF
from formatting the paragraph (see notes above). In
versions of Word prior to 5.0, I don't believe that Word
compensated for that 0.25" dead zone on the page.
CODE DISTRIBUTION
This code is public domain and can be distributed freely as
long as no free is charged for its distribution. The code has
been designed as a recursive descent parser. It can be used as
a general shell for translating HPPCL into anything else. In
fact this code is a clone of a previous program that converted
PCL to variable blocked files with ANSI carriage control in
column 1. That program is available upon request from the
author, also free of charge.
I can be contacted as follows:
Gary Murphy
1022 N. Cooper
Olathe, KS 66061
Prodigy VWSD07A (preferred)
CompuServe [73457,365]
Let me know if there are any enhancements you would like to
see. I would also like to know if there are any enhancements
that you have made.