Solved

SNDRCVF error in CL Program

Posted on 2004-10-07
8
1,699 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
Comment Utility
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
Comment Utility
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
Comment Utility
So I just need to add the field and give it the name IN03 correct?
0
 
LVL 1

Author Comment

by:dpalme
Comment Utility
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
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 27

Assisted Solution

by:tliotta
tliotta earned 50 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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 Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

In this article, you will read about the trends across the human resources departments for the upcoming year. Some of them include improving employee experience, adopting new technologies, using HR software to its full extent, and integrating artifi…
Scam emails are a huge burden for many businesses. Spotting one is not always easy. Follow our tips to identify if an email you receive is a scam.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

744 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now