Hello,
Just figured out what I was doing wrong. It seems we need to specify the length of the CHAIN-DATA field in the CHAIN-DATA-LENGTH variable. It's was not quite clear for me from the ICSF Application Programmer's Guide.
Here is how it's described:
chain_data_length
The length of the chain_data parameter. On output, the actual length of the
chaining vector will be stored in the parameter. This parameter is ignored if
the ICV selection keyword is ONLY.
Now, see how the cipher_text_length is described:
On input, this parameter specifies the size of the storage pointed to by the
cipher_text parameter. On output, this parameter has the actual length of the
text stored in the buffer addressed by the cipher_text parameter.
chain_data_length is an input parameter when calling CSNBSYE but the manual does not quite clearly explain that as it's done for the cipher_text_length.
Regards
Deepak
Deepak.Paul.John