At 15:43 -0500 on 10/13/2008, John McKown wrote about VBM to VBA?:
Is there a simple way to convert a DASD dataset which is RECFM=VBM (or FBM)
to VBA (or FBA)? We are converting a lot of reports to be ftp'ed to a
Windows platform. The program on the Windows platform does not understand
machine control and needs the ftp to convert from "ANSI control" to the
appropriate Windows control sequences the way that it does for VBA when the
ASAPRINT option is used. In particular, the program needs a "control L"
(form feed) to delimit the pages of the report.
There are two ways to do the conversion - The Simple Way and the Complex way.
As others have noted M prints the line and then moves the paper. A
moves the paper and then prints the line.
The Simple way is to take the M code and convert it to the A code for
Print a Line with No Paper Movement. You the emit a Paper advance
with a Blank Line (if VBA this is a 6 byte line) or with Advance with
no Print. I forget if there are separate codes for Print/No Print - I
DO know that there is a Code for Print with No Paper Advance since it
was used for BOLDING and Underlining. With FBA you will end up
doubling the size of the file with this method since each line is now
two lines (Print and Movement) to get the same result as the M code.
The Complex Method is to keep track of where you are on the Page and
append the correct A Code to the next line based on the M code of the
prior line. This produces a smaller file (with FBA) since you end up
with the same number of lines.
As to end of page, I will assume that there are NO SKIP-TO-CHANNELs
aside from SKIP-TO-CHANNEL-1s. This means that so long as the program
that created the original Printout was counting lines and doing the
New Page Code injection, you are OK. If, OTOH, the file STARTS with a
New Page and then just has lines, it is replying on the printer to
automatically do the New Page at the end of each page (ie: Detection
of Channel 12) and you will need to do the same (ie: Count lines and
New Page when the count gets to 60).
I may have missed something but others here can build on my methodology.
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html