Search found 24 matches

by sbehera
Tue Mar 22, 2022 6:51 pm
Forum: HTTPAPI
Topic: http_string not returning failure details
Replies: 5
Views: 3040

Re: http_string not returning failure details

Works perfectly, thanks for help.
by sbehera
Mon Mar 21, 2022 6:07 pm
Forum: HTTPAPI
Topic: http_string not returning failure details
Replies: 5
Views: 3040

Re: http_string not returning failure details

I have made it to work by defining another fixed length character variable and moving data from rtnVal to this field and use it in call to yajl_buf_load_tree and is working but want to avoid this extra steps? D result s 99999A Inz D rtnVal s 99999A varying rc = http_req( 'POST': url: *omit : rtnVal ...
by sbehera
Mon Mar 21, 2022 5:56 pm
Forum: HTTPAPI
Topic: http_string not returning failure details
Replies: 5
Views: 3040

Re: http_string not returning failure details

http_req looks right option for me but little issue not able to figure out. http_req expecting a variable in result string of type char with varying which i did. After i get result, i am using yajl_buf_load_tree to parse the value. D rtnVal s 99999A varying rc = http_req( 'POST': url: *omit : rtnVal...
by sbehera
Fri Mar 18, 2022 7:29 pm
Forum: HTTPAPI
Topic: http_string not returning failure details
Replies: 5
Views: 3040

http_string not returning failure details

Hello, i am doing http_string call as follow Monitor; result = http_string( 'POST': url: postdata: 'application/json') On-Error *ALL; If result <> ' '; ... EndIf; EndMon; When there these is issue in the message i am sending, it raises exception and control goes to On-Error section and result field ...
by sbehera
Tue Jan 25, 2022 9:44 pm
Forum: Other ScottKlement.com Tools
Topic: how to decode base64 encoded zpl data back to ASCII/EBCDIC
Replies: 10
Views: 20793

Re: how to decode base64 encoded zpl data back to ASCII/EBCDIC

Data was not getting copied to dmyprtfl because i did not specify full path in toobj parameter. Changed to as given below and it works fine. I am able to send zpl to spool file. cmd = 'CPY OBJ(' + #Quote + stmf + #Quote + ') ' + 'TOOBJ(' + #Quote + '/qsys.lib/test1.lib/' + 'dmyprtfl.file/dmyprtfl.mb...
by sbehera
Tue Jan 25, 2022 8:55 pm
Forum: Other ScottKlement.com Tools
Topic: how to decode base64 encoded zpl data back to ASCII/EBCDIC
Replies: 10
Views: 20793

Re: how to decode base64 encoded zpl data back to ASCII/EBCDIC

Hi Scott, data written to ifs file i do see as zpl data but when i check value of variable ZplOut using debug, after base64_Decode is called it still shows as binary or hexadecimal. IFS file shows data in UTF-8 because file is created with CCSID 1208? I need to print this zpl data to spool file to s...
by sbehera
Mon Jan 24, 2022 7:09 pm
Forum: Other ScottKlement.com Tools
Topic: how to decode base64 encoded zpl data back to ASCII/EBCDIC
Replies: 10
Views: 20793

Re: how to decode base64 encoded zpl data back to ASCII/EBCDIC

Here is part of the code that is relevant to find the issue: After base64_decode called when i look at value of ZplOut using debug, data looks like binary which i am giving below (value of B64In value before call to base64 routine was given in original post). D JdsNode s like(yajl_Val) D oNode s lik...
by sbehera
Sat Jan 22, 2022 2:07 am
Forum: Other ScottKlement.com Tools
Topic: how to decode base64 encoded zpl data back to ASCII/EBCDIC
Replies: 10
Views: 20793

Re: how to decode base64 encoded zpl data back to ASCII/EBCDIC

This is my base64 encoded string. Talking to folks where i am getting this, zpl text is base64 encoded (this is not a label image). When i put this base64 encoded string in the website https://www.base64decode.org/, it does get converted to zpl. Does base64_decode routing should able to do same? Bas...
by sbehera
Fri Jan 21, 2022 6:30 pm
Forum: Other ScottKlement.com Tools
Topic: how to decode base64 encoded zpl data back to ASCII/EBCDIC
Replies: 10
Views: 20793

how to decode base64 encoded zpl data back to ASCII/EBCDIC

Hi all,
i have base64 encoded zpl (label to print using zebra printer) getting from HTTPAPI call. Using base64_decode to decode and the result what i see \is not in ASCII/EBCDIC format, looks like may be in binary format. Need to convert to the format that can be print to a spool file. Please help.
by sbehera
Fri Jan 21, 2022 6:05 pm
Forum: YAJL-ILE
Topic: lexical error: invalid char in json text error using yajl_buf_load_tree
Replies: 7
Views: 11785

Re: lexical error: invalid char in json text error using yajl_buf_load_tree

Scott,
thanks for help. As you mentioned, yajl_buf_load_tree works fine when i changed input variable type from varchar to regular character. Little bit looked into DATA-INTO but because i am in v7r1, that can be problem.