Page 1 of 1

Got problem using BPX1PCT to define aggregate

PostPosted: Thu Aug 19, 2021 4:45 pm
by chong_zhou
Hi guys,

I need to programmatically define aggregates. It is similar to the following USS command:

zfsadm define -aggregate ...


But I need to do it in my program. According to IBM's doc, the USS callable service "BPX1PCT" should work for my case.

The doc: (page 252)
https://www-01.ibm.com/servers/resourcelink/svc00100.nsf/pages/zOSV2R3SC236887/$file/ioea700_v2r3.pdf

But the API is failing with error:

RC=121 (EINVAL: The parameter is incorrect)
RSN=EF0462D5 (Description: Syscall_parmlist bad offset at parms2.)
Action: The offset at parms2 must contain the correct offset for the required parameters.


Even if I directly copied the sample code from the doc and ran it, it failed with the same error.

I found out that no matter what value I assign to the "parms2", it just fails with the same error unless I gave it a 0. However, with "parms2" being 0, the API neither produced error code nor did the real work (the aggregate data set wasn't created).

Do you guys have any experience using BPX1PCT? Would you have any ideas or suggestions for me? Thanks.

Or, do you know any other way to programmatically create aggregate data sets? By "aggregate data sets", I mean the linear VSAM data set that can be mounted as a filesystem in the USS. Many thanks.

--------------------------

By the way, your suggestions or ideas can be based on both HLASM and C or metal-C.

Re: Got problem using BPX1PCT to define aggregate

PostPosted: Thu Aug 19, 2021 6:48 pm
by chong_zhou
Problem resolved. The sample code in IBM's doc has an error that made the code fail to work and the rc/rsn indicated totally different reasons that misled me in the troubleshooting.

I have no privilege to delete this topic, so I'd like to ask the admin to kindly delete this. Thanks.