/* -------------------- rexx procedure -------------------- * * Name: FixbookP * * * * Function: ISPF Edit Macro to format a BookManager Read/MVS* * Print for Script/VS Postscript formatting and * * printing. * * * * To use: * * 1. setup BookManager Read/MVS to print using * * the GML starter set (option 2) * * 2. Print the section or sections you want * * 3. On the Script/VS panel put a / for browse * * 4. Put in something for listid (e.g. xx) * * 5. Change style to PSCRIPT (you may have to * * create this style) * * - fontlib to SCRIPT.R40.FONTPS * * - Device to PSA * * - Twopass to yes * * 6. Split your ISPF screen and on the other 1/2 * * get into ISPF 3.4 and find the .PRINT * * for the book you just printed * * 7. Edit it using this edit macro * * 8. save the updated .PRINT * * 9. Run the Script/VS * * 10. Do a binary download to your workstation * * and copy to your printer * * or issue this command * * LPR xx.LISTPS (PRINTER printer HOST host-name * * TYPE BINARY NOCC NOHEADER NOBURST * * where: * * host-name is the host name or dotted ip * * address of a network postscript printer or a * * server where the postscript printer is. * * printer is the name of the printer * * * * Syntax: FIXBOOKP * * * * Author: Lionel B. Dyck * * Kaiser Permanente Information Technology * * Walnut Creek, CA 94598 * * (925) 926-5332 * * Internet: lbdyck@gmail.com * * * * History: * * 04/28/00 - created * * * * ---------------------------------------------------------- */ Address ISREdit "Macro" /* find book info for title and footing */ "find ':H1' first" "(l1) = cursor" "(DATA) = LINE" l1 parse value data with x book number . "Delete" l1 "find ':H2' first" "(l1) = cursor" "(data) = LINE" l1 parse value data with x title "Delete" l1 /* remove copyright :h2 tag */ "find ':H2' first" "(l1) = cursor" "Delete" l1 /* remove the .oc stuff */ "find '.oc on' first" x_rc = rc "(l1) = cursor" "find '.oc off'" y_rc = rc "(l2) = cursor" if x_rc = 0 then if y_rc = 0 then "delete" l1 l2 /* enable page numbers */ "find '.pn' first" x_rc = rc "(l1) = cursor" "line" l1 "= '.pn on'" /* replace .pa with .toc for table of contents */ "find '.pa' first" x_rc = rc "(l1) = cursor" if x_rc = 0 then "delete" l1 /* replace .df mono with usable font definition */ "find '.df mono' first" x_rc = rc "(l1) = cursor" new_line = ".df mono type('courier' 8)" if x_rc = 0 then do "Line" l1 "=" '"'new_line'"' end /* replace .df xmpfont with usable font definition */ "find '.df xmpfont' first" x_rc = rc "(l1) = cursor" new_line = ".df xmpfont type('courier' 8)" if x_rc = 0 then "Line" l1 "=" '"'new_line'"' /* find gdoc and add frontm and toc and body */ "find ':gdoc' first" x_rc = rc "(l1) = cursor" if x_rc = 0 then do "line_after" l1 "= ':frontm.'" i = 1 "line_after" l1+i "= ':titlep.'" i = i + 1 "line_after" l1+i "= ':title."title"'" i = i + 1 "line_after" l1+i "= ':docnum."number"'" i = i + 1 "line_after" l1+i "= ':etitlep.'" i = i + 1 "line_after" l1+i "= ':toc.'" i = i + 1 "line_after" l1+i "= ':body.'" i = i + 1 "line_after" l1+i "= '.rf on'" i = i + 1 "line_after" l1+i "= '.sp'" "Scan Off" i = i + 1 "line_after" l1+i "= '.ce" book " - &&$PS - "number"'" i = i + 1 "line_after" l1+i "= '.rf off'" end