× 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.



You could do it several ways, one way being:

D CUTOFF_DTA      S              8

C     *DTAARA       DEFINE    CUTOFF        CUTOFF_DTA

C                   IN        CUTOFF_DTA

Good luck!

Larry Jansen

-----Original Message-----
From: James R. Newman, CDP [mailto:cis146@xxxxxxxxxxx]
Sent: Wednesday, May 26, 2004 7:19 PM
To: RPG List
Subject: Data area


It's been a while since I used a data area and I'm having trouble accessing
it from an RPG program.  I've created an 8 character data area called CUTOFF
that holds a date in yyyymmdd format.  I'm simply trying to read the data
area from the RPG program.  I have an "I" spec that looks like this:

IDTAARA     UDS
                                1    8    CUTOFF

Shouldn't I be able to access (read) the data in the program without doing a
DEFN, etc?  For testing purposes I put the statements above in a working
program and listed CUTOFF as an output field in the header, which should
display the date but doesn't show up.

Do I need to have a RTVDTAARA in my CL?  I know I do if I want to convert it
to a parm and access it in the program that way but, again, I thought if I
wanted to use the data area implicitly I could simply include the "I" specs
and use it like any other variable in the program.

TIA. 
_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.665 / Virus Database: 428 - Release Date: 4/21/04
 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.665 / Virus Database: 428 - Release Date: 4/21/04
 

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.