Windows Subsystem for Linux (Any way to use it from OE ABL?)

Posted by dbeavon on 16-Jan-2018 09:43

I'd like to know if there is a way to get OE ABL to redirect certain statements ("UNIX" and "INPUT THROUGH") to the windows subsystem for linux.  This would need to happen from a Windows installation (eg. from OE ABL running within PDSOE on Windows).

We have a variety of code that interacts with the OS, some of which is just file I/O that is done in a way that is (unfortunately) shell-specific.  Much of it could have been written to use generic file I/O statements in ABL.  This shell-specific ABL code was historically executed in HP-UX but we'd like the flexibility of running it on Windows or Linux (hopefully with minimal re-coding, and substantial re-testing).

I know that a windows update recently broke some stuff on Windows where OE was interacting with the OS via these types of command-shell  statements (see https://community.progress.com/community_groups/openedge_development/f/19/t/33324)  And there was a notation that Progress improved some of its OS-interaction routines ...


In any case, we have made changes in OpenEdge 11.7.1 to make the implementation of INPUT THROUGH, OUTPUT THROUGH, and INPUT-OUTPUT THROUGH more robust so hopefully we won't have further issues as the evolution of the command shell continues.

What I don't know is if they actually made changes to actually *support* the "subsystem for linux", since that seems to be a very appealing mechanism for both the OE "UNIX" statement and "INPUT THROUGH" statement.  I don't know if "UNIX" statements are even executed today if/when the ABL is running in Windows.

Any help would be appreciated.  I didn't find this question asked anywhere else yet, although the link (which I gave earlier) does make a passing reference to the "subsystem for linux".

All Replies

Posted by Marco Mendoza on 16-Jan-2018 10:01

" I don't know if "UNIX" statements are even executed today if/when the ABL is running in Windows."

From

documentation.progress.com/.../index.html

"If you are using Windows and you use the UNIX statement in a procedure, that procedure will compile. The procedure will run as long as flow of control does not pass through the UNIX statement."

Posted by Matt Gilarde on 16-Jan-2018 10:07

We didn't make any changes to support the Windows Subsystem for Linux (WSL) in that bug fix. The fix involved changes to how the INPUT/OUTPUT/INPUT-OUTPUT THROUGH statements redirect input and/or output but didn't add any new functionality.

The AVM determines which shell to use by looking at the COMSPEC environment variable. I haven't tested whether changing COMSPEC to "bash" will allow you to use the WSL with the INPUT/OUTPUT/INPUT-OUTPUT THROUGH statements.

Posted by dbeavon on 16-Jan-2018 10:41

Thanks Matt. It is good to hear about the COMSPEC environment.  At least it gives me hope that there is some potential for shell flexibility.  Hopefully this influences the behavior of ABL on Windows... so I don't have to open a BUG with tech support. ;)

If nothing else, I suppose I could write a class that is intended to be used as a replacement for the "UNIX" statement, and it provides an abstraction over the top of the HP-UX shell or the WSL shell, as the case may be.  Then we could simply search/replace instances of the "UNIX" statement.

However, I suspect that the "INPUT THROUGH" statements will be more difficult to replace with an OO abstraction.  Those are integrated more tightly into the ABL session and they impact the default standard input stream...

This thread is closed