Page 1 of 1

how to load flatfile into pds member?......

PostPosted: Mon Jan 02, 2012 8:03 pm
by ganesan_t
Hai Friends,
I have query regarding to " How to Split flat file into pds member". I have done jcl unload pds member into single fat file by using IEBPTPCH utility.By the same way i need to load same flat file into pds member same name of member.i.e.( i need to do it back to it original that exist)

thanks in advance....

Re: how to load flatfile into pds member?......

PostPosted: Mon Jan 02, 2012 9:04 pm
by steve-myers
There are several methods. Probably the most common is IEBGENER.
//        EXEC PGM=IEBGENER
//SYSPRINT DD  SYSOUT=*
//SYSUT1   DD  -- Input "flat" dataset --
//SYSUT1   DD  -- Output PDS member, DSN=PDSDS(MEMBER) --
//SYSIN    DD  DUMMY
You must take care that the dataset attributes of the PDS match the "flat" dataset. If you don't match these attributes you will most likely render the other members of the PDS unreadable.

Re: how to load flatfile into pds member?......

PostPosted: Tue Jan 03, 2012 2:03 pm
by ganesan_t
Thanks for replying for my query. I didn't get clear solution. what my quey is i need to do opposite function of iebptpch Utility .i.e.. i copy/punch pds member into ps organisation. now what i want is again i need to do return back .i.e, reverse of this working.. i want know is there any possiblity there in utility.....

thanks in advance.....................

Re: how to load flatfile into pds member?......

PostPosted: Tue Jan 03, 2012 7:52 pm
by enrico-sorichetti
show the jcl used to create the sequential dataset...
and a sample of the output produced
the format depends on the control statements used
so until we know we cannot help

Re: how to load flatfile into pds member?......

PostPosted: Tue Jan 03, 2012 10:33 pm
by steve-myers
Oh, you want to take the SYSUT2 output from IEBPTPCH and use it to recreate the source PDS. Mail me a certified check for $10,000 from a US bank and I'll send you a program that will do just that. (I don't expect to get the check, and that will be the end of this topic!)

Re: how to load flatfile into pds member?......

PostPosted: Wed Jan 04, 2012 1:59 am
by dick scherrer
Hello,

Thanks for replying for my query. I didn't get clear solution.
Then you did not look at the solution Steve provided. . .

Have you "cloned" the JCL from Steve and used your dataset names rather than the examples? If not, why not :?

Do this now and let us know what happens. DO NOT run your first test mucking about with the "real" pds - make a copy for testing.

Re: how to load flatfile into pds member?......

PostPosted: Wed Jan 04, 2012 11:04 am
by steve-myers
Dick - In their second post the TS clarified how the input was created. My initial solution won't work, though an IEBGENER solution using SYSIN controls to edit the IEBPTPCH output might work. Another solution would be to write a program or Rexx exec to extract the member name from the IEBPTPCH output, create IEBUPDTE ./ ADD NAME=xxx statements followed by the member data, and then feed that output into IEBUPDTE. My program (yes, it already exists; I wrote it in 2010 after a similar query here or MVSHELP.NET just before it died as practice) creates the PDS directly using WRITE/CHECK/STOW macros, but other than the direct PDS manipulation, it does the same analysis of the IEBPTPCH output that I just proposed. My program is moderately large (953 Assembler lines) by the standards of this site, but it is fully documented and there are other goodies in the program that some beginners might appreciate.

Re: how to load flatfile into pds member?......

PostPosted: Wed Jan 04, 2012 11:49 am
by dick scherrer
Hi Steve,

Looks like i was too hasty. . .l :oops:

Thanks for the clarification.

d