SQL

mfnu007

Member
List,

We have several SQL statements that create a report, that we run
periodically.
I would like to put these statements into a program format, so that we could
run them on SLEEPER.

I am having trouble getting a clean compile. Has anyone done this or have
any experience with this subject? I have looked at several programs within
JDE that use embedded SQL and P98A5_A6DW, but I am still having trouble.
Below is a sample statement, that I need to get into a program format..

Any help would be appreciated.

SELECT YAHMCU, YAPOS, YAAN8, YAEST, YAPAST, YADST, YAALPH FROM
F060116 WHERE YAPAST > 'Z' and not exists (Select * from F08101
where HPFY = 01 and HPHMCU = YAHMCU and HPPOS = YAPOS)
ORDER BY YAHMCU, YAPOS

Colette J. Culver
Programmer/Analyst
Metropolitan Government of Nashville and Davidson County
Phone 615.880.2812
Fax 615.880.2805




Colette J. Culver
System Advisor I
Metropolitan Government of Nashville
& Davidson County
615.880-2812
 
Hey lady............

Are you using SVR to compile your program or PDM or how? The regular
CRTRPGPGM will not work with SQL statements in them. On SVR the
Maint/RSTDSP needs to be an S and the Gen Level at 21.
Are these set to that?

I have a question for you about Focus too.

Jim
 
Colette,
I've used STRQM option 1 to enter a query like your sample then compiled a CL pgm that included the cmd STRQMQRY QMQRY(&my_query) to get a report later by submitting the CLP with parameters SCDDATE & SCDTIME specified. This was easier for me than including SQL statements in the RPG pgm because there's a function key while in the Query Manager query that will check synatax. Debbie
 
Hello
There are several ways u could do this.
Steps.
1.Use Standard IBM Command on menu that submits jobs
to sleeper.(RUNSQLSTM).
2.Code this in a TXT MBR and submit using above
RUNSQLSTM.

2nd Procedure.
Build a Normal Procudure in TXT member
1.Submit a normal call.


If u want to use a RPG , use embedded SQL and on SVR
change program setting..

Hope this helps.

Let me know..



--- colette_culver55 <[email protected]>
wrote:
http://www.jdelist.com/ubb/showflat.php?Cat=&Board=W&Number=35741


__________________________________________________

Sef van den Nieuwelaar
Australia
B732 on NT, XE on NT/Oracle, B732/A73 on AS400, B733 on NT
 

Similar threads

Replies
3
Views
2K
Jim_rubino
Back
Top