[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference ilbbak::ibi_focus

Title:FOCUS, from INFORMATION BUILDERS
Moderator:ZAYIUS::BROUILLETTE
Created:Thu Feb 19 1987
Last Modified:Mon May 05 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:615
Total number of notes:1779

163.0. "vms-escape-sequences in a report" by RTOEU::ASCHWARZ () Wed Dec 14 1988 02:40

    I want to highlight a field in a report.
    I tried this with the "VMS-Escape-Sequences",
    but without any success.
    
    
    Here is an example of my report:
    
    TABLE FILE filename
    PRINT
    .
    .
    .
    ON fieldname SUBFOOT
    "<ESC>[1m <fieldname"
    END
    
    
    The result was like this:
    
    [1m    1234.56
    
    
    I only got the second part of the Escape-Sequence,
    but the VMS-Escape-Sequence was not executed.
    Does anybody know, how to solve this problem?
    
    Many thanks in advance
    
    Annette
           
T.RTitleUserPersonal
Name
DateLines
163.1render unto vms that which is vms...MEMV03::COPPERSMITHIt&#039;s an allegory...Wed Dec 14 1988 13:5697
    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
163.2More information...MEMV03::COPPERSMITHIt&#039;s an allegory...Fri Dec 16 1988 11:1926
    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