I am trying to use QHSMMOVL API in a CLLE program to move libraries between ASP's (1-32) and iASPS(33-256). I keep getting the error CPFB79E - Auxiliary storage pool does not exist or CPF3C3C Value for parameter not valid. I think it has something to do with the Target auxiliary storage pool (ASP) number parameter defined as BIN 4.
I originally used CLLE to call that API, i used %BIN to convert a 4 character field to binary then i passed that variable to the target auxiliary storage pool parameter, didn't work.
Alternatively I used RPGLE to call the API, and defined the field as 4 B 0 as part of a data structure then passed that to the API, still didn't work.
Does someone happen to have a sample code that correctly defines and uses the QHSMMOVL API parameters to make it work correctly? What is the correct way of defining and using the BIN parameter for the target ASP parameter? Should i use a CHAR or DEC variable and pass it to the BIN target ASP parameter? What is the correct length of the variable that i should use to make this work? I am using IBM i v7r2 with *SYSBAS, ASP 2, and iASPS configured and varied on.
Thanks in advance.
Software/Hardware used: IBM i v7r2 with iASPS configured and varied on