Sponsored Links
Sponsored Link

sponsored links

Collapse

Announcement

Collapse
No announcement yet.

Rpg 400 help

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

  • Rpg 400 help



    In this they asked to create two screens SCREEN1 and SCREEN2 ...

    In SCREEN1 we will give input of four fields .....STYLE , COLOR , VARIATION , and SOLD....

    These values shuld be present in First file....LFSTYB7.

    In the Second SCREEN the values entered in first screen1...Should Fetch According to first file key fields..if this present in first file the matched records
    should be selected in file two MSTABLE and if the matched records are present it should select from third (LFODEC16) and fourth(SLDLF11) like five and six (WIPLF7A & LFWIPC13).....

    These records should come according key fileds in the files....
    i just created for three files .....i'm not able get records from fourth and fifth & sixth files ....will u guide me the code..

    see the below program and check the errors please...upto now i'm getting three files data based on key fields ...
    I want for fourth & fifth & sixth files data ....i want logic for selection of key fields 4,5,6 files


    0004.00 FLFSTYB7 IF E K DISK
    0004.01 FLFODEC24IF E K DISK
    0004.02 FSLDLF9 IF E K DISK
    0006.00 FPD1 CF E WORKSTN
    0007.00 F RRN1 KSFILE SCR2
    0008.00 C Z-ADD0 RRN1 20
    0008.01 C LIST1 KLIST
    0008.02 C KFLD SBSTY
    0008.03 C KFLD SBSHDE
    0008.04 C KFLD SBCLR
    0008.05 C KFLD SBDIM
    0009.00 C LIST2 KLIST
    0010.00 C KFLD SECO
    0011.00 C KFLD SEDIV
    0011.01 C KFLD SEDSLD
    0011.04 *
    0011.04 *
    0011.05 C LIST3 KLIST
    0011.06 C KFLD CSOCO
    0011.07 C KFLD CSOSLD
    0011.08 C KFLD CSODIV
    0015.00 *
    0015.09 *
    0016.00 C *IN01 DOWEQ*OFF
    0017.00 C EXFMTSCR1
    0018.00 C MOVE '0' S21
    0019.00 C MOVE '0' S22
    0020.00 C MOVE '0' S24
    0021.00 C MOVE '0' S25
    0022.00 C MOVE S4 DS4 5
    0023.00 C '0' CHECKDS4 POS 10
    0024.00 C SUBSTDS4:POS RES 5
    0025.00 C MOVE S1 S21
    0026.00 C MOVE S2 S22
    0027.00 C MOVE S3 S24
    0028.00 C MOVE S4 S25
    0029.00 C MOVE S21 SBSTY
    0030.00 C MOVE S22 SBCLR
    0031.00 C MOVE S24 SBDIM
    0032.00 C MOVE S25 SBSHDE
    0032.01 **************
    0033.00 C LIST1 SETLLSBOKRECD 60
    0034.00 C *IN60 IFEQ *OFF
    0035.00 C READ SBOKRECD 90
    0035.01 **************
    0035.02 C LIST1 SETLLODECRECD 60
    0035.03 C *IN60 IFEQ *OFF
    0035.04 C LIST1 READEODECRECD 91
    0035.05 **************
    0035.06 C LIST2 SETLLSOLDRECD 60

    0035.07 C *IN60 IFEQ *OFF
    0035.08 C LIST2 READESOLDRECD 91
    0035.09 **************
    0035.13 **************
    0036.00 C *IN91 DOWEQ*OFF
    0037.00 C RRN1 ANDLE9998
    0038.00 C ADD 1 RRN1
    0039.00 C WRITESCR2
    0039.01 C LIST1 READEODECRECD 91
    0041.01 C ENDDO
    0041.02 **************
    0041.03 C SETON 30
    0041.04 C SETON 31
    0041.05 C SETON 33
    0041.06 C EXFMTCTL2
    0041.07 **************
    0042.02 C ENDIF
    0042.03 C ENDIF
    0042.04 C ENDIF
    0042.05 **************
    0047.00 C ENDDO
    0047.01 C SETON LR
    0048.00 C RETRN
    ****************** End of data ****************************************

  • #2
    Deepak,

    Based upon your code above,,, it would seem to me that you have used the tried and true method of using the setup of the first one, two, or even three sets of your working effort... to set up sets 4, 5, and 8.

    This is how we do that in our world here, right?

    When I've had this kind of problem... I have almost always found that when I copied set 3 to set 4, inside the program, I missed a reference that should have been changed from set 3, inside of set 4 when I created set 4. In other words, Set3Key = Set3Key instead of Set4Key = Set3Key... it is to remember that sometimes it's hard to see a single leaf when you're looking at a forest worth of leaves.

    Of course, all the Sets 1-3 work perfectly because those kids of changes were done exactly correctly... then Sets 4, 5, and 6 were copied from Sets 1, 2, and 3, but you missed an assignment from Set 3 yo Set 4..

    Naturally, I could be missing a point here, and the problem could be something else. I didn't totally analyze the code you gave... I just looked at what your problem description is, and possible common answers why the first three Sets work, and the last 3 Sets do not work. I made the assumption that all six sets have the same exact data types and etc. between all the data lengths involved here.


    Best Regards and Good Luck!
    Fred Williams

    Comment

    sponsored links

    Collapse

    Working...
    X