|
Hi Reeve,
Thank you for taking the time to reply.
The statement with "dcl-ds arTransactions ..." won't work?
Yours truly,
Glenn Gundermann
Email: glenn.gundermann@xxxxxxxxx
Cell: (416) 317-3144
---
On Sun, 24 Apr 2022 at 19:17, Reeve <rfritchman@xxxxxxxxx> wrote:
arTransactions has to be defined--where's the definition? Its name isstructure.
longer than 10 characters, so it must be a program-defined data
or
SQL doesn't make them automatically.
\reeve
On Sun, Apr 24, 2022 at 4:07 PM Glenn Gundermann <
glenn.gundermann@xxxxxxxxx>
wrote:
Hi folks,not
After not working with RPG and embedded SQL for four years, I feel I'm
starting all over and some of it is not easy.
Basically, with a SQLRPGLE member, I'm trying to define a DS and using
FETCH NEXT FROM cursorName INTO dsName.
it won't compile and I'm getting:
SQL0312 30 105 Position 34 Variable ARTRANSACTIONS not defined or
usable. Reason: No declaration for the variable
exists,
the declaration is not within the current scope,
type.the
variable does not have an equivalent SQL data
works
Below are parts of the program. In the compile listing, it shows
ARTRANSACTIONS as undefined. What am I missing? The SQL statement
relatedwhen I copy it into Run SQL Scripts.
dcl-f vascct disk usage(*output);
dcl-ds arTransactions extname('VASCCT': *OUTPUT) qualified;
end-ds;
exec sql
DECLARE arCursor CURSOR FOR long-sql-select-statement;
exec sql
OPEN arCursor;
exec sql
FETCH NEXT FROM arCursor INTO :arTransactions;
dow sqlState = '00000';
write vascctr arTransactions;
exec sql
FETCH NEXT FROM arCursor INTO :arTransactions;
endDo;
exec sql
CLOSE arCursor;
Yours truly,
Glenn Gundermann
Email: glenn.gundermann@xxxxxxxxx
Cell: (416) 317-3144
--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription
--questions.--
Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.
Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.
Help support midrange.com by shopping at amazon.com with our affiliate
link: https://amazon.midrange.com
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.