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

Conference bulova::decw_jan-89_to_nov-90

Title:DECWINDOWS 26-JAN-89 to 29-NOV-90
Notice:See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit
Moderator:STAR::VATNE
Created:Mon Oct 30 1989
Last Modified:Mon Dec 31 1990
Last Successful Update:Fri Jun 06 1997
Number of topics:3726
Total number of notes:19516

2365.0. "ASCII TEXT VIEWER???" by BACKUP::SYSTEM () Tue Feb 27 1990 14:27

    Does anybody out there have an example of an ASCII TEXT VIEWER.
    I need a simple widget that lets a user view ascii text files and
    perform basic viewing operations such as pageup pagedown..etc
    I searched on VIEW but could not find anything.  Thank you. 
T.RTitleUserPersonal
Name
DateLines
2365.1Try the CDA viewerSTAR::VATNEPeter Vatne, VMS DevelopmentTue Feb 27 1990 15:087
I was able to use the CDA Viewer to view a simple text file.
Try it stand-alone with:

	$ VIEW FOO.BAR/INTERFACE=DECWINDOWS/FORMAT=TEXT

The CDA viewer is also callable, so you should be able to
incorporate it easily into your application.
2365.2If you've got VAXT.EXE, you could use thisSTAR::BECKPaul BeckTue Feb 27 1990 18:3950
$! I use the following (VUE$VIEW.COM) with FileView. It presumes you have
$! access to VAXT.EXE, which is a version of the Unix utility T compiled for
$! VMS. I'm not sure where I got it, I suspect it may be in the toolshed.
$!
$ 	SET TERM/PAGE=40
$ on warning then goto type_error
$ type = ""
$!
$ vue$get_command vue$c_type_verb
$ vue$read vue$command
$ if "''vue$command'" .eqs. "" then goto task_exit
$!
$ vue$get_selection_count                           ! ask vue how many
$ vue$read count                                    ! read it
$ if count .eq. 0 then goto task_exit
$ vue$popup_focus
$ vue$get_next_selection                            ! ask for next select
$ vue$read selection                                ! read it
$!
$type_loop:
$!
$ title_file = "''f$parse(selection,,,"NAME")'''f$parse(selection,,,"TYPE")'"
$ vue$set_task_label "Viewing ''title_file'"         ! work in progress box
$!
$ vue$begin_bold
$ write sys$output "<<<<< ",selection," >>>>>"
$ vue$end_bold
$!
$! 'vue$command 'selection                           !  Type!
$ 	tt_num_lines  = F$GETDVI("TT","TT_PAGE")
$	W = ""
$ 	T := $VAXT -'tt_num_lines'
$	if f$parse(selection,,,"TYPE") .eqs. ".B32" then W = "+132"
$	if f$parse(selection,,,"TYPE") .eqs. ".LIS" then W = "+132"
$	SET NOON
$	if W .nes. "" then set terminal /width=132
$ 	DEFINE/USER SYS$INPUT SYS$COMMAND
$ 	T 'selection' 'w'
$ vue$get_next_selection                            ! ask vue for next
$ vue$read selection                                ! read it
$ if f$length(selection) .ne. 0 then goto type_loop
$!
$task_exit:
$!
$ exit
$!
$type_error:
$!
$ vue$set_error_status
$ exit
2365.3GOSOX::RYANDECwindows MailWed Feb 28 1990 07:427
	If you want an existing application to do this, you can just use
	Notepad. If you want to incorporate this into an application, the
	simplest thing to do is to use the simple text widget. Also,
	Steve Klein has a widget which is better optimized for this
	sort of thing - see ELKTRA::DW_EXAMPLES.

	Mike
2365.4Using the Viewer for Text files.INFACT::NORTHERNShort temper, tight leash...Wed Jun 20 1990 16:4020
    I have a little bit of a problem, 
    
    	I have a customer, and for whatever reason, they are trying to
    	use the "VIEW/INTER=CHAR" to view text files.
    
    	(Seems like something you ought to be able to do?)
    
    	I have checked here and in the CDA conference, have tried using
    	the "VIEW/INTER=.../OPTIONS=options.CDA$OPTIONS",
    	
    	Where options.CDA$OPTIONS contains
    
    	SET SOFT_DIRECTIVES ON
    
    	Still am getting wrap on the text all over the place.  Is there 
    	something that I am doing that is obviously wrong?  Be kind, please
    
    		As usual, thanks for any assists.
    
    			- Lou
2365.5RTFHIOSG::MARCHANTSneezyWed Jun 20 1990 19:435
    	SET SOFT_DIRECTIVES ON
        ^^^
    this has to be the name of the converter the option applies to. Try
	TEXT SOFT_DIRECTIVES ON
    instead.
2365.6One more try, okay?INFACT::NORTHERNShort temper, tight leash...Thu Jun 21 1990 16:0629
    Okay, okay, okay...
    
    	I'll admit it, I can't type either.
    
    	Commands I have tried
    
    	VIEW LOGIN.COM/FORMAT=TEXT/OPTION=VIEW.CDA$OPTIONS/INTER=CHAR
    
    	VIEW.CDA$OPTIONS contains
    
    	TEXT SOFT_DIRECTIVES ON
    
    	No go, everything wrapped when it appearred on the screen.
    
    	Figured what th, and did a 
    
    	CONVERT/DOCUMENT LOGIN.COM/FORMAT=TEXT/OPTION=VIEW.CDA$OPTIONS -
    			 SAMPLE.DDIF/FORMAT=DDIF
    
    	Then did a 
    
    	VIEW SAMPLE.DDIF/FORMAT=DDIF
    
    	Same effect.
    
    		Lou "I got a shiney new dime for anyone with an
    			easy solution" Northern
    
    
2365.7Easy solutionIOSG::MARCHANTSneezyThu Jun 21 1990 20:529
    Add the option:
	TEXT WIDTH 0

>    		Lou "I got a shiney new dime for anyone with an
>    			easy solution" Northern

    Cheapskate :-)

    Paul.