to run a batch file in i5/OS
How to create file with extension .sql and run the same in i5/OS
Looking for relevant Microsoft Windows Whitepapers? Visit the SearchEnterpriseDesktop.com Research Library.
Koohiisan | Jun 27 2008 2:06PM GMT
Don’t forget REXX for scripting also. You’ll have to create a plain source member with REXX commands and use STRREXPRC to run it.
Jacky | Jun 28 2008 1:05AM GMT
can u tell me how to create a sql file in i5/Os.
I didn’t know what is rexx
Gilly400 | Jun 30 2008 9:04AM GMT
Hi,
If you mean a script for SQL, you can do the following (assuming you have a library called Yourlib, you can create a library using the command CRTLIB) :-
CRTSRCPF FILE(Yourlib/QSQLSRC)
/* This creates a source physical file, which can contain source members (in your case SQL scripts) */
WRKMBRPDM Yourlib/QSQLSRC
/* This should give you an empty list of source members */
Press F6 (Create) to add a source member, give it a name and description, the source member type isn't important for an SQL script, but you could use SQL so you know it's an SQL script */
You should now be in the SEU editor. Type in your SQL commands here and press F3 to exit and save when you're done.
Here’s a useful link for learning AS400/i5
Best regards,
Martin Gilbert.
Jacky | Jul 8 2008 10:33AM GMT
Thanks for your guidance.
i am able to create and execute a sql script.
But i am not able to have more than one sql statement in my source file.
Can you please help me in this scenario
Gilly400 | Jul 9 2008 12:32PM GMT
Hi,
It should work, can you post an example of what you’re trying to do?
Regards,
Martin.
Jacky | Jul 10 2008 7:05AM GMT
ya it works fine, I made a mistake and i found it. thank you very much.