Oppolzer - Informatik / Blog


Blog-Hauptseite      Neuester Artikel      Älterer Artikel      Neuerer Artikel      Älterer gleiche Kategorie      Neuerer gleiche Kategorie

PL1-L - Variable (unbegrenzte) Anzahl von Ausgabedateien in PL/1

Subject:

Re: file attribute

From:

Bernd Oppolzer <bernd.oppolzer@T-ONLINE.DE>

Reply-To:

PL1 (language) discussions <PL1-L@LISTSERV.DARTMOUTH.EDU>

Date:

2014.01.22 23:13:12


Do I understand this right?

Your task is to write information from one file to a virtually unlimited number
of output files, where the information from one line goes to all of those output
files, and you can not tell an upper limit of the number of output files (that
is, the columns of the CSV input file)?

This sounds like a somehow strange application to me.

I'm using not only PL/1 regularly, but also C. And with the C runtime, this
would be no problem, because a file in C is simply a pointer to a structure that
you get by issuing fopen(). So you could construct filenames like DAT00001,
DAT00002 etc., then issue fopen() for output on those filenames and put the
resulting file pointers in an array of sufficient length, then write the
information to those files. Using the naming scheme outlined above, you would
have 100000 files; other schemes come easily to mind.

If you have an absolute need for such a solution, you could code your program in
PL/1, but do the file handling in a C subroutine. I did this already from time
to time (not on the PC, but on the z/OS mainframe), when the functions of the C
runtime seemed more appropriate to me, but I wanted the logic to remain in PL/1.

If you wish, we could discuss this further offline (maybe in German).

Kind regards

Bernd




Am 22.01.2014 14:47, schrieb H.H.:
> Hello E.,
>
> that's my problem. I doen't know the maximum.
> And the colleagues in the field doesn't hear to me :-(
> so I can't define the maximum.
>
> - H.
>

Blog-Hauptseite      Neuester Artikel      Älterer Artikel      Neuerer Artikel      Älterer gleiche Kategorie      Neuerer gleiche Kategorie