Author Topic: NetRexx on OS/2  (Read 13207 times)

Jan-Erik Lärka

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 275
  • Karma: +5/-0
    • View Profile
Re: NetRexx on OS/2
« Reply #15 on: September 17, 2019, 06:29:04 am »
Ahh, yes, 4OS2 of course in combination with the unchanged part of the code.

Suggestions how to alter that section?

It seems to set classpath correctly, but then abandons it's work because it can't find hello.class.

Dir /N /B might work in CMD, but it's not useful with 4os2. Rexx has a lot of other ways to find filenames that don't depend on the exact syntax of CMD.

The script does work on CMD.

Neil Waldhauer

  • Hero Member
  • *****
  • Posts: 1024
  • Karma: +24/-0
    • View Profile
    • Blonde Guy
Re: NetRexx on OS/2
« Reply #16 on: September 18, 2019, 05:56:40 am »
I'm not sure about any edge cases. This will work for my purposes, at least for now.

Quote
      /* Now determine the exact case of the class, for java commands */
      file=fn'.class'
      call SysFileTree file, 'foo.', 'FO'
      if foo.0<>1 then do
        if foo.0=0 then say 'Cannot find file:' file
        if foo.0>1 then do; do queued(); parse pull .; end
          say 'File "'file'" is not a unique specification'
          end
         exit 1;
      end
       file = filespec('Name', foo.1)  /* is now correct case */
Expert consulting for ArcaOS, OS/2 and eComStation
http://www.blondeguy.com

Jan-Erik Lärka

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 275
  • Karma: +5/-0
    • View Profile
Re: NetRexx on OS/2
« Reply #17 on: September 18, 2019, 11:36:43 pm »
Added you modifications to the script.

Neil Waldhauer

  • Hero Member
  • *****
  • Posts: 1024
  • Karma: +24/-0
    • View Profile
    • Blonde Guy
Re: NetRexx on OS/2
« Reply #18 on: September 24, 2019, 05:04:21 am »
I decided to test if OS/2 Warp 4 (GA) could support getting values from the environment.

Code: [Select]
say value('path',,'environment')
gives "incorrect call to routine", while

Code: [Select]
say value('path',,'os2environment')
works, just fine. Both work OK in ArcaOS. When did REXX gain the ability to use 'environment' as well as 'os2environment'?
Expert consulting for ArcaOS, OS/2 and eComStation
http://www.blondeguy.com

xynixme

  • Guest
Re: NetRexx on OS/2
« Reply #19 on: September 24, 2019, 12:33:20 pm »
When did REXX gain the ability to use 'environment' as well as 'os2environment'?
Presumably you'll be using a different Rexx interpreter anyway, because of not having applied any Y2K OS/2 FixPak w.r.t. Rexx. That FixPak is about as GA as it gets, due to the number of languages still supported by IBM back then. The FixPak introduced new Rexx functionalities.

If a customer isn't using a Y2K-proof OS/2 install, e.g. Microsoft's OS/2 1.0, and you are using a non-Y2K OS/2 Rexx interpreter to not use Y2K functionalities by mistake during the creation of a solution for such a customer, then perhaps still use OS2ENVIRONMENT. Otherwise use ENVIRONMENT. It saves a few bytes, your code will be more portable, and e.g. there's no confusing WINOS2ENVIRONMENT. IIRC IBM's Object Rexx for Windows uses ENVIRONMENT too. Hence the portability of code using that.

If a Y2K-proof Rexx interpreter doesn't support ENVIRONMENT, then that would be a problem. AFAICT OS/2 Warp 4 GA isn't Y2K-proof, including its Rexx interpreter.

Sean Casey

  • Full Member
  • ***
  • Posts: 122
  • Karma: +2/-0
    • View Profile
Re: NetRexx on OS/2
« Reply #20 on: September 24, 2019, 06:31:46 pm »
AFAICT OS/2 Warp 4 GA isn't Y2K-proof, including its Rexx interpreter.

Yup. IBM shipped some of the Warp Version 4 boxes with a large blue sticker that said: 

"YEAR 2000 READY when applicable IBM FixPaks are installed.   Certain add-on features in this package are not Year 2000 ready, including: Certain device drivers, BonusPak, Application Sampler CD, WarpExplorer, TCP/IP DOS for OS/2 Warp (Winsock). Netware Client 2.11, Java 1.0.1.  For details about the above and any other features that may be identified by IBM as not Year 2000 ready see: http://ps.software.ibm.com"

Neil Waldhauer

  • Hero Member
  • *****
  • Posts: 1024
  • Karma: +24/-0
    • View Profile
    • Blonde Guy
Re: NetRexx on OS/2
« Reply #21 on: September 25, 2019, 03:52:53 pm »
I'm curious to know which FixPak upgraded Rexx.'

I'm aware that for the subject software, NetRexx, it doesn't matter. The minimum requirement for OpenJDK 6 (and therefore NetRexx) is FixPak 13.
Expert consulting for ArcaOS, OS/2 and eComStation
http://www.blondeguy.com

xynixme

  • Guest
Re: NetRexx on OS/2
« Reply #22 on: September 26, 2019, 01:59:33 pm »
I'm curious to know which FixPak upgraded Rexx.'

FixPaks (or new OSes), not FixPak (or new OS).

For example, IIRC an OS/2 Warp 3 FixPak broke PMREXX (functional change: a.o. ADDRESS() no longer returns PMREXX, so you cannot make sure that RxMessageBox() will work anymore).

All newer Y2K FixPaks changed Rexx (functionally), and those FixPaks will be as GA as possible (i.e. not just for the few eCS and ArcaOS languages).

Object Rexx changed ("Classic") Rexx (functional changes like ANSI's DATE() with more than one argument, syntax checking).

So please use Object Rexx to check the syntax of distributed apps (including but not limited to a.o. VX-REXX), try to avoid using e.g. DATE() with more than one argument for code not used just by you, and it'll be safe to assume that someones Rexx is Y2K-proof and that PMREXX is broken. If not, then you're probably dealing with some exotic system ("Microsoft OS/2 1.0") and perhaps should use the same Rexx interpreter as that customer, to rule out using newer code (i.e. the Class Rexx of Object Rexx, or Y2K functionalities). Y2K is documented by IBM, and Object Rexx is a matter of (not) having executed SWITCHRX.

Edit: and REXXUTIL.DLL was upgraded once or twice with new functions, like SysBootDrive().
« Last Edit: September 27, 2019, 10:33:30 am by André Heldoorn »