Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Possible thru MATCH

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Possible thru MATCH
 Login/Join
 
Gold member
posted
Hi,

I have a online screen.
Eg:

CRTFORM LINE 3 NOCLEAR
" OPTION 1 -- ADD A NEW NAME TO THE TABLE "
" NAME (2 POS. EX. AB OR BC ) . :

If the Name is not equal to one of the following
it should throw error message.
Possible value are : AB or BC or CD or XY or YX

Is that possible to accomplish in MATCH
or is there any other alternative ways are there.

Please let me know

This message has been edited. Last edited by: Kerry,


WebFOCUS 7.6.13

Mainframe
all output (Report in mainframe)
 
Posts: 64 | Registered: February 24, 2010Report This Post
Expert
posted Hide Post
Yes,


Is this a DM CRTFORM or a MODIFY one ?


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Gold member
posted Hide Post
Hi Waz,
Its for MODIFY...


WebFOCUS 7.6.13

Mainframe
all output (Report in mainframe)
 
Posts: 64 | Registered: February 24, 2010Report This Post
Expert
posted Hide Post
Are you able to post a code snippet, so we can see your process.

After the CRTFORM you will need to have code checking the value for NAME, then if it is not valid loop back to the CRTFORM with a message.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Gold member
posted Hide Post
Below is the sample code

  


SET PF12=RETURN
MODIFY FILE NAMETAB
COMPUTE
REPLY/I1=;
PFKEY/A4=;

CRTFORM LINE 3 NOCLEAR
" OPTION 1 -- ADD A NEW NAME TO THE TABLE "
" NAME (2 POS. EX. AB OR BC ) .
MATCH NM
ON MATCH TYPE
"NAME ON MATCH REJECT
ON NOMATCH INCLUDE
  

The name value needs to checked..
The valid name values are : AB BC CD XY YZ
If the name value is not any one of the above it has to send an error.

Hope I'm clear..

This message has been edited. Last edited by: Poryes,


WebFOCUS 7.6.13

Mainframe
all output (Report in mainframe)
 
Posts: 64 | Registered: February 24, 2010Report This Post
Virtuoso
posted Hide Post
Hi,

Please put your code between
[ CODE]  
[ /CODE]

by using the rightmost icon < /> in your post.


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

 
Posts: 1980 | Location: Tel Aviv, Israel | Registered: March 23, 2006Report This Post
Gold member
posted Hide Post
Thanks Danny. I added the code in between the icon.


WebFOCUS 7.6.13

Mainframe
all output (Report in mainframe)
 
Posts: 64 | Registered: February 24, 2010Report This Post
Expert
posted Hide Post
What happens when you run the code with valid or invalid values ?


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Gold member
posted Hide Post
Hi Waz,

It adds the name values even if its a not a valid values.


WebFOCUS 7.6.13

Mainframe
all output (Report in mainframe)
 
Posts: 64 | Registered: February 24, 2010Report This Post
Expert
posted Hide Post
Its been a very long time, but could it be related to display/turnaround fields.

Turnaround tag is T., e.g. T.NM, I think its used in the CRTFORM.

A Mainframe modify manual would be useful right now.

Sweating


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Virtuoso
posted Hide Post
It's been a while, but...

Use VALIDATE, or IF ... GOTO, to impose the edit rule (returning to the crtform if an invalid value is entered).

For instance
VALIDATE name/I1=NAME IN ('AB', ..., 'YZ');
or
IF NOT (NAME IN ('AB', ..., 'YZ')) GOTO ...;
or
COMPUTE ErrMsg/A40=IF NAME IN ('AB', ..., 'YZ') THEN '' ELSE 'Invalid NAME';
IF ErrMsg NE '' GOTO ...;
( and show in the crtform )


- Jack Gross
WF through 8.1.05
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Gold member
posted Hide Post
Thanks Jack.

I tried with IF NOT (NAME IN ('AB', ..., 'YZ')) GOTO ...;

Below is my code,
SET PF12=RETURN
MODIFY FILE NAMETAB
COMPUTE
REPLY/I1=;
PFKEY/A4=;
.
.
.
.

CASE OPTION1
COMPUTE
CRTFORM LINE 3 NOCLEAR
" OPTION 1 -- ADD A NEW NAME TO THE TABLE "
" NAME (2 POS. EX. AB OR BC ):
IF NOT (NM IN ('AB' OR 'BC' OR 'CD' OR 'XY OR 'YZ')) GOTO OPTION1;
I'm getting below error message.
(FOC774) THE WORD 'IN' MUST APPEAR IN A VALID CLAUSE

Pls Help..

Ps: Even I tried with IF NOT NM IN ('AB' OR 'BC' OR 'CD' OR 'XY OR 'YZ') GOTO OPTION1; But same error.


WebFOCUS 7.6.13

Mainframe
all output (Report in mainframe)
 
Posts: 64 | Registered: February 24, 2010Report This Post
Expert
posted Hide Post
I don't beleive that MODIFY supports IN.

You will have to use value OR value, etc


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Virtuoso
posted Hide Post
Try something like this (didn't test it, I don't have the old modify crtform capability any more):
SET PF12=RETURN
MODIFY FILE NAMETAB
COMPUTE REPLY/I1=;
        PFKEY/A4=;
        MSG/A50=;
....

CASE OPTION1
CRTFORM LINE 3 NOCLEAR
" OPTION 1 -- ADD A NEW NAME TO THE TABLE "
" NAME (2 POS. EX. AB OR BC ): <NM"
" <D.MSG>"
COMPUTE MSG = 'SORRY, NEW NAME MUST BE AB, BC, CD, XY OR YZ.';
IF 'AB-BC-CD-XY-YZ' OMITS NM THEN GOTO OPTION1;
COMPUTE MSG=' ';

...

ENDCASE


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Virtuoso
posted Hide Post
quote:
IF NOT (NM IN ('AB' OR 'BC' OR 'CD' OR 'XY OR 'YZ')) GOTO OPTION1;


Use , as the separator in the list of values (as I indicted) -- not OR.
 
Posts: 1925 | Location: NYC | In FOCUS since 1983 | Registered: January 11, 2005Report This Post
Master
posted Hide Post
Mainframe MODIFY Manual

This message has been edited. Last edited by: jgelona,


In FOCUS since 1985. Prod WF 8.0.08 (z90/Suse Linux) DB (Oracle 11g), Self Serv, Report Caster, WebServer Intel/Linux.
 
Posts: 975 | Location: Oklahoma City | Registered: October 27, 2006Report This Post
Expert
posted Hide Post
Aahh, that where they put it.

Smiler


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Gold member
posted Hide Post
Thanks J.gross and jgelona .

GamP - I tried with below code getting the error message.

  

COMPUTE
CRTFORM LINE 3 NOCLEAR
"OPTION 1 -- ADD A NEW NAME TO THE TABLE "
"STATE (2 POS.EX.OR WA) . :""
COMPUTE MSG = 'SORRY, NEW NAME MUST BE AB, BC, CD, XY OR YZ.';
IF 'AB-BC-CD-XY-YZ' OMITS NM THEN GOTO OPTION1;
COMPUTE MSG=' ';
*
  


Error Message: (FOC282) RESULT OF EXPRESSION IS NOT COMPATIBLE WITH THE FORMAT OF FIELD: MDIF::::

Am I missing something?
  
  


WebFOCUS 7.6.13

Mainframe
all output (Report in mainframe)
 
Posts: 64 | Registered: February 24, 2010Report This Post
Virtuoso
posted Hide Post
COMPUTE REPLY/I1=; PFKEY/A4=; MSG/A50=;
Could it be you missed the COMPUTE for MSG in the top of the modify?


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Gold member
posted Hide Post
No GamP. I added it on the top.

MSG/A25=;


WebFOCUS 7.6.13

Mainframe
all output (Report in mainframe)
 
Posts: 64 | Registered: February 24, 2010Report This Post
Virtuoso
posted Hide Post
quote:
MSG/A25=;

Yeah, that's fine, but remember that it has to be of a format that can hold the message put in to it. 25 characters isn't that much, and if you took the code from my example it needs at least 45 characters.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Gold member
posted Hide Post
Hi GamP,

I changes the MSG/a45=; But still facing the same issue


WebFOCUS 7.6.13

Mainframe
all output (Report in mainframe)
 
Posts: 64 | Registered: February 24, 2010Report This Post
Virtuoso
posted Hide Post
Then it must be something else that's causing the problem.
Since I don't have the CRTFORM capability anymore I ended up coding a small modify without it, but with the validation logic:
FILEDEF OUT DISK NAMTAB.MAS
-RUN

-WRITE OUT FILENAME=NAMTAB, SUFFIX=FOC, $
-WRITE OUT SEGNAME=NAMTAB, SEGTYPE=S1, $
-WRITE OUT FIELDNAME=NM, FORMAT=A2, $
-RUN

MODIFY FILE NAMTAB
COMPUTE MSG/A45=;
FIXFORM NM/2
PERFORM OPTION1

CASE OPTION1
COMPUTE MSG = 'SORRY, NEW NAME MUST BE AB, BC, CD, XY OR YZ.';
IF 'AB-BC-CD-XY-YZ' CONTAINS NM THEN GOTO ENDCASE;
TYPE "<NM - <MSG"
ENDCASE

DATA
AB
AC
AD
AE
XY
XZ
END
See if you can run this code without a problem. On my system I can.


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Expert
posted Hide Post
Could you post the entire MODIFY, or repro with one of the sample FOCUS files.

You may have to put in a case with Techsupport.

One of the difficulties, it that many of us do not have Mainframe FOCUS available to checking these things out.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Possible thru MATCH

Copyright © 1996-2020 Information Builders