ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

No Member In Logical File

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Gotta bring this one back guys....it was never solved.....

    Time to solve an old problem. I've just run into this error myself. I have a work file with a logical over it. There are a couple programs that use it but they use the same format on it. My new CL program is EXACTLY the same as the old CL program except I call a different program. But even the programs are almost identical. I'm pretty much just doing opposite algorithms in them....but anyway....Here's the skinny...

    So my code compiles just fine...no problems at all. Then I run the program. All is fine for the first input screen. Then I enter some choices and hit 'ENTER'. When I do that I get the CPF4201.
    Device description &1 not valid for retail pass-through session.
    It does not give me a reason code. I am using OVRDBF for both the PF and the LF. I even remove the LF first. I'm on my last nerve with this program, its been one thing after another....i'm sure you've had those projects....if you need to see any code, let me know what you want to see. I have 2 RPG's, 1 DSP, and 1 CL for this program.
    Your future President
    Bryce

    ---------------------------------------------
    http://www.bravobryce.com

    Comment


    • #17
      Re: No Member In Logical File

      Lets see some code Ive never seen that error before.
      I have no idea what a retail pass-thru is


      jamie
      All my answers were extracted from the "Big Dummy's Guide to the As400"
      and I take no responsibility for any of them.

      www.code400.com

      Comment


      • #18
        Re: No Member In Logical File

        quick question, i'm going to post code in a second....how the hell did that quote get into my post? Did the forum do that? because I didn't quote anything....
        Your future President
        Bryce

        ---------------------------------------------
        http://www.bravobryce.com

        Comment


        • #19
          Re: No Member In Logical File

          DDS - (PRC320DF)
          PHP Code:
               A*%%TS  DD  20070702  075244  bmartin     REL-V5.0.1  WDSc
               A
          *%%FD Display Items and their Costs per Profile/Model
               A
          *%%EC
               A                                      DSPSIZ
          (24 80 *DS3)
               
          A                                      PRINT(*LIBL/QSYSPRT)
               
          A                                      INDARA
               A          R INPUTSCRN
               A
          *%%TS  DD  20070702  075244  bmartin     REL-V5.0.1  WDSc
               A                                      CA03
          (03 'F3=EXIT')
               
          A                                      CF04(04 'F4=PROMPT')
               
          A                                      RTNCSRLOC(&RCD &FLD &POS)
               
          A                                      OVERLAY
               A                                  1  2
          'PRC320DF-01'
               
          A                                      COLOR(BLU)
               
          A            MSGFLD0001    38A  O  1 18MSGID(L01 9301 SSAZ03)
               
          A                                      DSPATR(HI)
               
          A            WORKSN        10A  O  1 62
               A                                  1 73DATE
               A                                      EDTCDE
          (Y)
               
          A                                  2  2SYSNAME
               A                                  2 21
          'Items in Profile/Pricing Model'
               
          A                                      COLOR(BLU)
               
          A                                  2 62USER
               A                                  2 73TIME
               A                                  7 26
          'FAC:'
               
          A            FACILITY       2   B  7 31COLOR(WHT)
               
          A  60                                  DSPATR(RI)
               
          A  61                                  DSPATR(PC)
               
          A                                  9 17'PROFILE MODEL'
               
          A            PROFILE       15   B  9 31COLOR(WHT)
               
          A  62                                  DSPATR(RI)
               
          A  63                                  DSPATR(PC)
               
          A                                 11 17'PRICING MODEL'
               
          A            PRICING       15   B 11 31COLOR(WHT)
               
          A  64                                  DSPATR(RI)
               
          A  65                                  DSPATR(PC)
               
          A                                 13 21'ITEM TYPE'
               
          A            TYPE           1   B 13 31COLOR(WHT)
               
          A  66                                  DSPATR(RI)
               
          A  67                                  DSPATR(PC)
               
          A            MSGTXT        70A  O 23  2COLOR(WHT)
               
          A                                 24  2'F3=EXIT       ENTER to Accept'
               
          A                                      COLOR(BLU)
               
          A                                  7 34'+'
               
          A                                      COLOR(BLU)
               
          A                                  9 47'+'
               
          A                                      COLOR(BLU)
               
          A                                 11 47'+'
               
          A                                      COLOR(BLU)
               
          A                                 13 33'+'
               
          A                                      COLOR(BLU)
               
          A
               A
               A            POS            4S 0H
               A            RCD           10A  H
               A            FLD           10A  H
               A
          *%%GP UNTITLED   01
               A          R SFL
               A
          *%%TS  DD  20070629  142232  bmartin     REL-V5.0.1  WDSc
               A                                      SFL
               A
          **                                    SFL
               A            ITEM          15A  O  8  2COLOR
          (WHT)
               
          A            ITEMDESC      30A  O  8 22COLOR(WHT)
               
          A            COST          11Y 3O  8 57EDTCDE(3)
               
          A                                      COLOR(WHT)
               
          A          R CTL
               A
          *%%TS  DD  20070629  142232  bmartin     REL-V5.0.1  WDSc
               A                                      SFLCTL
          (SFL)
               
          A                                      SFLSIZ(14)
               
          A                                      SFLPAG(13)
               
          A                                      CA03(03 'F3=EXIT')
               
          A                                      CA12(12 'F12=CANCEL')
               
          A                                      OVERLAY
               A  31                                  SFLDSP
               A  32                                  SFLDSPCTL
               A  33                                  SFLCLR
               A  34                                  SFLEND
          (*MORE)
               
          A                                      SFLCSRRRN(&CURSPOS)
               
          A                                  1  2'PRC320DF-01'
               
          A                                      COLOR(BLU)
               
          A            MSGFLD0001    38A  O  1 18MSGID(L01 9301 SSAZ03)
               
          A                                      DSPATR(HI)
               
          A            WORKSN        10A  O  1 62
               A                                  1 73DATE
               A                                      EDTCDE
          (Y)
               
          A                                  2  2SYSNAME
               A                                  2 21
          'Items in Profile/Pricing Model'
               
          A                                      COLOR(BLU)
               
          A                                  2 62USER
               A                                  2 73TIME
               A                                  4  4
          'FAC:'
               
          A            FACILITY       2   O  4  9COLOR(WHT)
               
          A                                  4 28'PROFILE MODEL'
               
          A            PROFILE       15   O  4 42COLOR(WHT)
               
          A                                  5  4'ITEM TYPE'
               
          A            TYPE           1   O  5 14COLOR(WHT)
               
          A                                  5 28'PRICING MODEL'
               
          A            PRICING       15   O  5 42COLOR(WHT)
               
          A                                  7  2'ITEM'
               
          A                                      DSPATR(UL)
               
          A                                  7 22'ITEM DESC'
               
          A                                      DSPATR(UL)
               
          A                                  7 63'COST'
               
          A                                      DSPATR(UL)
               
          A            CURSPOS        5S 0H
               A            RRN            4S 0H      SFLRCDNBR
          (CURSOR)
               
          A            MRRRN          4S 0H
               A          R FOOTER
               A
          *%%TS  DD  20070621  081925  bmartin     REL-V5.0.1  WDSc
               A                                 24  3
          'F3=EXIT       F12=CANCEL'
               
          A                                      COLOR(BLU


          Main RPGLE program (PRC320R)
          PHP Code:
                **********************************************************************
                * 
          PROGRAM NAME:  PRC320R                                             *
                *                                                                    *
                * 
          PURPOSE.....:  This program will call the BOM module to find all   *
                *                
          the pricing models for a specific item.  The results*
                *                
          will be put out to the screen.                      *
                *                                                                    *
                * 
          CALLED FROM.:  PRC310CL                                            *
                *                                                                    *
                * 
          PGMS CALLED.:                                                      *
                *                                                                    *
                * 
          WRITTEN BY..:  Bryce Martin       06/20/07   PROJECT:              *
                *                                                                    *
                **********************  
          MAINTENANCE LIST  ****************************
                * 
          99/99/99 FML    PROJECTÑ:  9999
                
          *    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
                
          *****************************************************************
                ***********************
          INDICATOR LIST*****************************
                *  
          01     XXXXXXXXXXXXXXXXXXXXXXXXXXXXX                          *
                *  
          50     GENERAL PURPOSE INDICATOR                              *
                ******************************************************************
          /\/\/
          F*/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
               
          FPRC320DF  CF   E             WORKSTN SFILE(SFL:MRRRN)
               
          F                                     INDDS(FKEYS)
               
          FPRC040LF1 IF   E           K DISK
               FPRC040LF2 
          IF   E           K DISK    RENAME(RPRC040P:RPRC040P2)
               
          F
               FPRC040LF5 
          IF   E           K DISK    RENAME(RPRC040P:RPRC040P3)
               
          F
               FPRC211WF  
          IF   E           K DISK
               F
          *PRC211WF1 IF   E           K DISK    RENAME(RPRC211W:RPRC211W2)
               
          F
               F
               FIIML02    
          IF   E           K DISK
               FZMFL01    
          IF   E           K DISK
               FZPAX02    
          IF   E           K DISK
          /\/\/D*/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
               
          D FKEYS           DS            99
               D  
          EXIT                   3      3N
               D  HELP                   4      4N
               D  
          RETURN                12     12N
               D  SFLDSP                31     31N
               D  SFLDSPCTL             32     32N
               D  SFLCLR                33     33N
               D  SFLEND                34     34N
               D  BADFAC                60     60N
               D  PCFAC                 61     61N
               D  BADPROF               62     62N
               D  PCPROF                63     63N
               D  BADPRIC               64     64N
               D  PCPRIC                65     65N
               D  BADTYPE               66     66N
               D  PCTYPE                67     67N
               D
               D
                
          *
                * 
          Parameters Passed by Calling Program
               D ITEMNUM         S             15A
               D
               D
                
          *
                * 
          Parms passed to BPCS window programs
               D W1              S              1A
               D W2              S              2S 0
               D W3              S              2S 0
               D TABLEID         S              2A   INZ
          ('TP')
               
          D
               D
               DPRTFBK           DS
               D
               D CUR_LINE              367    368I 0
               D CUR_PAGE              369    372I 0
               D
                
          *
                * 
          Program Status Data Structure
               D                SDS
               D  WORKSN               244    253
               D  USERID               254    263
               D
                
          *
                * 
          Stand Alone Variables
               D FAC             S              2A
               D MODEL           S             15A
               D SAVERRN         S              5S 0
               D ZPATYPE         S              8A   INZ
          ('ITEMTYP ')
               
          D
               D
               D
                
          *
          /\/\/
          C*/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
               
          C
               C     ITEMS         Plist
               C                   Parm                    ITEMNUM
               C
               C
               C
               C
          *    PRCMOD        KLIST
               C
          *                  KFLD                    FAC
               C
          *                  KFLD                    CMFITEM
               C
               C
               C     P40KEY        KLIST
               C                   KFLD                    FACILITY
               C                   KFLD                    PROFILE
               C
               C     P40KEY2       KLIST
               C                   KFLD                    FACILITY
               C                   KFLD                    PRICING
               C
               C     ZPAKEY        KLIST
               C                   KFLD                    TABLEID
               C                   KFLD                    ZPATYPE
               C
               C
                
          ***************
                *---- 
          MAIN ---*
                ***************
               
          C
               C                   MOVE      
          'MU'          FACILITY
               C
               C                   DOW       NOT 
          EXIT
               
          C
               C                   EXFMT     INPUTSCRN
               C
                
          *
                * If 
          F3 was pressed
               C                   
          IF        EXIT
               
          C                   LEAVE
               C                   
          ENDIF
               
          C
                
          *
                * 
          Was F4 Pressed
               C                   
          IF        HELP
               C                   
          IF        FLD 'FACILITY' OR
               
          C                             FLD 'PROFILE' OR
               
          C                             FLD 'PRICING' OR
               
          C                             FLD 'TYPE'
               
          C                   EXSR      @HELP
               C                   
          EVAL      RETURN = *OFF
               C                   ITER
               C                   
          ELSE
               
          C                   ITER
               C                   
          ENDIF
               
          C                   ENDIF
               
          C
               C                   EXSR      VALIDATE
               C
               C                   
          IF        MSGTXT = *BLANKS
               C                   EXSR      LOADSCR2
               C                   
          ENDIF
               
          C
               C
               C
               C                   ENDDO
               C                   MOVE      
          *ON           *INLR
               C
               C
               C
               C
                
          *********************************************
                * 
          VALIDATE SUBROUTINE-----------------------*
                * 
          Validate the data entered onto the input  *
                * 
          screen.                                   *
                *********************************************
               
          C     VALIDATE      BEGSR
               C                   MOVE      
          *BLANKS       MSGTXT
               C
               C
               C                   
          IF        FACILITY = *BLANKS
               C                   
          EVAL      MSGTXT 'A FACILITY must be entered.  +
               C                             Please try again.'
               
          C                   MOVE      *ON           BADFAC
               C                   MOVE      
          *ON           PCFAC
               C
               C                   
          ELSEIF    FACILITY <> *BLANKS
                
          *
                * 
          Validate Facility
               C     FACILITY      CHAIN     ZMFL01
               C                   
          IF        NOT %FOUND(ZMFL01)
               
          C                   EVAL      MSGTXT 'Invalid FACILITY. Please Try +
               C                             Again.'
               
          C                   MOVE      *ON           BADFAC
               C                   MOVE      
          *ON           PCFAC
               C                   LEAVESR
               C                   
          ENDIF
               
          C
               C                   
          ELSEIF    PROFILE <> *BLANKS AND PRICING <> *BLANKS
               C                   
          EVAL      MSGTXT 'Please choose only ONE criteria.'
               
          C                   MOVE      *OFF          PCFAC
               C                   MOVE      
          *ON           BADPROF
               C                   MOVE      
          *ON           BADPRIC
               C                   MOVE      
          *ON           PCPROF
                
          *
                * 
          Validate Profile Model
               C                   
          ELSEIF    PROFILE <> *BLANKS
               C     P40KEY        CHAIN     PRC040LF2
               C                   
          IF        %FOUND(PRC040LF2)
               
          C                   ELSE
               
          C                   EVAL      MSGTXT 'Invalid PROFILE MODEL.  Please +
               C                             try again.'
               
          C                   MOVE      *OFF          PCFAC
               C                   MOVE      
          *ON           BADPROF
               C                   MOVE      
          *ON           PCPROF
               C                   
          ENDIF
                *
                * 
          Validate Pricing Model
               C                   
          ELSEIF    PRICING <> *BLANKS
               C     P40KEY2       CHAIN     PRC040LF1
               C                   
          IF        %FOUND(PRC040LF1)
               
          C                   ELSE
               
          C                   EVAL      MSGTXT 'Invalid PRICING MODEL.  Please +
               C                             try again.'
               
          C                   MOVE      *OFF          PCFAC
               C                   MOVE      
          *ON           BADPROF
               C                   MOVE      
          *ON           PCPROF
               C                   
          ENDIF
                *
                * 
          Validate Item Type
               C                   
          ELSEIF    TYPE <> *BLANKS
               C                   MOVE      TYPE          ZPATYPE
               C     ZPAKEY        CHAIN     ZPAX02
               C                   
          IF        NOT %FOUND(ZPAX02)
               
          C                   EVAL      MSGTXT 'Invalid TYPE.  Please try again.'
               
          C                   MOVE      *OFF          PCFAC
               C                   MOVE      
          *ON           BADTYPE
               C                   MOVE      
          *ON           PCTYPE
               C                   
          ENDIF
               
          C                   ENDIF
               
          C
               C                   ENDSR
               C
                
          *****************************************************
                * @
          HELP SUBROUTINE----------------------------------*
                * 
          PULLS UP THE PROMPT WINDOW FOR THE CURRENT
                
          SELECTION CRITERIA WITH A LIST OF VALID VALUES    *
                *****************************************************
               
          C
               C     
          @HELP         BEGSR
               C                   MOVE      
          *OFF          RETURN
               
          C                   MOVE      '1'           W1
               C                   MOVE      
          *ZEROS        W2
               C                   MOVE      
          *ZEROS        W3
               C                   SELECT
                
          *
                * 
          Facility
               C                   WHEN      FLD 
          'FACILITY'
               
          C                   CALL      'WINZMFD'
               
          C                   PARM                    W1
               C                   PARM                    W2
               C                   PARM                    W3
               C                   PARM                    FACILITY
               C                   MOVE      
          *OFF          BADFAC
               C                   MOVE      
          *OFF          PCFAC
               C                   MOVE      
          *ON           PCPROF
                
          *
                * 
          Profile Model
               C                   WHEN      FLD 
          'PROFILE'
               
          C                   CALL      'WINPRFR'
               
          C                   PARM                    PROFILE
               C                   MOVE      
          *OFF          BADPROF
               C                   MOVE      
          *OFF          PCFAC
               C                   MOVE      
          *ON           PCPROF
               C
                
          *
                * 
          Pricing Model
               C                   WHEN      FLD 
          'PRICING'
               
          C                   CALL      'WINPMDR'
               
          C                   PARM                    W1
               C                   PARM                    W2
               C                   PARM                    W3
               C                   PARM                    PRICING
               C                   MOVE      
          *OFF          BADPRIC
               C                   MOVE      
          *OFF          PCFAC
               C                   MOVE      
          *ON           PCPRIC
                
          *
                * 
          Item Type
               C                   WHEN      FLD 
          'TYPE'
               
          C                   CALL      'WINZTPD'
               
          C                   PARM                    W1
               C                   PARM                    W2
               C                   PARM                    W3
               C                   PARM                    TYPE
               C                   MOVE      
          *OFF          BADTYPE
               C                   MOVE      
          *OFF          PCFAC
               C                   MOVE      
          *ON           PCTYPE
               C
               C                   ENDSL
               C
               C                   ENDSR
               C
               C
               C
               C
                
          *********************************************
                * 
          LOADSCR2 SUBROUTINE-----------------------*
                * 
          This will control the loading of the      *
                * 
          subfile and screen elements of the second *
                * 
          screen.                                   *
                *********************************************
               
          C
               C     LOADSCR2      BEGSR
               C
               C                   EXSR      CLRSFL
               C                   EXSR      LOADSFL
               C                   
          IF        MRRRN <> *HIVAL
               C                   EXSR      DSPSCREEN
               C                   
          ENDIF
               
          C
               C                   ENDSR
               C
                
          *********************************************
                * 
          CLRSFL SUBROUTINE-------------------------*
                * 
          This will clear the subfile so that the   *
                * 
          we won't be writiing duplicate records and*
                * to just clean out the old information.    *
                *********************************************
               C
               C     CLRSFL        BEGSR
               C
               C                   MOVE      *OFF          SFLDSP
               C                   MOVE      *OFF          SFLDSPCTL
               C                   MOVE      *ON           SFLCLR
               C                   WRITE     CTL
               C                   MOVE      *OFF          SFLEND
               C                   EVAL      MRRRN = 0
               C                   EVAL      RRN = 1
               C                   EVAL      SAVERRN  = 0
               C                   MOVE      *ON           SFLDSPCTL
               C                   MOVE      *OFF          SFLCLR
               C
               C                   ENDSR
               C
                *********************************************
                * LOADSFL SUBROUTINE------------------------*
                * This will load the subfile with the proper*
                * data.                                     *
                *********************************************
               C
               C     LOADSFL       BEGSR
               C
               C
                *
                * Items based on Profile Model
               C                   IF        PROFILE <> *BLANKS
               C
               C     P40KEY        SETLL     PRC040LF2
               C     P40KEY        READE     PRC040LF2
               C                   DOW       NOT %EOF(PRC040LF2)
               C*    PMPRCMOD      CHAIN     PRC040LF5
               C*                  IF        %FOUND(PRC040LF5)
               C                   MOVE      PMPRCITM      ITEMNUM

               C*                  ENDIF
               C                   CALL      '
          PRC302R'     ITEMS

               C     P40KEY        READE     PRC040LF2
               C                   ENDDO
               C                   ENDIF
               C
                *
                * Items based on Pricing Model
               C                   IF        PRICING <> *BLANKS
               C     P40KEY2       SETLL     PRC040LF1
               C     P40KEY2       READE     PRC040LF1
               C                   DOW       NOT %EOF(PRC040LF1)
               C
               C                   MOVE      PMPRCITM      ITEMNUM
               C
               C                   CALL      '
          PRC302R'     ITEMS
               C
               C
               C     P40KEY2       READE     PRC040LF1
               C                   ENDDO
               C                   ENDIF
               C
               C
               C     *LOVAL        SETLL     PRC211WF
               C                   READ      PRC211WF
               C
               C                   DOW       NOT %EOF(PRC211WF)
               C     CMFITEM       CHAIN     IIML02
               C                   IF        %FOUND(IIML02)
               C                   IF        TYPE <> *BLANKS AND IITYP  = TYPE
               C                   MOVE      CMFITEM       ITEM
               C                   IF        MRRRN  < 9999
               C                   EVAL      MRRRN  = MRRRN + 1
               C                   WRITE     SFL
               C                   ELSE
               C                   EVAL      MSGTXT = '
          OVER 9999 RECORDS SELECTED, +
               
          C                             PLEASE SELECT A SMALLER RANGE'
               C                   MOVE      *HIVAL        MRRRN
               C                   ENDIF
               C
               C                   ENDIF
               C                   ENDIF
               C
               C                   READ      PRC211WF
               C                   ENDDO
               C
               C                   MOVE      *ON           SFLEND
               C
               C                   IF        MRRRN  > 0 AND MRRRN  <> *HIVAL
               C                   MOVE      *ON           SFLDSP
               C                   EVAL      SAVERRN  = MRRRN
               C                   EVAL      MRRRN  = 1
               C                   EVAL      RRN = 1
               C                   ENDIF
               C
               C                   ENDSR
               C
               C
               C
               C
                *********************************************
                * DSPCREEN SUBROUTINE-----------------------*
                * This will display the second screen with  *
                * all the information loaded into the       *
                * subfile.                                  *
                *********************************************
               C
               C     DSPSCREEN     BEGSR
               C
               C
               C                   DOW       NOT EXIT
               C
               C                   WRITE     FOOTER
               C                   EXFMT     CTL
               C                   MOVE      *BLANKS       MSGTXT
               C
                *
                * Was F3 pressed
               C                   IF        EXIT OR RETURN
               C                   LEAVE
               C                   ENDIF
               C                   ENDDO
               C
               C                   ENDSR 

          Called RPGLE program (PRC302R)
          PHP Code:
                **********************************************************************
                * 
          PROGRAM NAME:  PNS211R                                             *
                *                                                                    *
                * 
          PURPOSE.....:  This program will generate the selected cost set    *
                *                
          report based on what the user selected.             *
                *                                                                    *
                * 
          CALLED FROM.:  PRC210CL                                            *
                *                                                                    *
                * 
          PGMS CALLED.:                                                      *
                *                                                                    *
                * 
          WRITTEN BY..:  J.AMILLER        03/31/06   PROJECT455          *
                *                                                                    *
                **********************  
          MAINTENANCE LIST  ****************************
                * 
          99/99/99 FML    PROJECTÑ:  9999
                
          *    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
                
          *****************************************************************
                ***********************
          INDICATOR LIST*****************************
                *  
          01     XXXXXXXXXXXXXXXXXXXXXXXXXXXXX                          *
                *  
          50     GENERAL PURPOSE INDICATOR                              *
                ******************************************************************
          /\/\/
          F*/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
               
          FMBML01    IF   E           K DISK
               FPRC211WF  UF A E           K DISK
               FPRC211WF1 UF A E           K DISK    RENAME
          (RPRC211W:RPRC211W2)
               
          F                                     PREFIX(Z)
          /\/\/
          D*/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
                *
                * 
          Parameters Passed by Calling Program
               D ITEMNUM         S             15A
               D
                
          *
                * 
          Literals and Fields
               D FACILITY        S              2A   INZ
          ('MU')
               
          D FLAG            S              1  0
                
          *
          /\/\/
          C*/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
               
          C
               C     
          *ENTRY        PLIST
               C                   PARM                    ITEMNUM
               C
               C     MBMKEY        KLIST
               C                   KFLD                    ITEMNUM
               C                   KFLD                    FACILITY
               C
               C     MBMKEY2       KLIST
               C                   KFLD                    ZCMFITEM
               C                   KFLD                    FACILITY


                
          ***************
                *---- 
          MAIN ---*
                ***************


               
          C*    *LOVAL        SETLL     PRC211WF
               C
          *                  READ      PRC211WF
               C
          *                  DOW       NOT %EOF(PRC211WF)
               
          C*                  DELETE    RPRC211W
               C
          *                  READ      PRC211WF
               C
          *                  ENDDO

               C                   EXSR      GETBOM2

               C                   MOVE      
          *ON           *INLR


                
          ****************************************************************
                * 
          GETBOM2 ROUTINE ---------------------------------------------*
                * 
          This routine will find all the items that use the item that  *
                * 
          was entered on the screen and add them to the work file      *
                * (
          PRC211WF).                                                  *
                ****************************************************************
               
          C     GETBOM2       BEGSR
                
          *
                * 
          Look for items that use this item
               C     MBMKEY        SETLL     MBML01
               C     MBMKEY        READE     MBML01
               C                   DOW       NOT 
          %EOF(MBML01)
               
          C                   IF        BID 'BM'
               
          C     BCHLD         CHAIN     PRC211WF
               C                   
          IF        NOT %FOUND(PRC211WF)
               
          C                   MOVE      BCHLD         CMFITEM
               C                   
          EVAL      CMFFLAG 0
               C                   WRITE     RPRC211W
               C                   
          ELSEIF    %FOUND(PRC211WF)
               
          C     *LOVAL        SETLL     PRC211WF
               C                   
          ENDIF
               
          C                   ENDIF
               
          C     MBMKEY        READE     MBML01
               C                   ENDDO

               C                   
          EVAL      FLAG 0
               C     FLAG          SETLL     PRC211WF1
               C     FLAG          READE     PRC211WF1
               C                   DOW       NOT 
          %EOF(PRC211WF1)

               
          C     MBMKEY2       SETLL     MBML01
               C     MBMKEY2       READE     MBML01
               C                   DOW       NOT 
          %EOF(MBML01)
               
          C                   IF        BID 'BM'
               
          C     BCHLD         CHAIN     PRC211WF
               C                   
          IF        NOT %FOUND(PRC211WF)
               
          C                   MOVE      BCHLD         CMFITEM
               C                   
          EVAL      CMFFLAG 0
               C                   WRITE     RPRC211W
               C                   
          ELSEIF    %FOUND(PRC211WF)
               
          C     *LOVAL        SETLL     PRC211WF
               C                   
          ENDIF
               
          C                   ENDIF
               
          C     MBMKEY2       READE     MBML01
               C                   ENDDO

               C                   
          EVAL      ZCMFFLAG 1
               C                   UPDATE    RPRC211W2
               C     FLAG          SETLL     PRC211WF1
               C     FLAG          READE     PRC211WF1
               C                   ENDDO

               C                   ENDSR 


          CL PROGRAM - (PRC320CL)
          PHP Code:
          /*******************************************************************/
          /* PROGRAM NAME......: PRC320CL                                    */
          /* PURPOSE...........: This program will be called from a menu to  */
          /*                     allow the user to generate a listing of all */
          /*                     the pricing models that a certain item      */
          /*                     is used in.                                 */
          /*                                                                 */
          /* WRITTEN BY........: BRYCE MARTIN                                */
          /* DATE WRITTEN......: 07/2/07                                     */
          /* PGMS CALLED.......: PRC320R                                     */
          /* PROJECT...........:                                             */
          /*******************************************************************/



                       
          PGM
                       DCL        
          VAR(&DATE)      TYPE(*CHARLEN(6)
                       
          DCL        VAR(&TIME)      TYPE(*CHARLEN(9)
                       
          DCL        VAR(&MEMBER)    TYPE(*CHARLEN(10)

                       
          RTVJOBA    DATE(&DATE)
                       
          RTVSYSVAL  SYSVAL(QTIMERTNVAR(&TIME)



                       
          CHGVAR     VAR(&MEMBERVALUE('M' *CAT &TIME)

                       
          ADDPFM     FILE(PRC211WFMBR(&MEMBER)
                       
          MONMSG     MSGID(CPF7306EXEC(DO)
                          
          CLRPFM     FILE(PRC211WFMBR(&MEMBER)
                       
          ENDDO

                       ADDLFM     FILE
          (PRC211WF1MBR(&MEMBERDTAMBRS(PRC211WF (&MEMBER))
                       
          MONMSG     MSGID(CPF7306)

                       
          OVRDBF     FILE(PRC211WFTOFILE(PRC211WFMBR(&MEMBER)
                       
          OVRDBF     FILE(PRC211WF1TOFILE(PRC211WF1MBR(&MEMBER)

          /* Generate Cost Set Reports */
                       
          CALL       PGM(PRC320R)

                       
          DLTOVR     FILE(*ALL)
                       
          RMVM       FILE(PRC211WF1MBR(&MEMBER)
                       
          RMVM       FILE(PRC211WFMBR(&MEMBER)



                       
          ENDPGM 



          There is the code.....Let me know if you have any questions....
          Your future President
          Bryce

          ---------------------------------------------
          http://www.bravobryce.com

          Comment


          • #20
            Re: No Member In Logical File

            CPF4102 on my system is telling me that the member for that file is not found in the library list.....but I have the PF and LF in my library at the top of the list, and i compiled them with *NOMAX. so I'm a bit confused....
            Your future President
            Bryce

            ---------------------------------------------
            http://www.bravobryce.com

            Comment


            • #21
              Re: No Member In Logical File

              try changing to this - I changed your post
              also when you create the logical you must point to the
              correct source member.

              and last make sure both the physical and the logical are set to *NOMAX on
              the members.


              PHP Code:
              ADDLFM     FILE(PRC211WF1MBR(&MEMBER) +    
                           
              DTAMBRS((PRC211WF (&MEMBER))) 
              All my answers were extracted from the "Big Dummy's Guide to the As400"
              and I take no responsibility for any of them.

              www.code400.com

              Comment


              • #22
                Re: No Member In Logical File

                ok....well Jamie, you are a genius and a half....but how does that extra set of '()' make a difference? can you explain this? I had a problem with those the last time i wrote this CL program for my other program. It works, but I have no idea why....The same amount of encapsulation occurs without that pair....unless i do not grasp this CL thing like i thought...
                Your future President
                Bryce

                ---------------------------------------------
                http://www.bravobryce.com

                Comment


                • #23
                  Re: No Member In Logical File

                  it was a lucky guess I hate CL ...... just ask anyone!
                  All my answers were extracted from the "Big Dummy's Guide to the As400"
                  and I take no responsibility for any of them.

                  www.code400.com

                  Comment


                  • #24
                    Re: No Member In Logical File

                    but how do you even come up with that? that is what boggles my mind....who thinks to put an EXTRA set of parens in there like that?
                    Your future President
                    Bryce

                    ---------------------------------------------
                    http://www.bravobryce.com

                    Comment


                    • #25
                      Re: No Member In Logical File

                      after looking again

                      just do this
                      ADDLFM FILE(LOGICAL) MBR(&MEMBER)


                      jamie
                      All my answers were extracted from the "Big Dummy's Guide to the As400"
                      and I take no responsibility for any of them.

                      www.code400.com

                      Comment


                      • #26
                        Re: No Member In Logical File

                        bryce,
                        From SEU press F4 to prompt (or prompt in WSDc). On most commands the editor will add the "extra" ( ) where multiple entries are allowed. I think it there in cases where multiple fields can occur inside each set.

                        Comment


                        • #27
                          Re: No Member In Logical File

                          i don't need the DTAMBRS((PRC211WF (&MEMBER))) ??

                          please elaborate why....i am not so good at CL...this CL is an adaptation of someone else's. I'm pretty good at adapting...then i screw up, and with each screw up I learn something...
                          Your future President
                          Bryce

                          ---------------------------------------------
                          http://www.bravobryce.com

                          Comment


                          • #28
                            Re: No Member In Logical File

                            aaahhhh....i get it now....thanks Arrow. That makes sense to me now...
                            Your future President
                            Bryce

                            ---------------------------------------------
                            http://www.bravobryce.com

                            Comment


                            • #29
                              Re: No Member In Logical File

                              the physical file is already defined in the logical and by default
                              as long as there aren't multiple copies of the physical if will just
                              compile over the first physical it finds in your library list.

                              I know little to none bout CL I always do my cl stuff within
                              RPG...... At my age the less number of objects the better.
                              All my answers were extracted from the "Big Dummy's Guide to the As400"
                              and I take no responsibility for any of them.

                              www.code400.com

                              Comment


                              • #30
                                Re: No Member In Logical File

                                Originally posted by arrow483 View Post
                                bryce,
                                From SEU press F4 to prompt (or prompt in WSDc). On most commands the editor will add the "extra" ( ) where multiple entries are allowed. I think it there in cases where multiple fields can occur inside each set.
                                From prompting a command in Cl you can also press F14, which gives the syntax of the finished command, this is useful sometimes to get it right.

                                But enough of that drivel - I wanna know if Jamie nailed king kong on his PS2 !!!!

                                GC
                                Greg Craill: "Life's hard - Get a helmet !!"

                                Comment

                                Working...
                                X