Solved

SNDRCVF error in CL Program

Posted on 2004-10-07
8
1,731 Views
Last Modified: 2012-06-21
I have created the following program, but I get an error during the compile that says SNDRCVF command not allowed.  Any suggestions would be appreciated:

PGM
DCLF                 FILE(DPALMES/SRCFILE)

DCL VAR (&OPTION) TYPE(*DEC) LEN(2)
DCL VAR(&IN03) TYPE(*LGL)

LOOP:
                         CHGVAR &OPTION 0
                         SNDRCVF          RCDFMT(SCREEN1)

                         IF                   &IN03 RETURN
                         IF                   (&OPTION *EQ 90) DO
                                               SIGNOFF *NOLIST
                                               ENDDO
                         GOTO LOOP
ENDPGM


0
Comment
Question by:dpalme
8 Comments
 
LVL 1

Author Comment

by:dpalme
ID: 12252894
Ok,
I finally figured out the sndrcvf error but when I hit the F3 key which is supposed to terminate the program it does nothing, in addition when I enter '90' it still does nothing.

Can anyone see where I have that wrong?

0
 
LVL 13

Expert Comment

by:samic400
ID: 12252968
Define the *IN03 key and &option within your display file...... It is sitting on the display waiting for something to happen.

0
 
LVL 1

Author Comment

by:dpalme
ID: 12253231
So I just need to add the field and give it the name IN03 correct?
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 1

Author Comment

by:dpalme
ID: 12253252
ok I added a field at the bottom

'F3 - Exit'

Gave it a name of IN03 and then saved the display file.  When I hit the F3 key when the program is running, I get function key not allowed.

Idea?
0
 
LVL 27

Assisted Solution

by:tliotta
tliotta earned 50 total points
ID: 12254786
dpalme:

In order to use a <Fn>-key, the display file must be configured for it. This can be done either at the file level or the format level. If it's done at the file level, the <Fn>-key will be enabled for all formats in the file.

To enable a <Fn>-key use the CAnn (Command Attention) keyword or the CFnn (Command Function) keyword:

     A          R SCREEN1
     A                                      CA03(03)
     A                                      CF06(06)

This would enable <F3> as a CA-key and <F6> as a CF-key. <F3> is associated with indicator IN03 and <F6> is associated with IN06.

In your CL program, the indicators would automatically be defined as logical variables with the names &IN03 and &IN06. You do not want to create any fields with names that match indicator names. The literal [F3 - Exit] is just a literal, nothing more.

The difference between CA- and CF-keys is basically that a CA-key only returns the indicator to your program, but a CF-key returns the indicator plus all the other fields from the screen. If you don't want to process any fields when <F3> is pressed, there's no reason for the values to be sent back to your program from the display file.

Tom
0
 
LVL 1

Author Comment

by:dpalme
ID: 12254834
How do I do this with SDA? Is that possible? Or do I need to edit the dds?
0
 
LVL 3

Accepted Solution

by:
Mind_nl earned 50 total points
ID: 12258657
In SDA you can use option 8 (Select Keywords) Put a 'Y' next to 'indicator keywords' and add CF03 as keyword and 03 in the Resp collum...
0
 
LVL 1

Author Comment

by:dpalme
ID: 12262142
Two of you got me where I needed to go so I'm going to increase the points by 50 and then split them.

Thanks Mind and tliotta

Douglas
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
HTTP *Admin and DCM 1 184
php iseries 3 229
AS400 BRMS - none enrolled tape 6 63
IBM TS3100 tape Library 3 37
Is your phone running out of space to hold pictures?  This article will show you quick tips on how to solve this problem.
ConnectWise and their customers need to ensure critical alerts automatically reach the right person at the right time. MSP superheros efficiently respond to these alerts key is providing automatic, intelligent alerting that generates a complete audi…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

790 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question