Mapping local files to FILE declarations in PL/I with IBM VisualAge PL./I for Windows 
Author Message
 Mapping local files to FILE declarations in PL/I with IBM VisualAge PL./I for Windows

Hello,

I'm in the process of migrating some PL/I code from MVS to Windows.
I'm using IBM's VisualAge PL/I 2.0 to compile my code.

Now, I'm sort of stuck on how I can pass local files as inputs and
outputs to my PL/I code. On the MVS, the JCL took care of that, but
here on Windows I just have my .exe. Surely there must be an easy way
to map local files to the input and output FILE RECORDs that the PL/I
source specifies.

Help very much appreciated. :)

Ivo



Mon, 05 Dec 2005 00:56:11 GMT  
 Mapping local files to FILE declarations in PL/I with IBM VisualAge PL./I for Windows
There are a couple of ways of doing this, as the manuals explain. Assuming that you don't want to use the "set dd.filevariable=filename" route, here is an example:

DCL SFIL STREAM INPUT;
DCL (CFIL,XFIL,GFIL,TFIL,EFIL) STREAM OUTPUT;
...
...
OPEN FILE(SFIL) INPUT  TITLE('/' || SFILNAM);
OPEN FILE(XFIL) OUTPUT TITLE('/xli.del,append(y)');
...

The first OPEN is on a file whose name is computed or passed in as an argument from the command line, and the second OPEN is on a file whose name is always the same.

N. Shamsundar
University of Houston

Quote:

> Hello,

> I'm in the process of migrating some PL/I code from MVS to Windows.
> I'm using IBM's VisualAge PL/I 2.0 to compile my code.

> Now, I'm sort of stuck on how I can pass local files as inputs and
> outputs to my PL/I code. On the MVS, the JCL took care of that, but
> here on Windows I just have my .exe. Surely there must be an easy way
> to map local files to the input and output FILE RECORDs that the PL/I
> source specifies.

> Help very much appreciated. :)

> Ivo




Mon, 05 Dec 2005 05:44:43 GMT  
 Mapping local files to FILE declarations in PL/I with IBM VisualAge PL./I for Windows
Can't speak specifically about windows, but with OS/2 you can set
environment variables to take the place of DD statements.  Should say in
the Programmers' Guide.
Quote:

> Hello,

> I'm in the process of migrating some PL/I code from MVS to Windows.
> I'm using IBM's VisualAge PL/I 2.0 to compile my code.

> Now, I'm sort of stuck on how I can pass local files as inputs and
> outputs to my PL/I code. On the MVS, the JCL took care of that, but
> here on Windows I just have my .exe. Surely there must be an easy way
> to map local files to the input and output FILE RECORDs that the PL/I
> source specifies.

> Help very much appreciated. :)

> Ivo




Mon, 05 Dec 2005 07:14:06 GMT  
 Mapping local files to FILE declarations in PL/I with IBM VisualAge PL./I for Windows
For MVS compatible DDNames, in the command processor:
SET DD:ddname=name,options

To skip the external "DD statement", in the program:
OPEN ... TITLE('/name,options');

You can also simulate the SVC99 call from within your program by using:
rc = PUTENV ('SET DD:ddname=name,options);
although OPEN TITLE('/...') is normally easier, the syntax is also supported
on more recent host compilers.

Full details on SET, TITLE, PUTENV, legal file names and all options are in
the on-line documentation (LRM and Guide).


Quote:
> Hello,

> I'm in the process of migrating some PL/I code from MVS to Windows.
> I'm using IBM's VisualAge PL/I 2.0 to compile my code.

> Now, I'm sort of stuck on how I can pass local files as inputs and
> outputs to my PL/I code. On the MVS, the JCL took care of that, but
> here on Windows I just have my .exe. Surely there must be an easy way
> to map local files to the input and output FILE RECORDs that the PL/I
> source specifies.

> Help very much appreciated. :)

> Ivo




Mon, 05 Dec 2005 13:56:36 GMT  
 Mapping local files to FILE declarations in PL/I with IBM VisualAge PL./I for Windows
Thanks all for the pointers to the LRM and the DD:-variables.
I don't want to change the source code, so the env vars are an excellent solution.

Another question:
The original JCL specifies multiple DSN files in 1 DD statement, like this:
//IN01      DD DSN=&&TEMP4,
//             DISP=(OLD,DELETE)
//          DD DSN=&&TEMP7,
//             DISP=(OLD,DELETE)
//          DD DSN=&&TEMP10,
//             DISP=(OLD,DELETE)

This seems to allow me to read multiple files as one dataset.
Any idea how to simulate this through 'set DD:IN01' variables?

Ivo

Quote:

> For MVS compatible DDNames, in the command processor:
> SET DD:ddname=name,options

> To skip the external "DD statement", in the program:
> OPEN ... TITLE('/name,options');

> You can also simulate the SVC99 call from within your program by using:
> rc = PUTENV ('SET DD:ddname=name,options);
> although OPEN TITLE('/...') is normally easier, the syntax is also supported
> on more recent host compilers.

> Full details on SET, TITLE, PUTENV, legal file names and all options are in
> the on-line documentation (LRM and Guide).



> > Hello,

> > I'm in the process of migrating some PL/I code from MVS to Windows.
> > I'm using IBM's VisualAge PL/I 2.0 to compile my code.

> > Now, I'm sort of stuck on how I can pass local files as inputs and
> > outputs to my PL/I code. On the MVS, the JCL took care of that, but
> > here on Windows I just have my .exe. Surely there must be an easy way
> > to map local files to the input and output FILE RECORDs that the PL/I
> > source specifies.

> > Help very much appreciated. :)

> > Ivo




Mon, 05 Dec 2005 21:55:54 GMT  
 Mapping local files to FILE declarations in PL/I with IBM VisualAge PL./I for Windows
I'm not sure from your JCL if IN01 is supposed to be a PDS(E) concatenation
of a PS concatenation. Windows has no native PDS(E)'s, and you cannot read
multiple files as a concatenation using SET DD: statements. OTOH, you can't
access members of a PDS(E) concatenation using PL/I on MVS without use of
some non-PL/I facilities such as ISPF/PDF LMF or a set of (assembler) BPAM
access routines.

Rather you will need to concatenate the files up front, and read the
concatenated result. The COPY command with the + option will perform such a
concatenation, the resultant file can then be handled using SET DD: Enter
COPY /? at a Command Prompt, or use the Windows online help.


Quote:
> Thanks all for the pointers to the LRM and the DD:-variables.
> I don't want to change the source code, so the env vars are an excellent
solution.

> Another question:
> The original JCL specifies multiple DSN files in 1 DD statement, like
this:
> //IN01      DD DSN=&&TEMP4,
> //             DISP=(OLD,DELETE)
> //          DD DSN=&&TEMP7,
> //             DISP=(OLD,DELETE)
> //          DD DSN=&&TEMP10,
> //             DISP=(OLD,DELETE)

> This seems to allow me to read multiple files as one dataset.
> Any idea how to simulate this through 'set DD:IN01' variables?

> Ivo




- Show quoted text -

Quote:
> > For MVS compatible DDNames, in the command processor:
> > SET DD:ddname=name,options

> > To skip the external "DD statement", in the program:
> > OPEN ... TITLE('/name,options');

> > You can also simulate the SVC99 call from within your program by using:
> > rc = PUTENV ('SET DD:ddname=name,options);
> > although OPEN TITLE('/...') is normally easier, the syntax is also
supported
> > on more recent host compilers.

> > Full details on SET, TITLE, PUTENV, legal file names and all options are
in
> > the on-line documentation (LRM and Guide).



> > > Hello,

> > > I'm in the process of migrating some PL/I code from MVS to Windows.
> > > I'm using IBM's VisualAge PL/I 2.0 to compile my code.

> > > Now, I'm sort of stuck on how I can pass local files as inputs and
> > > outputs to my PL/I code. On the MVS, the JCL took care of that, but
> > > here on Windows I just have my .exe. Surely there must be an easy way
> > > to map local files to the input and output FILE RECORDs that the PL/I
> > > source specifies.

> > > Help very much appreciated. :)

> > > Ivo




Tue, 06 Dec 2005 14:45:13 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. VisualAge PL/I for OS/390 and PL/I 2.3

2. Compiling DR PL/I code with IBM Personal PL/I

3. PL/I (was: IBM Needs to seed the PL/I Compiler)

4. Offer of IBM VA PL/I Header files for Win32 Programming

5. IBM VisualAge PL/I for Windows

6. WI - Milwaukee- PL/1 coder & implementer

7. Local file declaration

8. Looking for IBM VisualAge Java/IBM VisualAge Smalltalk teachers

9. Logo Komeniusz PL (Logo Comenius PL)

10. Derivation of PL/I (was Usenet group for PL/M language)

11. Difference PL/1 PL/I

12. What is the difference between DEC PL/1 and OS/390 PL/1

 

 
Powered by phpBB® Forum Software