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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display (Overlay) not passing data back to program

Status
Not open for further replies.

JamieCairns

Programmer
Apr 2, 2003
23
0
0
US
Help !

Working in RPG3 here, and ran into a puzzler - I defined a dspf with 1 screen, and 3 or 4 window overlays. On one of the overlays, I enter a rec key I want to use in the prog to chain a rec, hit F5 to process, and chain should occur, but debug shows an empty field coming back to the program. Is there something here I'm missing - is there a parm specific to overlays and/or windows on a screen that I need to set ? Compile parms ?

TIA
Jamie
 
Did you use CA05 or CF05- CA05- no data is returned to your program. CF05- data is returned.
 
Thanks Jack - I'm pretty sure I used CA05 - It's worked other times, but I guess I'd pressed enter first thru an edit or something...

What's the purpose for, or difference between CAxx and CFxx ?

TIA
Jamie
 
CA05- no data is returned to your program. CF05- data is returned. I use CA to exit from the program- I don't care what the data is on the screen.

If you used CA05, your program would get no data the was entered on the screen.
 
I have a similiar problem, I'm trying to update a file that I created and it keeps giving me an error saying that the file already exists.
Ffile01 UF E K DISK
Ffile02 IF E K DISK


C key1 setllfile02
C key1 READEfile02 90
C xxx ifeq yyy
C n90 updat file01

an error is on the file01 - Is there away to create a file that would be like a data base file because I can access those files and its fine
 
bduke:
It looks like you're trying to do an update on a file you have not read from yet (from the code segment you posted)

Ffile01 UF E K DISK
Ffile02 IF E K DISK

C key1 setllfile02
C key1 READEfile02 90
C xxx ifeq yyy
...
Somewhere in the code, either here or earlier in the program, you have to actually read in or chain the record from file01 that you want to UPDAT. The program knows it needs to update a record in file01, but that record has not been identified yet. Otherwise, if it's to be a new record in file01, you need to WRITE, not UPDAT.
...
C n90 updat file01

Hope this helps,
Jamie
 
My error message is:

RPG/400 Message Summar
* QRG2122 Severity: 40 Number: 1
Message . . : A record-format name in externally-described file is already defined as a file-name
* QRG5063 Severity: 30 Number: 1
Message . .: Externally-Described-File name invalid in
Factor 2 (positions 33-42) for specified Operation.
* QRG7031 Severity: 00 Number: 146
Message . .: The Name or indicator is not referenced.
More...
F3=Exit F12=Cancel F19=Left F20=Right F24=More keys
 
Sorry, I answered a completely different set of errors earlier...

Now it sounds like you're trying to use a file created by query, or something similar, in an RPG pgm. A file's record name must be different than the filename on an externally described file, and query doesn't let you create 'em like that.

Query or not, there are two ways around this (I think...) :

1. Create identical file using DDS specs, with different record name, and copy your existing file into it, using the *nomap feature. Then use new file in place of old one in RPG pgm.

2. Describe the file internally (I haven't tried this one, but I think it should work...)

Jamie
 
RPG does not allow the record format name and the file name to be the same.

You can rename the record format to get around this:

[tt]
FFILE01 UF E K DISK
F FILE01 KRENAMEFILE1R
FFILE02 IF E K DISK
F FILE02 KRENAMEFILE2R
[/tt]


"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."

--Leonardo da Vinci

 
It doesn't like it without a filename defined right after the 'F' what version of RPG are you using and could there be a difference.
 
My last reply was to flapeyre - I wanted to try it this way - so any information on this would be greatly appreciated. -
 
bduke:

This is assuming you are using RPG/400 (not ILE RPG 4).

In SEU you use the file continuation prompt (FK):

On the file name's line, type IPFK and hit enter.

On the External Record Name prompt, type [tt]FILE01[/tt] (or FILE02).
Leave the Record Number Field blank.
Type [tt]RENAME[/tt] in the Option field.
Type [tt]FILE1R[/tt] (or FILE2R) in the Entry field. Hit Enter.

What you are doing is renaming the record format of the file so that you don't get the QRG2122 and QRG5063 compile time errors.


"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."

--Leonardo da Vinci

 
Thanks for all the help both suggestions helped I did the renaming and that cleared it up.

Thanks again . Have any of you used Visual RPG.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top