On Fri, 8 Nov 2013 10:58:46 +0100, Bernd Oppolzer wrote:
>
>( I have this problem sometimes, because management
>decides that some of our mainframe based test supporting
>C programs should be moved to Linux 64 on Intel).
>
>For now, the solution is
>
>#ifdef MAINFRAME
> fopen /* this way */
>#else
> fopen /* the other way */
>#endif
>
An unforseen and unfortunate consequence of too-early
binding to the file naming conventions of a particular OS.
But, yes, environment variables:
fopen( getenv( "SYSUT1" ), getenv( "SYSUT1_OPTS" ) );
... where, outside the C program, for z/OS:
SYSUT1="//DD:SYSUT1" export SYSUT1
... and for Linux:
SYSUT1="/home/$LOGNAME/sysut1" export SYSUT1
... and whatever is necessary for the OS-dependent options.
(It would be useful if the syntax of DD were extended to
allow the options to be embedded in the TIOT entry.
Do PATHOPTS, PATHMODE, and FILEDATA provide sufficient
support already? More likely for UNIX files than for legacy
data sets.)
-- gil
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN