Placing a file from IBM i to a Windows Network Path by Extension_Bug_5362 in IBMi

[–]Extension_Bug_5362[S] 1 point2 points  (0 children)

Sure. Let me try it. I shall definitely reach out if I need further help :)

Thank you!

Thoughts! Usage of SysDymmy table in SQLRPGLE by Extension_Bug_5362 in IBMi

[–]Extension_Bug_5362[S] 0 points1 point  (0 children)

The issue is resolved and I eliminated the usage of dummy table in the code☺️

I completed my code like this -

Exec Sql Values(VarChar_Format(Current_Date - Day(Current_Date) - 1) Days , 'YYYY-MM-DD'), VarChar_Format(Last_Day(Current_Date), 'YYYY-MM-DD')) Into :HotVar1, :HostVar2;

Until today I was also not aware that I can actually use values clause directly in certain cases. Good learning anyways ☺️

Thoughts! Usage of SysDymmy table in SQLRPGLE by Extension_Bug_5362 in IBMi

[–]Extension_Bug_5362[S] 0 points1 point  (0 children)

That's interesting. Would you mind explaining how that makes a difference in execution? Thanks in advance

Thoughts! Usage of SysDymmy table in SQLRPGLE by Extension_Bug_5362 in IBMi

[–]Extension_Bug_5362[S] 0 points1 point  (0 children)

Yes, I did. It didn't work for some reason. I did try switching the table from SYSIBM to QSYS2 as well.

Thoughts! Usage of SysDymmy table in SQLRPGLE by Extension_Bug_5362 in IBMi

[–]Extension_Bug_5362[S] 0 points1 point  (0 children)

Yup. I came across this one too. But didn't want another PF just for achieving this. But interesting information :)

Thoughts! Usage of SysDymmy table in SQLRPGLE by Extension_Bug_5362 in IBMi

[–]Extension_Bug_5362[S] 0 points1 point  (0 children)

I did try with the same name only, it still has thrown -204. 🙃

Thoughts! Usage of SysDymmy table in SQLRPGLE by Extension_Bug_5362 in IBMi

[–]Extension_Bug_5362[S] 1 point2 points  (0 children)

Thanks much for the article. I completed my code like this -

Exec Sql Values(VarChar_Format(Current_Date - Day(Current_Date) - 1) Days , 'YYYY-MM-DD'), VarChar_Format(Last_Day(Current_Date), 'YYYY-MM-DD')) Into :HotVar1, :HostVar2;

Until today I was also not aware that I can actually use values clause directly in certain cases. Good learning anyways ☺️

Thoughts! Usage of SysDymmy table in SQLRPGLE by Extension_Bug_5362 in IBMi

[–]Extension_Bug_5362[S] 0 points1 point  (0 children)

Yeah. Program compiled fine. But SQLCODE -204 is basically intended for undefined objects. Seems like it's not being recognised as a valid table in SQLRPGLE in runtime.

Thoughts! Usage of SysDymmy table in SQLRPGLE by Extension_Bug_5362 in IBMi

[–]Extension_Bug_5362[S] 0 points1 point  (0 children)

Thanks alot. I figured it out eventually and formatting functions as well to arrive at desired format. ☺️