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

A likerec definition is always qualified, so you don't need to add the
qualified keyword.

HTH, Arco Simonse 

> -----Oorspronkelijk bericht-----
> Van: rpg400-l-bounces@xxxxxxxxxxxx 
> [mailto:rpg400-l-bounces@xxxxxxxxxxxx] Namens Bruce Collins
> Verzonden: woensdag 30 november 2005 15:34
> Aan: 'RPG programming on the AS400 / iSeries'
> Onderwerp: RE: Read Into
> 
> Can I qualify these? I add the key word by it gives an error.
> 
> Hoss
> 
> -----Original Message-----
> From: Scott Klement [mailto:rpg400-l@xxxxxxxxxxxxxxxx]
> Sent: Tuesday, November 29, 2005 6:11 PM
> To: RPG programming on the AS400 / iSeries
> Subject: Re: Read Into
> 
> 
> It works for me.  Two key things:
> 
> a) You MUST use LIKEREC(shprec1:*INPUT).  You can't use 
> ExtName for this
>     on V5R2.  shprec1 must be the record format name, not the 
> filename.
> 
> b) You MUST use the record format name on the READ statement as well,
>     in other words, shprec1.
> 
> c) This support requires V5R2, so make sure you're using the V5R2
>     compiler and not specifying TGTRLS(*PRV) or TGTRLS(V5R1M0) on the
>     compile command (sometimes people change the defaults)
> 
> I changed your code to use LIKEREC, and it compiled and ran 
> for me. Here's 
> the code I tested:
> 
>       FCURPRVSHP IF   E           K DISK
>       d
>       d aaa             ds                  likerec(shprec1: *input)
>       d bbb             ds                  likerec(shprec1: *input)
>        /free
>           setll *loval curprvshp;
>           dow not %eof;
>              read shprec1 aaa;
>              read shprec1 bbb;
>           enddo;
>           //
>           *inlr = *on;
>           //
>        /end-free
> 
> ---
DISCLAIMER:
This message contains information that may be privileged or confidential and is 
the property of the sender. 
It is intended only for the person to whom it is addressed. If you are not the 
intended recipient, you are not 
authorized to read, print, retain, copy,disseminate, distribute, or use this 
message or any part thereof. If you
receive this message in error, please notify the sender immediately and delete 
all copies of this message. 

This footnote also confirms that this email message has been swept for the 
presence of computer viruses



As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.