×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
Hello, I am a real Noobie! I have been spending my spare time trying to learn how to program on the AS/400. I have purchased several books, printed tons of IBM Redbook documents, and now, I am hoping someone here at this forum can point out my error.
I have been writing and rewriting an example from one of the books I purchased, "Subfiles in Free-Format RPG" BY Kevin Vandever. specifically example sfl006rg, sfl006df. I have been modifying it for my purposes and once i have a working copy, I would delete it and rewrite it taking a different approach hoping the repetition would sink in. This is a simple program that, when completed, would allow you to add display, delete, and edit records. Each approach I would take in rewriting it would be to get the basic view up and going and then add 1 function at a time. My last approach was adding the delete function and for the life of my I cant figure out why its not working. I have printed the sample code out and my own code and have looked at them step by step but because of some of the name changes, I have become completely lost. So, hopefully someone her will have a laugh and show me what I am missing.
Problem: After I delete a record, the subfile doesn't show all the records in the file, minus the one deleted, only a few of them and the subfile will not load any records by pressing page-up or page-down. But, if I add a new record, the subfile will start working again, showing all records.
My mind is jumbled and I need someone to point me in the right direction, Thanks for your time!
Garrett
Physical File:
0005.00 A* 150924
0006.00 A UNIQUE 150924
0007.00 A R COLFMT TEXT('FORMAT FOR COLLECTION') 150924
0007.01 A COLID 3 0 150929
0008.00 A COLNUM 2 0 150925
0009.00 A COLNAME 45 150928
0010.00 A K COLID 150929
DSPF File:
5761WDS V7R1M0 100416 SEU SOURCE LISTING 09/30/15 07:13:44 SYSSERIAL PAGE 1
SOURCE FILE . . . . . . . GDRDEV/PBCSRC
MEMBER . . . . . . . . . PBCDSPF
SEQNBR*...+... 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 ...+... 8 ...+... 9 ...+... 0
10 A*%%TS SD 20150929 124132 USERNAME REL-V7R1M0 5770-WDS 09/29/15
20 A*%%EC 09/29/15
30 A DSPSIZ(24 80 *DS3) 09/29/15
40 A CF03(03 'Exit Program') 09/29/15
50 A CF06(06 'ADD COLLECTION') 09/29/15
60 A CF12(12 'CANCEL PROGRAM') 09/29/15
61 A CF07(07 'TEST') 09/29/15
70 A* 09/24/15
80 A R SUB1 SFL 09/25/15
90 A*%%TS SD 20150925 050828 USERNAME REL-V7R1M0 5770-WDS 09/25/15
100 A 74 SFLNXTCHG 09/25/15
110 A COLID R H REFFLD(COLFMT/COLID GDRDEV/PBCLPF) 09/29/15
120 A OPTION 1A B 7 4VALUES(' ' '2' '4' '5' '8') 09/28/15
130 A COLNUM R O 7 8REFFLD(COLFMT/COLNUM GDRDEV/PBCLPF) 09/25/15
140 A COLNAME R O 7 14REFFLD(COLFMT/COLNAME GDRDEV/PBCLPF) 09/25/15
150 A R SFLCTL SFLCTL(SUB1) 09/29/15
160 A*%%TS SD 20150929 124132 USERNAME REL-V7R1M0 5770-WDS 09/29/15
170 A SFLSIZ(0015) 09/29/15
180 A SFLPAG(0014) 09/29/15
190 A ROLLUP 09/29/15
200 A OVERLAY 09/29/15
210 A N32 SFLDSP 09/29/15
220 A N31 SFLDSPCTL 09/29/15
230 A 31 SFLCLR 09/29/15
240 A 90 SFLEND(*MORE) 09/29/15
250 A RRN1 4S 0H SFLRCDNBR 09/29/15
260 A 1 3'User:' 09/29/15
270 A COLOR(RED) 09/29/15
280 A 1 9USER 09/29/15
290 A 1 67'Date:' 09/29/15
300 A COLOR(RED) 09/29/15
310 A 1 73DATE 09/29/15
320 A EDTCDE(Y) 09/29/15
330 A 2 3'BUSINESS' 09/29/15
340 A COLOR(BLU) 09/29/15
350 A 2 65'System:' 09/29/15
360 A COLOR(BLU) 09/29/15
370 A 2 73SYSNAME 09/29/15
380 A 3 3'IT Department - 09/29/15
390 A Research & De- 09/29/15
400 A velopment' 09/29/15
410 A DSPATR(UL) 09/29/15
420 A COLOR(BLU) 09/29/15
430 A 1 31'Pricebook Collection' 09/29/15
440 A COLOR(BLU) 09/29/15
450 A 6 3'Opt' 09/29/15
460 A DSPATR(UL) 09/29/15
470 A COLOR(BLU) 09/29/15
480 A 6 14'Collection Name:' 09/29/15
490 A COLOR(BLU) 09/29/15
500 A DSPATR(UL) 09/29/15
510 A 6 7'Num:' 09/29/15
520 A COLOR(BLU) 09/29/15
5761WDS V7R1M0 100416 SEU SOURCE LISTING 09/30/15 07:13:44 SYSSERIAL PAGE 2
SOURCE FILE . . . . . . . GDRDEV/PBCSRC
MEMBER . . . . . . . . . PBCDSPF
SEQNBR*...+... 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 ...+... 8 ...+... 9 ...+... 0
530 A DSPATR(UL) 09/29/15
540 A 5 3'Options:' 09/29/15
550 A COLOR(WHT) 09/29/15
560 A 5 12'2=Edit' 09/29/15
570 A 5 19'4=Delete' 09/29/15
580 A 5 28'5=Display' 09/29/15
590 A 5 38'8=Process' 09/29/15
610 A* 09/29/15
620 A R NEW_COL 09/29/15
630 A*%%TS SD 20150929 104347 USERNAME REL-V7R1M0 5770-WDS 09/29/15
640 A 1 3'User:' 09/29/15
650 A COLOR(RED) 09/29/15
660 A 1 9USER 09/29/15
670 A 1 67'Date:' 09/29/15
680 A COLOR(RED) 09/29/15
690 A 1 73DATE 09/29/15
700 A EDTCDE(Y) 09/29/15
710 A 2 3'BUSINESS' 09/29/15
720 A COLOR(BLU) 09/29/15
730 A 2 65'System:' 09/29/15
740 A COLOR(BLU) 09/29/15
750 A 2 73SYSNAME 09/29/15
760 A 3 3'IT Department - 09/29/15
770 A Research & De- 09/29/15
780 A velopment' 09/29/15
790 A DSPATR(UL) 09/29/15
800 A COLOR(BLU) 09/29/15
810 A 1 31'Pricebook Collection' 09/29/15
820 A COLOR(BLU) 09/29/15
830 A 6 3'ID' 09/29/15
840 A DSPATR(UL) 09/29/15
850 A COLOR(BLU) 09/29/15
860 A 6 14'Collection Name:' 09/29/15
870 A COLOR(BLU) 09/29/15
880 A DSPATR(UL) 09/29/15
890 A 6 7'Num:' 09/29/15
900 A COLOR(BLU) 09/29/15
910 A DSPATR(UL) 09/29/15
920 A COLID R O 7 3REFFLD(COLFMT/COLID GDRDEV/PBCLPF) 09/29/15
930 A COLNUM R B 7 8REFFLD(COLFMT/COLNUM GDRDEV/PBCLPF) 09/29/15
940 A COLNAME R B 7 14REFFLD(COLFMT/COLNAME GDRDEV/PBCLPF) 09/29/15
950 A CHECK(LC) 09/29/15
960 A 5 32'Add New Collection' 09/29/15
970 A COLOR(WHT) 09/29/15
980 A* 09/24/15
981 A R WINDOW1 SFL 09/29/15
982 A COLID R O 6 7REFFLD(COLFMT/COLID GDRDEV/PBCLPF) 09/29/15
983 A COLNUM R B 6 12REFFLD(COLFMT/COLNUM GDRDEV/PBCLPF) 09/29/15
984 A COLNAME R B 6 18REFFLD(COLFMT/COLNAME GDRDEV/PBCLPF) 09/29/15
985 A 09/29/15
986 A R SF2CTL SFLCTL(WINDOW1) 09/29/15
987 A SFLDSP 09/29/15
988 A N41 SFLDSPCTL 09/29/15
5761WDS V7R1M0 100416 SEU SOURCE LISTING 09/30/15 07:13:44 SYSSERIAL PAGE 3
SOURCE FILE . . . . . . . GDRDEV/PBCSRC
MEMBER . . . . . . . . . PBCDSPF
SEQNBR*...+... 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 ...+... 8 ...+... 9 ...+... 0
989 A 41 SFLCLR 09/29/15
990 A N41 SFLEND(*MORE) 09/29/15
991 A SFLSIZ(0009) 09/29/15
992 A SFLPAG(0008) 09/29/15
993 A WINDOW(2 2 20 70) 09/29/15
994 A RRN2 4S 0H 09/29/15
996 A R FKEY2 09/29/15
997 A 23 5'<F3>=Exit' 09/29/15
998 A COLOR(BLU) 09/29/15
999 A 22 2'__________________________________- 09/29/15
1000 A ___________________________________- 09/29/15
1001 A _________' 09/29/15
1002 A COLOR(BLU) 09/29/15
1003 A 23 20'<F12>=Cancel' 09/29/15
1004 A COLOR(BLU) 09/29/15
1005 A 09/29/15
1013 A R FKEY1 09/29/15
1014 A*%%TS SD 20150929 060325 USERNAME REL-V7R1M0 5770-WDS 09/29/15
1015 A 23 5'<F3>=Exit' 09/29/15
1020 A COLOR(BLU) 09/29/15
1030 A 22 2'__________________________________- 09/29/15
1040 A ___________________________________- 09/29/15
1050 A _________' 09/29/15
1060 A COLOR(BLU) 09/29/15
1070 A 23 18'<F6>=Add Collection' 09/29/15
1080 A COLOR(BLU) 09/29/15
1090 A 23 41'<F12>=Cancel' 09/29/15
1100 A COLOR(BLU) 09/29/15
This mailing list archive is Copyright 1997-2024 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.