× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi All,



What am I doing wring here, when I compile the program containing this procedure I get an error stating that numOfRows and patientInfo are not defined or unusable. Any ideas?



        dcl-proc generateReports;

            dcl-pi *n char(250);



            END-PI;



            dcl-ds patientInfo dim(5000) qualified;

                   patno zoned(7:0);

                   admissionDate date;

            END-DS;



            dcl-s ifsFileName char(250);

            dcl-s numOfRows int(5) inz;



            exec sql

                 declare patInfo cursor for

                     Select PATNO, ISADATE

                       from Patients a

                 inner join Rmbed b

                         on a.PATNO = b.PAT#

                      where a.ISDDATE <> '0001-01-01';





            numOfRows = %elem(patientInfo);



            exec sql

                 open patInfo;



            exec sql

                 fetch patInfo

                     for :numOfRows ROWS

                  into :patientInfo;



            exec sql

                 close patInfo;





            ifsFileName = %trim(reportPath) + '/' +

                            %trim(spoolName)  + '_' +

                            currDate + '_' + currTime + '.pdf';



            return ifsFileName;

        END-PROC;


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.