Back in week 14/2009 I wrote a tip about how IEBPTPCH can transform a PDS into a flat file. Now the time has come to reveal how to transform a single flat file into many members in one PDS. The program doing the trick is called IEBUPDTE and is wellknown by almost any systems programmer, but most of us ordinary programmers does not know anything about this nice little utility program. You now have the opportunity to learn about IEBUPDTE.
In order to create many members in a single PDS from one flat file you have to specify in some way which data belongs to which member. IEBUPDTE requires the input dataset to contain records with a specific syntax to seperate the individual members. These records looks like this:
There is apparently no limit to the number of blanks between ./ and ADD and between ADD and NAME=membername. Unfortunately the manual for IEBUPDTE were not written by the best IBM employees in the area, which makes it a little difficult to interpret the syntax and the number of blanks allowed. To get a feeling of how IEBUPDTE works I will show you an example where a new PDS is created from some sequential input:
After execution of the above step MY.PDS will contain two members called FIRSTMEM and SECNDMEM with the specified contents. It is actually quite simple. And now to the hard stuff. The manual is very hard to understand. Only LRECL less than 81 may be used. I have not tried all the other possibilities offered by IEBUPDTE so you may carry out your own research. Good luck.