Mombu the Programming Forum sponsored links

Go Back   Mombu the Programming Forum > Programming > Rexx2Nrx: 2 questions
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 1st April 12:22
michael
External User
 
Posts: 1
Default Rexx2Nrx: 2 questions



Hi,
I am using Rexx2Nrx from Thomas Schneider and have a couple of questions:

1. I use linein and lineout to read and write files, I generate XML tags and
put UTF-8 encoding in the header, but how do I make the content UTF-8
encoded? (as the files currently are not really UTF-8 encoded I changed to
Windows-1252)

sample of what I write using lineout:
<?xml version="1.0" encoding="Windows-1252"?>
<TAG>Data</TAG>

2. I run my generated java class files on Windows, can I run these on AIX
and Solaris as well? (can I use the Netrexx: Tools.jar, Rexx2Nrx.jar,
NetRexxC.jar on AIX and Solaris? or do I need more?)

TIA

Michael
  Reply With Quote


  sponsored links


2 1st April 12:22
thomas.schneider
External User
 
Posts: 1
Default Rexx2Nrx: 2 questions



Hello Michael,

first sorry for the delay, but I have been on vacations from
17.11.2003 - 19.11. 2003.

You should be able to use UTF-8 encoding by adding 'UTF' to the
access-options, e.g:
FD_input = RexxFile.FD("myfile.txt").access("READ UTF")
PF_output=RexxFile.FD("myoutput.txt").access("REWR ITE UTF")

should read/write UTF encoded files (although I actually did never
********ely test that).

This feature is do***ented in the Online-do***entation of RexxFile.

Pls. let me know when it actually DOES NOT work.

You should be able to do that. You will obviusly need the Java Virtual
machine as well. And java, of course, if you want to compile your
code.

The only exception should be 'SysCmd' (executing system commands), as
this is currently DOS-specific. But I could send you the source when
you would like to put in the necessary UNIX code ...

Hope this helps.
Tom.
  Reply With Quote
3 1st April 12:22
michael
External User
 
Posts: 1
Default Rexx2Nrx: 2 questions


Thomas,
thanks for responding! never mind the delay, I am going away next week :-)
....
With regard to UTF, does that mean I have to replace my linein and lineout
calls by RexxFile.FD?
If so, do I need to register the RexxFile function library using rxfuncadd?

Next challenge will be to verify that the data in the file is actually UTF-8
encoded ... :-)

With regard to the UNIX support: I have Java SDK and JRE on AIX and Solaris,
can I ftp the generated java classes to the UNIX box and run them or do I
need to ftp the .nrx files and use Netrexx on UNIX to generate the .classes?

With regard to 'SysCmd' ... yes I do use this functionality! I assume this
is in 'C' and I don't know that language, so cannot make any changes. As I
have the platforms available I could try with the proper instructions from
you 'port/compile' the programs, test them and then
send them back to you so you can enclose them into your package.

As I said earlier, there is no rush as I am going skiing next week (Sölden)
and try to keep away from computers...

Do you have any idea of the number of users of your Rexx2Nrx package? I love
it!!!

Michael


"Thomas Schneider" <Thomas.Schneider@Donauland.at> schreef in bericht
news:3c204b12.0311200428.528714e1@posting.google.c om...
  Reply With Quote
4 1st April 12:22
thomas.schneider
External User
 
Posts: 1
Default Rexx2Nrx: 2 questions


Hello Michael,

myfile='myfile.txt'
call open(myfile,'READ UTF')
do while lines(myfile)>0
line=linein(myfile)
... do whatever ...
end

should work as well.

Also:

call open(myfile,'REWRITE UTF')
do i=1 to 10
myline=***x
call lineout(myfile,myline)
end
call close myfile

i.e. you have to specify the 'UTF' option only when opening
(accessing) the file, NOT on every linein/lineout call.

No, no registering necessary. Option LOAD always finds the references
run-time routines automatically (see section OPTIONS in the online
docu).


you are welcome. :-))


You have to ftp the 'generated java classes' only as the Java Virtual
Machine is binary compatible. This is one of the many advantages using
Java !!

The whole Rexx2Nrx Run-time package is implemented as (mostly binary)
NetRexx
classes -- no need to use/learn C!

I suggest you contact me offline at my mail address
Thomas.Schneider@Donauland.at when you come back from skiing.

If you would upgrade & test 'SysCmd' for UNIX systems (I do have no
access to UNIX here) you will be more than welcome.

unfortunately I have NO idea how many users I already have. Nice to
hear that you enjoy it!

Enjoy your skiing in Austria. Sölden is a very nice place ...

Tom. (http://www.Rexx2Nrx.com)
  Reply With Quote
Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666