VX-REXX... Display Output 
Author Message
 VX-REXX... Display Output

I have a REXX program with the following code:

SAY "Importing Data now..."
"C:\PCSOS2\rtopcb d:\spede\cim\bloc.tto"
ibloc bloc.dat

This begins importing data from an AS/400.  This REXX program is run in an
OS/2
Window.  As the file(s) is being imported, results of the import process
are scrolled across the screen.

I am trying to do the same thing with VX-REXX (and trying to learn REXX at
the same time).  I've looked at CONSOLE but it is always displayed behind
my VX-REXX application I'm making.  Also it displays the VX-REXX program
in it's Window title bar.

Is there a way to display this info right on my applications window?  I'm
not an expert programmer, so plese bare with me...

Thank you.



Sun, 19 Jul 1998 03:00:00 GMT  
 VX-REXX... Display Output

Quote:
>I have a REXX program with the following code:

>SAY "Importing Data now..."
>"C:\PCSOS2\rtopcb d:\spede\cim\bloc.tto"
>ibloc bloc.dat

>This begins importing data from an AS/400.  This REXX program is run in an
>OS/2
>Window.  As the file(s) is being imported, results of the import process
>are scrolled across the screen.

>I am trying to do the same thing with VX-REXX (and trying to learn REXX at
>the same time).  I've looked at CONSOLE but it is always displayed behind
>my VX-REXX application I'm making.  Also it displays the VX-REXX program
>in it's Window title bar.

>Is there a way to display this info right on my applications window?  I'm
>not an expert programmer, so plese bare with me...

>Thank you.

Create a window.
Create a listbox (make it wide enough to see all your data); i'll assume the
name sys_log_queue).

ok = VRMethod( "sys_log_queue", "AddString", prt_string)

so your code would be something like...

   file = 'as400.log'
   call stream file, 'C', 'OPEN'
   do while lines(file) > 0
      string_to_print_in_listbox = LineIn(file)
      ok = VRMethod( "sys_log_queue", "AddString", string_to_print_in_listbox)
   end
   call stream file, 'C', 'CLOSE'
   drop file

You can use this command to go to the bottom of the listbox without using
the mouse or pgdn buttons:

ok = Vrset("sys_log_queue","Selected", VRGET("sys_log_queue", "Count"))

Hope its useful...


Mychal Boyd Manie (DBA) UT Knoxville (423)974-2398
WARPed... Why?  Because I have work to do (I hate rebooting).



Wed, 22 Jul 1998 03:00:00 GMT  
 VX-REXX... Display Output

Quote:
>ok = VRMethod( "sys_log_queue", "AddString", prt_string)

Forgot to add this little tidbit.  While the above statement will sent
the contents of prt_string to the list box (addstring) is the OOP call
to the object (ie, perform this function), the default for a list box
is sorted in ASCENDING order.  This will look confusing.  Just go into the
properties of the listbox (LIST tab) and change SORT parameter
to NONE.


Mychal Boyd Manie (DBA) UT Knoxville (423)974-2398
WARPed... Why?  Because I have work to do (I hate rebooting).



Wed, 22 Jul 1998 03:00:00 GMT  
 VX-REXX... Display Output
One cheap way to do this is to use the "rxpmprintf()" function in the RXU
function package (and I think Quercus' REXXLIB has a similar function) to write
lines to a PMPRINTF "monitor" window.  This way, your rexx program doesn't need
to be a VXREXX application (not that there's anything wrong with that).


Fri, 24 Jul 1998 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. ??? Redirecting output to an MLE (VX-REXX or VisPro REXX)

2. Vispro Rexx vs VX - Rexx

3. VX-REXX/REXX dialog trouble in OS/2 w/ FP17

4. VisPro/Rexx vs VX-REXX

5. VX-REXX to any REXX on NT

6. VisPro Rexx or VX-Rexx ?

7. Object REXX/VX-REXX DB problems

8. VX-REXX and Object REXX under OS/2

9. Object REXX & VX-REXX under OS/2

10. Creation of GIF/BMP with REXX and VX-REXX in OS/2

11. VX-REXX and Object-REXX

12. Is Vx-Rexx The Best Rexx Add-on ?

 

 
Powered by phpBB® Forum Software