Solved

SNDRCVF error in CL Program

Posted on 2004-10-07
8
1,742 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering 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
c# call as400 program with integer parameters 5 594
AS/400 Backup to Disk 7 523
IBM i Break Messages 1 24
Selecting rows in WHERE clause vs JOIN 4 15
Building a cohesive image for your brand is vital to making an impression on consumers. When the economy is tough, brands do better than unbranded  products. This can have a huge impact on your long-term profits, as the economy goes up and down.
Read our guide on how to survive being on-call.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

749 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