Search found 11 matches

by tbrantley
Tue Feb 25, 2025 5:14 pm
Forum: General
Topic: Uploading Data
Replies: 1
Views: 35305

Uploading Data

Good morning!

I have a web program that allows a user to upload a file to the ifs. Then it does a CPYFRMIMPF to put the data into a temporary file for validation and processing.

What is the best way to attach the user to the records they uploaded?

Hopefully this makes sense!

Below is what I'm ...
by tbrantley
Wed Jun 19, 2024 3:07 pm
Forum: General
Topic: EPOCH Time
Replies: 1
Views: 16914

EPOCH Time

Good morning, Scott!

Is there a way to get epoch time via DB2?

Thanks,
Trent
by tbrantley
Tue Aug 01, 2023 6:14 pm
Forum: YAJL-ILE
Topic: Issue using yajl_saveBuf
Replies: 15
Views: 53096

Re: Issue using yajl_saveBuf

Thanks for all the help, Scott! I appreciate it!
by tbrantley
Tue Aug 01, 2023 2:51 pm
Forum: YAJL-ILE
Topic: Issue using yajl_saveBuf
Replies: 15
Views: 53096

Re: Issue using yajl_saveBuf

This is strange...

It's cutting off the first 4 characters from the front of the json when it copies data from buffer.

It should start like this.

{
"payorId": "company[09]",
jsonErr.PNG
jsonErr.PNG (20.36 KiB) Viewed 23058 times
by tbrantley
Sat Jul 29, 2023 6:22 pm
Forum: YAJL-ILE
Topic: Issue using yajl_saveBuf
Replies: 15
Views: 53096

Re: Issue using yajl_saveBuf

Thanks Scott! That worked!

Would you recommend doing anything different before I put clob data from buffer into the HTTP POST?

Program compiles correctly but I'm getting an SQL state of 01004 once it tries to POST data.

dcl-s JSONDataLength int(10);
dcl-c ToCCSID const(37);
dcl-s jsonData ...
by tbrantley
Fri Jul 28, 2023 9:06 pm
Forum: YAJL-ILE
Topic: Issue using yajl_saveBuf
Replies: 15
Views: 53096

Re: Issue using yajl_saveBuf

Sweet! I've been able to get this to work using yajl_copyBufStr()!!

I would like to be able to use the yajl_copyBuf function.

When I change my code to use the yajl_copyBuf function. I receive the error below.

Any ideas on what may be causing this?

dcl-s JSONDataLength int(10);
dcl-c ToCCSID ...
by tbrantley
Wed Jul 26, 2023 2:36 pm
Forum: YAJL-ILE
Topic: Issue using yajl_saveBuf
Replies: 15
Views: 53096

Re: Issue using yajl_saveBuf

Scott,

I really appreciate your help! I've got one more question for ya!

I'm moving the data from the copyBufStr function into a clob variable.

Once I try to use the clob variable inside the SQL statement I get the error below.

Length in varying-length, LOB, or XML host variable not valid ...
by tbrantley
Mon Jul 24, 2023 7:48 pm
Forum: YAJL-ILE
Topic: Issue using yajl_saveBuf
Replies: 15
Views: 53096

Re: Issue using yajl_saveBuf

Scott,

My goal was to hopefully be able to use the data from the buffer in SQL/HTTP functions.

SQL Webservices has a 32k variable size limit as far as I can tell.

I would like to send more than 32k when using the HTTP post function.

EXEC SQL
SELECT RESPONSE_MESSAGE, RESPONSE_HTTP_HEADER ...
by tbrantley
Sun Jul 23, 2023 6:56 pm
Forum: YAJL-ILE
Topic: Issue using yajl_saveBuf
Replies: 15
Views: 53096

Re: Issue using yajl_saveBuf

Scott,

I'm having trouble getting the yajl_copyBuf function to work. I've pasted some of my code below.

Do you see anything wrong with what I'm doing? Just to verify that the buffer was getting populated I tried using the yajl_copyBufStr and it works correctly.

dcl-proc Get_Buffer_Data;

dcl-s ...
by tbrantley
Tue Jul 18, 2023 2:45 pm
Forum: YAJL-ILE
Topic: Issue using yajl_saveBuf
Replies: 15
Views: 53096

Re: Issue using yajl_saveBuf

I figured it out Scott! I didn't realize that the parms had to be defined the exact same way.

I'm now able to successfully write Json created with YAJL functions to IFS directory.

Thanks,
Trent