Iseries Sql Manual
- Iseries Sql Manual Free
- Sql On As400
- Iseries Sql Manual Software
- As400 Manuals Online
- Iseries Sql Manual Download
(Let me preface this by saying I am extremely new to the AS400 and RPGLE and CL Programming. I know SQL fairly well, but not when in use with the AS400)
This seems like it should be very simple.
Magnetic, optical, chemical, manual, or otherwise, without prior written permission of Tivoli Systems. The document is not intended for production and is furnished “as is” without warranty of any kind.All warranties on this document are hereby disclaimed including the warranties of merchantability and fitness for a particular purpose. Iseries Sql Manual V6r1 We run JD Edwards World 9.2 on an IBM iSeries/AS400 V6R1 machine. I was thinking I could write a quick php file that would run an sql query to parse the results to a csv in IFS and vice. Contents About DB2 for i SQL Reference. Xi About SQL r efer ence. Xi Standar ds compliance. Xi Assumptions r elating to examples of SQL.
At Year End we have to update our warehouse table to the new current year. This has been a manual process, to go to STRSQL and run
This has been done by the same person for the past 40 years and they are now retiring this year. My boss wants this to become a CL Program where it is all done without someone manually running the STRSQL command and it can be integrated into the Year End Process.
All the CL Program has to do is prompt for what year you want to change the warehouse files too and upon entering the date into the screen it would run the SQL program and update the records according to the SQL command.
Can someone please point me into a direction where I might be able to learn more about using the CL program to accomplish this process?
Thank you.
Thomas J Cusick, Systems Programmer
3 Answers
Assuming you're on a currently supported version of IBM i..
IBM added a RUNSQL CL command a few versions ago...
A complete CL program would thus look like so:
But it'd be better if you passed in the year as a parameter...
CharlesCharlesA very simple example using RPGLE and DDS instead of CL or QMQRY would look like this:
Iseries Sql Manual Free
The display file:
RPGLE
This defaults the current year into the prompt, and provides a message when the entered year deviates too far from the current year. Not as quick and dirty as the QMQRY solution, but really not all that complex either, and once you have it, you can copy and change the prompt, validation, and SQL to your hearts content.
Thanks Charles, this helped...In the mean while my boss came to me with an example of what he actually was looking for and the following is what I ended up doing.
First I created a File CLD@91Q1 of Type *QMQRY, this file holds the actual SQL statement...
UPDATE &GWHRE.RCO SET CCFSCY = &SELYEAR WHERE CRSTS = 'A'
Sql On As400
Second I created a XCLP that calls the CLD@91Q1 Query
and Finally I created the XDSPF file to give the user a place to enter the needed information.
Looking at this it appears to be kinda convoluted but this is what the Boss wanted so this is what the boss got.
Iseries Sql Manual Software
I think it's a good exercise and I can see using this kind of process in more complex SQL statements.