Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Complete Newbie Needs Assistance

Status
Not open for further replies.

rstitzel

MIS
Apr 24, 2002
286
US
I'm very new to RPG ILE. My current position requires that I learn RPG ILE although 99% of the current applications are written in RPGII. My current project I'm tryin to rewrite what to me seems like what should be a very simple project.

I have two files RSALTR AND RSBLCK. I want to loop through RSALTR looking at specific fields to see if they meet a certain critera if they do meet the criteria I want to chain out to RSBLCK and find the related record and update several fields in both files. The program compiles and runs but nothing happens to the data. Since I'm so new I don't even know how to debug at this point.

Below is my "code" :) Please don't laugh. If anyone could point out what I'm missing that would be great.

F* FLIP SELECTED SCHOOL ROUTE
FRSALTR UF F 32 6AIDISK
FRSBLCK UF F 220 6AIDISK
I*
IRSALTR NS 01
I 1 5 0ID
I 6 6 0BLCK
I 1 6 0IDB
I 7 7 0WEEK
I 8 8 DELET
I 9 12 0RTSQ
I 9 10 0ROUTE
I 13 13 0ONEDEL
IRSBLCK NS 05
I 49 72 0RS
I 49 52 0RS1
I 53 56 0RS2
I 57 60 0RS3
I 61 64 0RS4
I 65 68 0RS5
C*
C READ RSALTR
C DOW NOT %EOF
C IF DELET <>'D'
C IF ROUTE =61
C IDB CHAIN RSBLCK
C Z-ADD 0 RS
C IF WEEK =1
C IF ONEDEL =1
C EVAL RS2 =RTSQ
C EVAL WEEK =2
C ELSE
C EVAL RS2 =RTSQ
C EVAL RS4 =RTSQ
C EVAL WEEK =2
C ENDIF
C ELSEIF WEEK =2
C IF ONEDEL =1
C EVAL RS3 =RTSQ
C EVAL WEEK =1
C ELSE
C EVAL RS1 =RTSQ
C EVAL RS3 =RTSQ
C EVAL RS5 =RTSQ
C EVAL WEEK =1
C ENDIF
C ENDIF
C ENDIF
C ENDIF
C READ RSALTR
C ENDDO
C EVAL *INLR =*ON
C RETURN
 
You don't have any UPDATE statements....


&quot;When once you have tasted flight, you will forever walk the Earth with your eyes turned skyward, for here you have been, and there you will always long to return.&quot;

--Leonardo da Vinci

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top