1. Run the following REXX on the mainframe to format the LISTING file.
2. Download output to PC
3. Use the template for the right font and margins:
Open Template ... Insert File ... Print or PDF or ...
4. See Comments in REXX for complete info.
/* PRINT2PC REXX */
/* Use ASA Carriage Control Characters to generate extra print lines
so that the output file after downloading will have the same spacing
as it would if printed with a 2-up portrait pagedef.
Of course the carriage control character is removed.
The suppress spacing character + is treated as a single space. This
should only be an issue for SCRIPT files formatted for 1403. If
your application uses overstrikes to add information, you will have
to decide how to merge the print lines.
Skip to channel is treated as single space.
The downloaded file can then be formatted with your favorite word
processor and then printed.
I set up a template in StarOffice with margins that accepted
124 lines per 8.5" x 11" page using 6 pt. Lucida Console.
Top and Bottom Margins 0.3" -- Just within printable area limits.
Left + Right Margins = 1.4" -- How you apportion is up to you.
Maximum lines per listing page = 60 INCLUDING OVERSTRIKES
4 lines added between pages
yielding 124 lines per word processor page
Note that FF and LF are not generated
George Haeh -- June 20, 2009 */
/********* TRACE ?A ********/
arg infile outfile
"FREE F(IN OUT)"
"ALLOC F(IN) DA("infile") SHR RECFM(A)"
if rc \= 0 then signal oldfail
"ALLOC F(OUT) da("outfile") NEW RECFM(V,B) SP(1 1) CYL LRE(132)"
if rc \= 0 then signal newfail
"EXECIO * DISKR IN (FINIS STEM IN."
if in.0
pg = 1 /* Initialise */
line = 1
out0 = 1
out.1 = substr(in.1,2) /* Ignore CC 1st line */
do j = 2 to in.0
cc = substr(in.j,1,1) /* Get Carriage Control */
select
when cc = ' ' then pad = 0
when cc = '0' then pad = 1
when cc = '-' then pad = 2
when cc = '1' then do
if pg // 2 = 1 /* ? Odd page number ? */
then pad = 64 - line /* Provide 4 lines between pages */
else pad = 60 - line /* Use up remaining lines on page */
pg = pg + 1
line = 0 - pad /* Make line = 1 for 1st line on */
end
otherwise pad = 0
end /* next page */
do pad /* write pad lines */
line = line + 1
out0 = out0 + 1
out.out0 = ' '
end
line = line + 1
out0 = out0 + 1
out.out0 = substr(in.j,2) /* Copy print line */
end
out.0 = out0
"EXECIO * DISKW OUT (FINIS STEM OUT."
say pg "Pages" out0 "lines written from" infile "to" outfile
"FREE F(IN OUT)"
exit
oldfail: say "Failed to allocate input DSN =" infile
exit 8
newfail: say "Failed to allocate output DSN =" outfile
exit 8
badold: say "Zero records read from input DSN =" infile
"DEL" outfile /* Get rid of outputfile so it can be allocated new */
exit 8
מחבר |
ghaeh |
Application |
Writer |
סיווג |
Business: Miscellaneous |
License |
|
תגיות |
business, Mainframe, Listing, 2-up |
דירוג |
(3 votes)
|
Print2PC | |
סטטיסטיקות |
Week: 0 - חודש: 0 - שנה: 0 - Timeline |
Format Mainframe 2-up Listing