×

Good News Everybody!

The new search engine is LIVE!

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




Hi Marla,

You are updating the field in the LDA in your program then doing an OUT *LDA 
before you come out of the program?

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of Marla Snow
Sent: 30 June 2005 16:19
To: rpg400-l@xxxxxxxxxxxx
Subject: RE: LDA with various pgms



Steve,

I know F12 is the standard - the problem is the existing programs don't have 
that functionality, if I add it, then every other program that calls it would 
also have to be changed.  

Here is the code in my program:

D                UDS               
D  LdaEND                 1      1 
D  Ldaabkt                1     42 
D  Ldasls                40     57 
D  Ldaacct               34    158 
D*                                 
D  @abkt          s             42 
D  @sls           s             19 
D  @rep           s             37 
D  @acct          s            126 


C     getparms      BEGSR                    
C*                                           
C     abktparm      tag                      
C                   call      'AR1595'       
C                   if        ldaEND = 'R'   
C                   leavesr                  
C                   endif                    
C*                                           
C                   eval      @abkt = ldaabkt
C*                                           
C     slmnparm      tag                      
C                   call      'SE0120'       
C                   if        ldaEND = 'R'   
C                   goto      abktparm       
C                   endif                    
C*                                           
C                   eval      @sls = ldasls           
C                   eval      %subst(@sls:19:1) = 'x' 
C*                                                    
C     CRepParm      tag                               
C                   call      'SE0124'                
C                   parm                    @rep      
C                   if        ldaEND = 'R'            
C                   goto      slmnparm                
C                   endif                             
C*                                                    
C                   eval      %subst(@rep:37:1) = 'x' 
C*                                                    
C     acctparm      tag                               
C                   call      'SE0005'                
C                   if        ldaEND = 'R'            
C                   goto      CRepParm                
C                   endif                              
C*                                                     
C                   eval      @acct = ldaacct          
C                   eval      %subst(@acct:126:1) = 'x'
C*                                                     
C                   EndSR                              

This is what the CL was doing...

/* SELECT SALESMEN */                                          
             CALL       PGM(SE0120)                            
             IF         COND(%SST(*LDA 1 1) = 'R') THEN(GOTO + 
                          CMDLBL(END))                         
             CHGVAR     VAR(&SLS) VALUE(%SST(*LDA 40 18))      
             CHGVAR     VAR(%SST(&SLS 19 1)) VALUE('x')        
                                                               
/* SELECT CREDIT REP */                                        
             CALL       PGM(SE0124) PARM(&REP)                 
             IF         COND(%SST(*LDA 1 1) = 'R') THEN(GOTO + 
                          CMDLBL(END))                         
             CHGVAR     VAR(%SST(&REP 37 1)) VALUE('x')        

etc...

Marla

>  -----Original Message-----
> Sent: Thursday, June 30, 2005 10:05 AM
> To:   'rpg400-l@xxxxxxxxxxxx'
> Subject:      LDA with various pgms
> 
> Hi,
> 
> I am trying to add better functionality to a report selection program.  We 
> currently have a lot of programs that allow the selection of criteria for 
> reports.  These programs are used in a lot of places so I can't change them.  
> Each program uses the *LDA to pass the selection criteria back and forth with 
> a CL program (which then takes the data from the LDA and puts it into a 
> field).  Right now, if someone presses F3 it will exit out of the whole 
> selection process.  The CL will be calling about 6 programs>  in a row.  F3 
> ends the whole thing.  I want to be able to give the users the ability to 
> press F3 and just have it go back to the previous selection screen, this way 
> they won't have to start at the beginning unless they want to.
> 
> I changed the logic to have each program called in an RPG program which would 
> then put the data into a field, which would then be passed to the next 
> program (which will create the work file).  My problem is that after each 
> call I am not seeing the data that is updated in the *LDA.  Do I need to do   
> "IN *LDA" after each call?  Is there a way to access the data after the 
> return from each call?
> 
> Thanks for any help!
> 
> Marla Snow
> 

This thread ...


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.