I've never tried to modify QMNSAVE but I'm pretty well versed in CL and if I understand you correctly you're doing something like example #1 in the source section. In that example the SAVLIB is trying to specify two volume names in the VOL parameter using one variable. If so then your problem is a restriction of CL list parameters when used with variables. Even though there are two distinct volume IDs in the &VOL parameter the CL command will treat them as a single name when it should be two. As IBM likes to say "Results will be unpredictable." There are two things you can do. If you're always going to have just two volumes then you could code it like example #2 in the source section. Here there are two separate &VOL variables which CL would recognize as two distinct volume IDs. I'm using two variabels in the example but of course you could use more if you need to. If your program never knows the number of volumes it will use at any one time you can do it like example #3 in the source section. This is the time-honored solution to the CL list-parameter connundrum, especially when dealing with things like library list parameters. Hope this helps.
Code
Code
Comment