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



Joe, 
Indeed it is working correctly.  I hoped to see a converted field in the data 
structure after the move but, of course the data would no longer fit in the 
data structure even if that were to convert!
Looking at the field in hex the data is all there, it was I that was not!
Thank you!
Bill
----- Original Message ----- 
From: Joe Pluta 
To: RPG programming on the AS400 / iSeries 
Sent: Sunday, February 16, 2003 1:30 PM
Subject: RE: Extname problem


> From: Bill
>
> Fslll01A   if   e           k disk
>
> Dslfl01A1       e ds                  extname(slfl01a)
> Dslfl01A2         S                   like(slfl01a1)
>
> after a chain:
> move      SLFL01A1       SLFL01A2
> ---
>
> In slfl01a1 I get the contents of the file.
> In slfl01a2 I get garbage in all of the numeric fields that exist
> in the file.

Okay, I'm a little confused.

When you define slfl01A2 as "like(slfl01a1)" all that does is create an
alpha field whose length is the same as the total length of the slfl01a data
structure.  It has no fields.  So I don't quite understand how you are
looking at "the numeric fields" "in slfl01a2".  Are you just dumping them
with debug?  If you are, then they are probably in packed format, which
means they'll show up as odd combinations of hex digits.

Please provide a little additional information - what exactly are you doing
that you see "garbage"?

Joe

P.S. The below program works fine:

Ffile1     if   e           k disk
Dfile1ds1       e ds                  extname(file1)
Dfile1ds2         s                   like(file1ds1)
C     'A'           CHAIN     file1
C                   move      file1ds1      file1ds2
C                   eval      *inlr = *on

After the "move", file1ds2 contains an exact duplicate of the data in
file1ds1.

EVAL file1ds1
FA1 OF FILE1DS1 = 'A'
FA2 OF FILE1DS1 = 'BB'
FS1 OF FILE1DS1 = 01.
FS2 OF FILE1DS1 = 2.00
FP1 OF FILE1DS1 = 03.
FP2 OF FILE1DS1 = 4.00

EVAL file1ds2:x
   00000     C1C2C2F0 F1F2F0F0 003F400F ........   - ABB01200.. .....

EVAL file1ds2:x
   00000     C1C2C2F0 F1F2F0F0 003F400F ........   - ABB01200.. .....

Note that the packed fields show up as packed: "00003F" and "400F".

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.