CheckDate.nrx sample with OS2 time parse error!

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

CheckDate.nrx sample with OS2 time parse error!

serkom
Hi NetRexxers,

playing with the new features of NetRexx/Java 1.1 i found a problem with parsing time-strings.
This seems to be related to OS/2 as my NT (JDK 1.1.3 NetRexx 1.12) would not show this
behaviour:

Time-strings with double zeros won't get parsed.

With German default Locale:
a) 19.02.1997 15:01:01 is ok
b) 19.02.1997 15:01:00 FAILES (strange isn't it?)

Anyway, I attached a NetRexx (1.12) program for you to verify this. It is not a NetRexx problem, not
even Java, probabelly OS/2's JDK111.
Can someone report this as a bug? (If I did not make some stupid things) Where would this be
done?

CU

Kai

CheckDate.nrx (3K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: CheckDate.nrx sample with OS2 time parse error!

Massimiliano Marsiglietti
Ciao,

Kai Schmidt wrote:

> Hi NetRexxers,
>
> playing with the new features of NetRexx/Java 1.1 i found a problem with parsing time-strings.
> This seems to be related to OS/2 as my NT (JDK 1.1.3 NetRexx 1.12) would not show this
> behaviour:
>
> Time-strings with double zeros won't get parsed.

[SNIP]

Must be an OS/2 thing.. I am now in a Linux box, and your program seems
to run ok (jdk 1.1.3, NetRexx 1.120):

[maxmars@localhost maxmars]$ java CheckDateMain
Your time format is: 26.9.1997 19:00:42

        19.9.1997 15:12:01
19.9.1997 15:12:01 parsed with 'd.M.yyyy HH:mm:ss' was ok!
==> 19.9.1997 15:12:01

        19.9.1997 15:12:00
19.9.1997 15:12:00 parsed with 'd.M.yyyy HH:mm:ss' was ok!
==> 19.9.1997 15:12:00

        1.1.2000   9:03:04
1.1.2000 9:03:04 parsed with 'd.M.yyyy HH:mm:ss' was ok!
==> 1.1.2000 09:03:04

Max


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe from this mailing list ( ibm-netrexx ), please send a note to
[hidden email]
with the following message in the body of the note
unsubscribe ibm-netrexx <e-mail address>

Reply | Threaded
Open this post in threaded view
|

Re: CheckDate.nrx sample with OS2 time parse error!

Robert Schiller
In reply to this post by serkom
Kai,

This is odd.  I'm running Win95 and Sun's JDK 1.1.3 and your app appears to
have compiled ok, but it won't run.

--
F:\jdk1.1.3\test>java COM.ibm.netrexx.process.NetRexxC CheckDate
NetRexx portable processor, version 1.120
Copyright (c) IBM Corporation, 1997.  All rights reserved.
Program CheckDate.nrx
  === class CheckDate ===
    constructor CheckDate(SimpleDateFormat)
    method parseMyString(Rexx)

  === class CheckDateMain ===
    function main(String[])
Compilation of 'CheckDate.nrx' successful [2 classes]

F:\jdk1.1.3\test>java CheckDate
In class CheckDate: void main(String argv[]) is not defined
--

I don't understand what's happening here.  There is no main() in your
CheckDate class.  I'm still pretty new to NetRexx but my understanding is
that you should have a main() for each class.  I'm not sure I'm right
though and I'm probably not, but I sure would like to know why your code
compiles and at least runs under OS/2 and doesn't run under Win95.

Another thing I didn't know you could do is have more than one class in a
.nrx or .java file.

Robert Schiller
Schiller Computing
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe from this mailing list ( ibm-netrexx ), please send a note to
[hidden email]
with the following message in the body of the note
unsubscribe ibm-netrexx <e-mail address>

Reply | Threaded
Open this post in threaded view
|

Re: CheckDate.nrx sample with OS2 time parse error!

Massimiliano Marsiglietti
Ciao!

Robert Schiller wrote:

> Kai,
>
> This is odd.  I'm running Win95 and Sun's JDK 1.1.3 and your app appears to
> have compiled ok, but it won't run.
>
> --
> F:\jdk1.1.3\test>java COM.ibm.netrexx.process.NetRexxC CheckDate
>

Hmm.. Isn't nrc.bat working? You'd save a few keystrokes!


>     function main(String[])
> Compilation of 'CheckDate.nrx' successful [2 classes]
>

Here's the trick: you must issue 'java CheckDateMain'.

> Another thing I didn't know you could do is have more than one class in a
> .nrx or .java file.
>

Much more than this! Have you tried compiling two or more .nrx files at onceto
avoid having to put everything in a file? NR can resolve nicely
cross-referencing!

Max


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe from this mailing list ( ibm-netrexx ), please send a note to
[hidden email]
with the following message in the body of the note
unsubscribe ibm-netrexx <e-mail address>

Reply | Threaded
Open this post in threaded view
|

Re: CheckDate.nrx sample with OS2 time parse error!

Robert Schiller
In reply to this post by serkom
Max,

> Here's the trick: you must issue 'java CheckDateMain'.

Ah, now I see.  Yes, Kai's app works ok under Win95:

F:\jdk1.1.3\test>java CheckDateMain
Your time format is: 27.9.1997 03:40:16

        19.9.1997 15:12:01
19.9.1997 15:12:01 parsed with 'd.M.yyyy HH:mm:ss' was ok!
==> 19.9.1997 15:12:01

        19.9.1997 15:12:00
19.9.1997 15:12:00 parsed with 'd.M.yyyy HH:mm:ss' was ok!
==> 19.9.1997 15:12:00

        1.1.2000   9:03:04
1.1.2000 9:03:04 parsed with 'd.M.yyyy HH:mm:ss' was ok!
==> 1.1.2000 09:03:04

> Much more than this! Have you tried compiling two or more .nrx files at
once to
> avoid having to put everything in a file? NR can resolve nicely
> cross-referencing!

No, I haven't really done much serious coding with NetRexx yet.  Thanks for
the tip.

I'd really like to work with NetRexx all of time but I'm reluctant to code
GUI's by hand.  Do you have a feel for how other NetRexxers are doing their
Gui's?

Bob
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe from this mailing list ( ibm-netrexx ), please send a note to
[hidden email]
with the following message in the body of the note
unsubscribe ibm-netrexx <e-mail address>