×

Good News Everybody!

The new search engine is LIVE!

Please report any problems to david (at) midrange.com.




When I'm in debug and eval the pointer of the multi occurrence DS and 
occurrence one and get different pointer value (see below).  Is this normal?

EVAL %ADDR(MCRADD)                      
%ADDR(MCRADD) = SPP:CFFC819861042450    
EVAL %ADDR(MCRADD(1))                   
%ADDR(MCRADD(1)) = SPP:CFFC819861041F50 

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of Lim Hock-Chai
Sent: Friday, April 01, 2005 4:08 PM
To: rpg400-l@xxxxxxxxxxxx
Subject: Passing multi occurrence DS pointer to procedure - Data out
ofalignment 


Before I call IBM, I though I'll check to see if anybody has encountered this 
before.
 
---- Some background ---------------------------------------------------------
I've a program that has a multi occurrence DS in the main procedure:  
D Mcradd          Ds                  Occurs(12) likeds(sfAddDS)
 
In this program there is a sub-procedure that accept point of the above DS as a 
parm:
P chkAddingWgrp   B                                             
D                 PI              N                             
D addDSPtr                        *   value                     
                                                                
D addDS           DS                  likeDS(SFAddDS) occurs(12)
D                                     based(addDSPtr)           

---- Problem (Note: This rarely happen.  In most case, it work just fine.) 
-----------------------
When the main procedure does the following 
    chkAddingWgrp(%addr(mcrAdd))

In debug mode:  The 4th occurrence data is out of sync between the Mcradd in 
main procedure and the addDS in sub-procedure:  See below
 
MCRADD.UNLIKESWAP I(4) = ' '       
MCRADD.DSFECINOLD I(4) = ' '       
MCRADD.DSFEC(4) = '   '            
MCRADD.SVID(4) = '          '      
MCRADD.TLA(4) = 000.               
MCRADD.TLNO(4) = 00000000000000000.
MCRADD.TLP(4) = 000.               
MCRADD.TLS(4) = 0000.              
MCRADD.TLX(4) = 0000000.           
MCRADD.PGTR(4) = '   '             
MCRADD.SFRRN(4) = 0000.            
MCRADD.FEARRN(4) = 0000.           
MCRADD.FEC(4,1) = '   '            

 
ADDDS.UNLIKESWAP I(4) = '0'       
ADDDS.DSFECINOLD I(4) = '0'       
ADDDS.DSFEC(4) = '000'            
ADDDS.SVID(4) = '0000000000'      
ADDDS.TLA(4) = 000.               
ADDDS.TLNO(4) = 00000000000000000.
ADDDS.TLP(4) = 000.               
ADDDS.TLS(4) = 0000.              
ADDDS.TLX(4) = 0000000.           
ADDDS.PGTR(4) = '000'             
ADDDS.SFRRN(4) = 000 .            
ADDDS.FEARRN(4) =     .           
ADDDS.FEC(4,1) = '   '            


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



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