All,
FYI - I was able to use QSYS2.IFS_READ table function to read data from IFS file.
Search found 15 matches
- Thu Apr 17, 2025 2:12 pm
- Forum: YAJL-ILE
- Topic: Read Payload from IFS File to a string in RPGLE
- Replies: 5
- Views: 830
- Wed Apr 16, 2025 7:13 pm
- Forum: YAJL-ILE
- Topic: Read Payload from IFS File to a string in RPGLE
- Replies: 5
- Views: 830
Re: Read Payload from IFS File to a string in RPGLE
Another related question: The objective here is to send a payload (JSON/XML) from an IFS path (file is in .txt format) to an external API using http_url_post - for which trying to get the full payload into a string. But can we directly send the IFS file to external API, using http_url_post or a diff...
- Wed Apr 16, 2025 6:45 pm
- Forum: YAJL-ILE
- Topic: Read Payload from IFS File to a string in RPGLE
- Replies: 5
- Views: 830
Re: Read Payload from IFS File to a string in RPGLE
Additionally, the IFS file is with ".txt" extension. Sample data in IFS file: {"purchaseOrder":[{"poNumber":99999909,"branch":444,"shipVia":"","requisitionBy":" ","dateToRcv":"2025-04-24","poDeta...
- Wed Apr 16, 2025 4:48 pm
- Forum: YAJL-ILE
- Topic: Read Payload from IFS File to a string in RPGLE
- Replies: 5
- Views: 830
Read Payload from IFS File to a string in RPGLE
Hi, Would like to check on this below scenario, please assist. Thanks! Trying to read a JSON payload from an IFS file to a string. But ContentLength comes as 0. Any thoughts on what am I missing? Dcl-S docNode like(yajl_val); Dcl-S errmsg varchar(500) inz(''); Dcl-S ErrorMessage varchar(1000) inz(' ...
- Fri Feb 21, 2025 2:54 pm
- Forum: YAJL-ILE
- Topic: Receive & Transfer JSON Payload without any change
- Replies: 9
- Views: 232295
Re: Receive & Transfer JSON Payload without any change
Sure Scott, will explore those options.
Thanks for your suggestions!
Thanks for your suggestions!
- Thu Feb 20, 2025 7:57 pm
- Forum: YAJL-ILE
- Topic: Receive & Transfer JSON Payload without any change
- Replies: 9
- Views: 232295
Re: Receive & Transfer JSON Payload without any change
Never mind Scott, used http_url_post and got it worked. Thanks for your inputs!
- Thu Feb 20, 2025 6:02 pm
- Forum: YAJL-ILE
- Topic: Receive & Transfer JSON Payload without any change
- Replies: 9
- Views: 232295
Re: Receive & Transfer JSON Payload without any change
Scott,
Tried to use http_string, but it resulted 500 error. Could be because no option to add headers with credentials (Client id, Client secret).
http_string( Method: url: OutBuf : 'application/json' );
Thanks!
Tried to use http_string, but it resulted 500 error. Could be because no option to add headers with credentials (Client id, Client secret).
http_string( Method: url: OutBuf : 'application/json' );
Thanks!
- Thu Feb 20, 2025 4:36 pm
- Forum: YAJL-ILE
- Topic: Receive & Transfer JSON Payload without any change
- Replies: 9
- Views: 232295
Re: Receive & Transfer JSON Payload without any change
Yes Scott, got the payload in a string.
Now I would like to send this string (which consists of JSON payload to be sent out) to outside world (URL endpoint) and save it in a file in IFS. Which YAJL API is more effective to do this transfer? Please suggest.
Thanks!
Now I would like to send this string (which consists of JSON payload to be sent out) to outside world (URL endpoint) and save it in a file in IFS. Which YAJL API is more effective to do this transfer? Please suggest.
Thanks!
- Thu Feb 20, 2025 2:10 pm
- Forum: YAJL-ILE
- Topic: Receive & Transfer JSON Payload without any change
- Replies: 9
- Views: 232295
Re: Receive & Transfer JSON Payload without any change
After doing some testing, would like to know if there is a way to copy the string (outbuf = payload received) into buffer or sending the string directly to target is the only way? Please advise.
Thanks!
Thanks!
- Wed Feb 19, 2025 2:23 pm
- Forum: YAJL-ILE
- Topic: Receive & Transfer JSON Payload without any change
- Replies: 9
- Views: 232295
Re: Receive & Transfer JSON Payload without any change
Thanks for your response Scott. Mentioned only outbound, because Inbound code already was working for a different project. From the payload received from inbound, trying to create same new payload to send to outbound. Have not tested the outbound yet and planning to do it today. Would like to know i...