Subscribe to keep this site alive! Under new management but as always, still 100% FREE. Anyone with the IBM i is a friend of ours.
The Challenge: A program call runs well in the software, but when doing it in the command line, it does not work.
The Solution: When calling programs in the command line, the system does not know what are the data types of the vales being sent. The system in fact only sends beginning pointers to the program being called. For this particular problem, there was no problem with the 9th parameter since there is a succeeding one which will limit the extent of the value being passed. The problem lies on the last parameter. Since, the program was expecting 63 bytes, it tried to read all of them starting from the known pointer (grabbing some garbage in the process. To fixed it fill the last parameter with trailing blanks up to the last byte. Or define the field in a CLP and pass the field to the program.
Do you have a new CHALLENGE? Let us know HERE.