×
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.
It has something to do with the admissionDate date;
If I change it to admissionDate char(30); It not longer issues this
error. Seems like you should be able to use a date fields, so I don't have
a concrete solution for you. Hopefully this help you or someone else see
the real problem.
From: "Abhishek Arohi" <arohiabhi@xxxxxxxxx>
To: <rpg400-l@xxxxxxxxxxxx>
Date: 05/23/2018 09:29 AM
Subject: Multi Row Fetch
Sent by: "RPG400-L" <rpg400-l-bounces@xxxxxxxxxxxx>
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 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.