| Post process the table with a 3gl routine that reads in the report,
alters the record(s) in question with escape sequences and then
writes the report back out:
PROGRAM SMZERPOP
!******************************************************************
!This program removes decimal points from population lines.
!Curtis Coppersmith November, 1988
!******************************************************************
map (liner) &
string poplin$ = 129
call lib$sys_trnlog('SMIR$PBUR',,POP$) !Get Input File Name
WHEN ERROR USE NO_GO
OPEN POP$ FOR INPUT AS #8, ACCESS READ, &
map liner, ORGANIZATION SEQUENTIAL VARIABLE, &
recordtype fortran
OPEN POP$ FOR OUTPUT AS #10, ACCESS WRITE, &
map liner, ORGANIZATION SEQUENTIAL variable, &
recordtype fortran
END WHEN
IF ERROR$ = "T" THEN
print "open error=",ERR,ERT$(ERR)
GOTO EXIT_ROUTINE
END IF
poplin$=space$(129)
GET_popular:
WHEN ERROR USE NO_GO
GET #8
END WHEN
IF ERROR$ = "T" THEN
GOTO EXIT_ROUTINE
END IF
found%=instr(1%,poplin$,"POPULATION")
gosub zero_population if found%<>0%
poplin$=edit$(poplin$,4%)
GOSUB WRITER
GO TO GET_popular
zero_population:
!******************************************************************
! Subroutine to remove decimal points from output record.
!******************************************************************
find_point:
found_point%=instr(1%,poplin$,".")
if found_point% <> 0% then
mid$(poplin$,found_point%,found_point%+1%) = " "
go to find_point
end if
RETURN
WRITER:
!******************************************************************
! Subroutine to write output record.
!******************************************************************
PUT #10
RETURN
HANDLER NO_GO
!*******************************************************************
! Come here if read fails. *
!*******************************************************************
ERROR$ = "T"
CONTINUE
END HANDLER
EXIT_ROUTINE:
END
Curtis Coppersmith
MEMCL1::COPPERSMITH
223-2246
|
| The last reply does not contain enough information, so here is an
amplification:
The program is written in VAX BASIC. It is my assumption that you are
using a HOLD file, then sending that file to a printer. In that case, the only
way to get escape sequences into the report is to post-process the report with
a program that will insert escape sequences where you want them. The program
I sent you is a shell program that already reads in a FOCUS report and then
writes the file back out with modifications. The logical that is being
translated would be set in dialogue manager to the job table
(VMS DEFINE/JOB) to convey the name of the file that is to be processed
to the BASIC program. You could modify this program to place escape
sequences in the body of your report.
In the case where you are printing directly to a printer ONLINE,
then place the escape sequences in a command procedure, and execute this
procedure from dialogue manager before the table request.
There is not a way to do this in the middle of a table request,
and FOCUS of itself provides no way to send escape sequences to a printer,
or to place them in the text of a report.
In general, much effort has to be devoted to integrate FOCUS
applications with the VMS environment.
Curtis Coppersmith
|