Solved

SNDRCVF error in CL Program

Posted on 2004-10-07
8
1,752 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
Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

 
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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

A hard and fast method for reducing Active Directory Administrators members.
This article describes a serious pitfall that can happen when deleting shapes using VBA.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

734 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