Jeff
Jeff

Reputation: 349

AS400 RPGLE Defining a display file in a module

I have been reading on creating modules and service programs in ILE, but I can't find much on defining a display window (prompt screen) inside a module. I have tried the following, but keep getting an error that the RECNO parameter (RRN here) is not defined (*RNF7004). Any idea what I am doing wrong....or where I can get more info...

    H NOMAIN                                                
    FWDWFACV   CF   E             WORKSTN                   
    F                                     SFILE(FACSFL:RRN) 
    FZMFL01    IF   E           K DISK                        
    D/COPY CUSSRCV6/QCPYSRC,TOOLS                           
    P WDWFAC          B                   EXPORT            
    DWDWFAC           PI                                    
    DWFAC                            2A                     
    DWFDESC                         20A   options(*nopass)  
    D RRN             S              3S 0 inz(0)            
    D WKFLAG          S              1S 0                   
    /free                                                   

Upvotes: 1

Views: 1628

Answers (1)

David G
David G

Reputation: 4014

The RRN variable, which is attached to the display file, probably needs to be global (defined outside the module).

Upvotes: 1

Related Questions