Hello code400 forum!
Firstly I think I should give a little background about myself.
I am in no way a professional in any aspect of IT, I am just an end user who learns as much as I can about the systems I use to improve things / make my life easier.
I began using an AS/400 exactly a year ago today, which has been configured and maintained for years by a company who no longer provide support or development. This leaves me in a quandary as the AS/400 is extremely stable and reliable.... If it isn't broken...
So, in the past I've used SQL to query and update records in a database, I am by no means an expert in SQL either, but I am fairly comfortable with the syntax & have been using it via STRSQL in the as400. Obviously this is fairly cumbersome for batch queries/updates. So I began using FDF/DTT/DTF files, which has been fantastic.
However (afaik) it doesnt support updating one "column" in a row of a given table (file?)
For example, in SQL;
-- If this can be done using FDF/DTT then I'd love to know how! Anyway......
Obviously the best solution is to write RPG/CLP to do what I require, this will then be portable for anything new in the future, given I know the structure of SQL statements - I looked into this and as I understand it, AS/400 does support SQL to RPG. Great!
The wall I have hit is;
How do I take an SQL statement, turn it into an RPG and compile it.
From what I've read this week trying to get it to work I need to invoke an SQL compiler and the RPG compiler.
Ive seen the latter in STRPDM - and I have written a basic RPG using a guide I found online, which worked, so there's something to go on....
I just dont know where I put the SQL into (and changes I may need to make)
How to then compile it into an RPG via an SQL compiler.
I have looked and looked, but I really don't know what I'm supposed to do next and could really do with some guidance, I have absolutely no concerns reading up on the menus that I need to use, if I knew them!
Thanks
Steven
Firstly I think I should give a little background about myself.
I am in no way a professional in any aspect of IT, I am just an end user who learns as much as I can about the systems I use to improve things / make my life easier.
I began using an AS/400 exactly a year ago today, which has been configured and maintained for years by a company who no longer provide support or development. This leaves me in a quandary as the AS/400 is extremely stable and reliable.... If it isn't broken...
So, in the past I've used SQL to query and update records in a database, I am by no means an expert in SQL either, but I am fairly comfortable with the syntax & have been using it via STRSQL in the as400. Obviously this is fairly cumbersome for batch queries/updates. So I began using FDF/DTT/DTF files, which has been fantastic.
However (afaik) it doesnt support updating one "column" in a row of a given table (file?)
For example, in SQL;
Code:
update warefil_ml/warpall set clsspm = '74' where pal#pm = '1005520062'
Obviously the best solution is to write RPG/CLP to do what I require, this will then be portable for anything new in the future, given I know the structure of SQL statements - I looked into this and as I understand it, AS/400 does support SQL to RPG. Great!
The wall I have hit is;
How do I take an SQL statement, turn it into an RPG and compile it.
From what I've read this week trying to get it to work I need to invoke an SQL compiler and the RPG compiler.
Ive seen the latter in STRPDM - and I have written a basic RPG using a guide I found online, which worked, so there's something to go on....
I just dont know where I put the SQL into (and changes I may need to make)
How to then compile it into an RPG via an SQL compiler.
I have looked and looked, but I really don't know what I'm supposed to do next and could really do with some guidance, I have absolutely no concerns reading up on the menus that I need to use, if I knew them!
Thanks
Steven
Comment