Though you didn't state it, I presume your procedure is structured something like this --
//A PROC
//S1 EXEC PGM=...
//dd1 DD ...
//dd2 DD ...
//SYSIN DD ...
//S2 EXEC PGM=...
//dd3 DD ...
//dd4 DD ...
//SYSIN DD ...
Notice that each step has a unique stepname. JCL to call the procedure and override some of the DD statements would look like this --
//TEST EXEC A
//S1.SYSIN DD ...
//S2.SYSIN DD ...
The overriding DD statements clearly identify the step and specify the DD name to override, but the steps in the override
must be in the same order as the steps in the original procedure. In other words --
//TEST EXEC A
//S2.SYSIN DD ...
//S1.SYSIN DD ...
will not work.
The rules about how the parameters on the original DD statement are merged with parameters in the overriding DD statement are somewhat arcane in detail, but generally make sense in practice, so you should analyze the documentation if you have questions or something does not seem to work right.