Broadcom Mainframe Software Community

 View Only

 appending text to blogs

Jonathan Hardy's profile image
Jonathan Hardy posted Apr 13, 2021 06:02 AM
hi all,

I'm having problems trying to append text (var length char 4000) to a BLOB.

Here's a sample of my code:

// append input var length string into blob
int rc = 0;
long *succ;
TIRLOB_HANDLE* phlob = &##OUT.WS_BLOB.GENERIC_4MB##;
void* pbuff = &##IN_OMEGA.CSA_GENERIC_WORK_SET.GENERIC_TEXT_4000##;
rc = TIRLBAB(
phlob,
4194304,
pbuff,
##LOCAL_LEN.CSA_GENERIC_WORK_SET.GENERIC_NUMERIC_4##,
succ);

##OUT_RC.CSA_GENERIC_WORK_SET.GENERIC_NUMERIC_11## = rc;
##OUT_SUCC.CSA_GENERIC_WORK_SET.GENERIC_NUMERIC_11## = *succ;

curiously, this *seems* to work OK in trace based on values in RC and SUCC, but when run non-trace, it simply halts after execution of the above , which was coded using inline C.

imports/exports are :

2 | IMPORTS:
3 | Work View in_omega csa_generic_work_set (optional,transient,import only)
4 | generic_text_4000 (optional)
5 | EXPORTS:
6 | Work View out_succ csa_generic_work_set (transient,export only)
7 | generic_numeric_11
8 | Work View out_rc csa_generic_work_set (transient,export only)
9 | generic_numeric_11
10 | Work View out ws_blob (transient,imported)
11 | generic_4mb


Any help appreciated!
Jonathan Hardy's profile image
Jonathan Hardy
update - haven't been able to resolve problem above, but using an alternative function I was able to get a successful result:

int rc = 0;
TIRLOB_HANDLE* srclob = &##IN_SRC.WS_BLOB.GENERIC_4MB##;
TIRLOB_HANDLE* dstlob = &##OUT_DEST.WS_BLOB.GENERIC_4MB##;
rc = TIRLBAP(
dstlob,
4194304,
srclob);

##OUT_RC.CSA_GENERIC_WORK_SET.GENERIC_NUMERIC_11## = rc;
Lynn Williams's profile image
Broadcom Employee Lynn Williams

Hi @Jonathan Hardy,
I believe you meant this question to go to the CA Gen Community​. I see you have a workaround for the problem but I will ask for the thread to be moved to the Gen Community.

Regards,

Lynn