Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

SNDRCVF error in CL Program

Posted on 2004-10-07
8
Medium Priority
?
1,808 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
 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

 
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 200 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 200 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

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

Question has a verified solution.

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

Instead of error trapping or hard-coding for non-updateable fields when using QODBC, let VBA automatically disable them when forms open. This way, users can view but not change the data. Part 1 explained how to use schema tables to do this. Part 2 h…
If you are a mobile app developer and especially develop hybrid mobile apps then these 4 mistakes you must avoid for hybrid app development to be the more genuine app developer.
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

722 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