gokuldass
New User
Joined: 18 Mar 2005 Posts: 48 Location: india
|
|
|
|
Hello Buddies,
I have a new requirement on Assember by which I have to handle PDS members. For example, I want to read the PDS using Assembler program and need to copy all the members from the PDS to another PDS.
Let me know the DCB parameters for PDS and also the GET & PUT format for reading & writing PDS.
This requirement is only on assembler.
Thanks in advance.
Regards,
Gokul |
|
UmeySan
Active Member
Joined: 22 Aug 2006 Posts: 771 Location: Germany
|
|
|
|
Hi !
Why using assembler-programm. Better use an utility for copying
members form one pds to an other.
If you code an open instruction there is an open of the file you specify in the dcb. The logical name of the dcb refers to the corresponding JCL DD-Statement. There you have to specify the physical name of the file.
This means the DSN of the PDS and the member you want to process.
For example: Userid.Testpds(Member).
So in the normal way, with an PDS with 20 members, you will have normaly 20 DCB's in your programm an 20 DD's in your JCL.
But if you will handel a various number of members in an PDS, you could
use the IHADCB macro for modifying DCB-Parameters thru runtime.
First you have to create a littele file with alle the membernames of that pds. Use a utility or a Rexx or something else. This is the first step in your Job. Second step is your programm. This is now reading this little file sentence for sentence. With the info of the membername and the changing
of the DCB before open instruction, the open becomes dynamic.
Exampel: modify IN-DCB with Membername-1 then, open-read-close
modify IN-DCB with Membername-2 then, open-read-close
and so on.
You will only need one DCB in programm and one DD-Statement in JCL.
Regards, UmeySan |
|