Hello Scott,
I am copying two JSONs to the IFS as follows:
S_Dest = '/HOME/SAPINT/' + PMINTT + '_' + %TRIM(PMEVNT) + '_' + PMVIN
+ '.json';
1) YAJL_SAVEBUF('/TMP/SVSSAPINT.JSON':S_ERRMSG);
2) YAJL_SAVEBUF(S_DEST : S_ERRMSG);
In the 2) I am concatenating the name of the json to save in a different location /home/sapint/
The first one I can open in Filezilla, but the second one I can't, getting the following error:
Response: 550 Unable to find file /home/SAPINT/RTR_DEALER_DLR_JTDBCMFE0R3039774.json
Error: Critical file transfer error
I have edited the authorization without success.
How I can access?
If I go to WRKLNK and rename the file changing the name even though the same, it woks, I can open in Filezilla.
What makes different to the first one?
Coded character set ID is 1208 for both file.
Any help is appreciated.
Thank you,
Jorge Rengel
YAJL_SAVEBUF Question
-
- Site Admin
- Posts: 872
- Joined: Sun Jul 04, 2021 5:12 am
Re: YAJL_SAVEBUF Question
How is S_Dest defined?
If S_Dest is a fixed-length character variable, you'll need to add %TRIM() to the call to YAJL_SAVEBUF. (However, I never recommend using fixed-length character variables for IFS pathnames.)
If you look in the IFS, does the /home/SAPINT/RTR_DEALER_DLR_JTDBCMFE0R3039774.json file exist? Are there any extra blanks in the filename, or other unexpected characters?
If S_Dest is a fixed-length character variable, you'll need to add %TRIM() to the call to YAJL_SAVEBUF. (However, I never recommend using fixed-length character variables for IFS pathnames.)
If you look in the IFS, does the /home/SAPINT/RTR_DEALER_DLR_JTDBCMFE0R3039774.json file exist? Are there any extra blanks in the filename, or other unexpected characters?
Re: YAJL_SAVEBUF Question
Hi Scott,
S_Dest is defined as you can see below
Dcl-S S_Dest Char(70) Inz;
RTR_DEALER_DLR_JTDBCMFE0R3039774.json exists in /home/SAPINT. No extra blanks in the filename and no other unexpected character.
Thanks,
Jorge Rengel
S_Dest is defined as you can see below
Dcl-S S_Dest Char(70) Inz;
RTR_DEALER_DLR_JTDBCMFE0R3039774.json exists in /home/SAPINT. No extra blanks in the filename and no other unexpected character.
Thanks,
Jorge Rengel
Re: YAJL_SAVEBUF Question
Like Scott said you will probably need to trim the string or change it to VARYING. If it's CHAR(70) and only 10 character in the path name it will think it's 60 blank spaces at the end.
-
- Site Admin
- Posts: 872
- Joined: Sun Jul 04, 2021 5:12 am
Re: YAJL_SAVEBUF Question
Code: Select all
YAJL_SAVEBUF(%TRIM(S_DEST) : S_ERRMSG);
Re: YAJL_SAVEBUF Question
Hi Scott, thomprl
Thanks for your answers. Sorry for the delay to update you guys.
I did on the same day (Nov/13) the changes as you can see below and everything worked well. We are able to open the JSON files in the IFS location.
Dcl-S S_Dest VarChar(70) Inz;
YAJL_SAVEBUF(%TRIM(S_DEST) : S_ERRMSG);
Regards,
Jorge Rengel
Thanks for your answers. Sorry for the delay to update you guys.
I did on the same day (Nov/13) the changes as you can see below and everything worked well. We are able to open the JSON files in the IFS location.
Dcl-S S_Dest VarChar(70) Inz;
YAJL_SAVEBUF(%TRIM(S_DEST) : S_ERRMSG);
Regards,
Jorge Rengel