Store a C string into a COBOL PIC X field
| 473 | |
| 474 | // Store a C string into a COBOL PIC X field |
| 475 | static void StringToCobol(argument_entry *arg, const ISC_UCHAR *s) |
| 476 | { |
| 477 | if (arg->a_address) |
| 478 | { |
| 479 | memset(arg->a_address, ' ', arg->a_length); |
| 480 | memmove(arg->a_address, |
| 481 | s, |
| 482 | strlen((char *)s) > arg->a_length ? arg->a_length : strlen((char *)s)); |
| 483 | } |
| 484 | } |
| 485 | |
| 486 | // Store a status vector into a Cobol array of BINARY(4) fields |
| 487 | static void StatusToCobol(argument_entry *arg, const ISC_STATUS *stat) |