Joined: 05 Jun 2005 Posts: 165 Location: Bangalore
If you dont declare the length variable in the linkage section, you may loose the first 2 bytes of data that you are passing through JCL as the program assumes the first 2 bytes to be the length of the data.
In the first program you are receiving all the variables that are passed through the main program. so, no problem.
In the second program you are not receiving all the variables that are passed through the main program. so, the data in C will be lost.
In the last program you are passing only two variables and receiving three variables. the last variable will carry junk data.
note : in the second and third case, you may get the errors S0C4 and S0C7 depending upon the use of the variable C.