View previous topic :: View next topic
|
Author |
Message |
raminenibhanu
New User
Joined: 31 Jan 2022 Posts: 7 Location: United States
|
|
|
|
Trying to create a member DataSet and it failed with the below error message. Please let me know how to address this issue.?
com.ibm.jzos.RcException: BPXWDYN failed; error in keyword number: 5 RC=-25 (0xffffffe7)
at com.ibm.jzos.ZFile.bpxwdyn(ZFile.java:152)
Input Data
ReadWriteDS :PDS(TEST1)
ReadWriteDS :PDS(TEST3)
zFileInDS initialzied1 :USER.PDS(TEST1)
SourceDSN : USER.PDS(TEST1)
targetDSN : USER.PDS(TEST3)
Code
public ZFile createDSN(String datasetName,String templateDSName) throws Exception
{
ZFile zFileOut = null;
String targetDD = ZFile.allocDummyDDName();
// bpxwdyn requires fully-qualfied dsn (it will not add uid).
// so we make sure that we have a fully qualified DSNs
String sourceDSN = templateDSName;
System.out.println("SourceDSN : "+sourceDSN);
String targetDSN = ZFile.getFullyQualifiedDSN(datasetName);
System.out.println("targetDSN : "+targetDSN);
try{
ZFile.bpxwdyn("alloc fi(" + targetDD + ") da(" + targetDSN
+ ") like(" + sourceDSN + ") reuse new catalog msg(wtp)");
zFileOut = new ZFile("//DD:" + targetDD, "wb,type=record,noseek");
}catch(Exception e) {
e.printStackTrace();}
return zFileOut;
}[/code] |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2141 Location: USA
|
|
|
|
CODE TAGS |
|
Back to top |
|
|
raminenibhanu
New User
Joined: 31 Jan 2022 Posts: 7 Location: United States
|
|
|
|
CODE TAGS ?
Getting error at the below command. Same command works for regular datasets creation, but for member dataset creation its failing.
ZFile.bpxwdyn("alloc fi(" + targetDD + ") da(" + targetDSN
+ ") like(" + sourceDSN + ") reuse new catalog msg(wtp)"); |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2141 Location: USA
|
|
|
|
CODE TAGS - where they are?? |
|
Back to top |
|
|
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
Quote: |
Getting error at the below command. Same command works for regular datasets creation, but for member dataset creation its failing. |
Is:
A) The value of targetDSN and sourceDSN the PDS name only?
B) or is the (member) included?
If B then that is your issue. You should allocate with just the PDS name. You can not allocate a member with bpxwydn or any utility (as far as I know).
To use code tags, I highlite the code below and click Code box above.
Code: |
ZFile.bpxwdyn("alloc fi(" + targetDD + ") da(" + targetDSN
+ ") like(" + sourceDSN + ") reuse new catalog msg(wtp)"); |
|
|
Back to top |
|
|
raminenibhanu
New User
Joined: 31 Jan 2022 Posts: 7 Location: United States
|
|
|
|
Dave,
Value of the target DSN & Source DSN are below and members included
SourceDSN : USER.PDS(TEST1)
targetDSN : USER.PDS(TEST3)
thanks
Bhanu |
|
Back to top |
|
|
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
I am not sure what all your code is trying to do, but you can not allocate a PDS with the (member) attached.
The PDS should be created NEW ONCE (without the member).
Then perhaps allocate as SHR afterwards (with the member),
then copy/write to to that allocated DD.
I say perhaps because the information vague. |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2141 Location: USA
|
|
|
|
raminenibhanu wrote: |
CODE TAGS ?
Getting error at the below command. Same command works for regular datasets creation, but for member dataset creation its failing.
ZFile.bpxwdyn("alloc fi(" + targetDD + ") da(" + targetDSN
+ ") like(" + sourceDSN + ") reuse new catalog msg(wtp)"); |
1) Carefully print the result of this terrible concatenation producing the parameter for BPXWDYN
2) Run as many tests as needed to execute this resulting ALLOC command manually, in TSO environment.
3) When you are sure the ALLOC command itself is working as desired, you can start incorporating all your garbage into your terrible code.
4) Do not forget to trace carefully every intermediate step: the clear input and output produced by every your statement.
5) Do not suppose that forum members have to do your own job for you. You have to present all detailed information to the forum, and - to be polite - you must format all your input in a readable way, not in the form as if it was taken from a trash. |
|
Back to top |
|
|
raminenibhanu
New User
Joined: 31 Jan 2022 Posts: 7 Location: United States
|
|
|
|
Alloc cmd :alloc fi(SYS00009) da(USER.PDS(TEST6)) like(USER.PDS(TEST1)) reuse new catalog msg(wtp) |
|
Back to top |
|
|
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
Quote: |
Alloc cmd :alloc fi(SYS00009) da(USER.PDS(TEST6)) like(USER.PDS(TEST1)) reuse new catalog msg(wtp) |
Let us know if this statement is clear?
You can not allocate a pds(with member) as NEW. |
|
Back to top |
|
|
raminenibhanu
New User
Joined: 31 Jan 2022 Posts: 7 Location: United States
|
|
|
|
what are the options that I need to pass for PDS with member
reuse new catalog msg(wtp) -- tried it didnt work. |
|
Back to top |
|
|
raminenibhanu
New User
Joined: 31 Jan 2022 Posts: 7 Location: United States
|
|
|
|
reuse catalog msg(wtp) -- tried it didnt work. |
|
Back to top |
|
|
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
I am getting very tired here. This is my last try to help.
From my earlier post (did you read it?)
I am not sure what all your code is trying to do, but you can not allocate a PDS with the (member) attached as new.
1) The PDS should be created NEW ONCE (without the member).
2) Then perhaps allocate as SHR afterwards (with the member)
3) Then copy/write to to that allocated DD. |
|
Back to top |
|
|
raminenibhanu
New User
Joined: 31 Jan 2022 Posts: 7 Location: United States
|
|
|
|
thanks Dave for the information. Will try your recommendations. |
|
Back to top |
|
|
steve-myers
Active Member
Joined: 30 Nov 2013 Posts: 917 Location: The Universe
|
|
|
|
It is important to understand that specifying a member name in the data set name sent to BPXWDYN does not actually create the member.
To actually create the member you must then run a program that writes data to the "file" created by BPXWDYN. This program can be the program that calls BPXWDYN, or another program the specifies the "file" created by BPXWDYN. |
|
Back to top |
|
|
Pete Wilson
Active Member
Joined: 31 Dec 2009 Posts: 592 Location: London
|
|
|
|
Allocate the dataset without specifying the member name at the end.
Alloc cmd :alloc fi(SYS00009) da(USER.PDS) like(USER.PDS) reuse new catalog msg(wtp)
After it's created, then you can write to the dataset specifying a member name on the end USER.PDS(TEST6). In fact you have to write to it that way, otherwise it destroys the datasets directory making it unusable.
I suggest you read about the LIKE parameter as it may not work exactly as you expect. It can affect the way the SMS ACS routines work as well because some of the read only variable are not passed using LIKE
www.ibm.com/docs/en/zos/2.1.0?topic=statement-like-parameter |
|
Back to top |
|
|
|