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     search using wildcards of different length.

Read-Only Read-Only Topic
Go
Search
Notify
Tools
search using wildcards of different length.
 Login/Join
 
Member
posted
Hi all,
I know we can have wild card search in FOCUS 7.1.1

TABLE FILE NAMEFILE
IF MYNAME EQ 'GP$*'

allows me pick all rows from NAMEFILE where field MYNAME has values starting with 'GP'. No matter what the lenght is after 'GP'. (like GP1, GP11, etc...all will be selected).

My question is -

My wildcard character is not fixed in size. Means, it can be G or GP or GPPP....till string lenght of 25.

I created a file of all such possible combinations and named it as WILDNAME. WILDNAME looks like this
GPP
G
GPPA
PG
1G
G1
...
...
But I cannot do,
IF MYNAME EQ '(WILDNAME)$*'

My code may look silly....but I hope it explains what I am trying to do.

Thanks,
GP.
 
Posts: 15 | Location: Third Rock from Sun | Registered: August 04, 2005Report This Post
Expert
posted Hide Post
FILEDEF SEARCH DISK SEARCH.TXT
-RUN

-WRITE SEARCH 'J$*'
-WRITE SEARCH 'TR$*'
-CLOSE SEARCH

TABLE FILE CAR
PRINT *
WHERE CAR IN FILE SEARCH ;
END
-RUN
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
<toby mills>
posted
Hey GP, I'm sure you've thought of this, so this must not be of much help.

What about saying

IF MYNAME CONTAINS 'G'?

Doesn't that cover all your possibilities?

-Toby
 
Report This Post
Expert
posted Hide Post
Gaurav, did my suggestion work for you?
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Member
posted Hide Post
Hi Francis,
Sorry for the late repsonse but the FILEDEF command doesnt seem to work for me in FOCUS 7.1.1 It says keyword not recognised - FILEDEF.
Hi Toby,
Contains was my initial thought but it doesnt help me. In your example - 'G' is a hardcoded value and I need it to be read from a file. Also main problem is variable lenght. It can be G or GG.

Any suggestions are welcome.
Gaurav
 
Posts: 15 | Location: Third Rock from Sun | Registered: August 04, 2005Report This Post
Expert
posted Hide Post
Gaurav,

There's absolutely no reason why the code I posted would not work in WebFOCUS 7.1.1

From the 7.1 manuals:
quote:
Syntax: How to Assign a Logical Name With FILEDEF Under UNIX

FILEDEF ddname devicetype fileid [[LRECL n] [RECFM fm] [APPEND]]
quote:
Syntax: How to Assign a Logical Name With Code Under Windows

FILEDEF ddname DISK [filename] [(APPEND] [LRECL n] [RECFM F]
quote:
Example: Specifying the Location of a Temporary Master File Under Windows

The following example specifies a location for a temporary Master File, and assigns a logical name to a physical data source.

FILEDEF HOLDMAST DIR C:\TMP
FILEDEF MKTSALES DISK C:\TMP\MKTSALES.FTM
TABLE FILE GGSALES
SUM DOLLARS BY REGION
ON TABLE HOLD AS MKTSALES FORMAT ALPHA
END
Perhaps the file needs to be allocated as .ftm:

FILEDEF SEARCH DISK search.ftm
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
<Joseph Coule>
posted
quote:
Originally posted by gppande:
[qb] Hi Francis,
Sorry for the late repsonse but the FILEDEF command doesnt seem to work for me in FOCUS 7.1.1 It says keyword not recognised - FILEDEF.
[/qb]
What platform? If it's FOCUS 7.1.1 (not webfocus), then I'd guess mainframe - either CMS or MVS/TSO. In CMS, the command would be "CMS FILEDEF" and the syntax would be a little different since it mirrors the actual native CMS FILEDEF syntax in terms of "filename filetype filemode."

If it's MVS/TSO, then FILEDEF definitely won't work. You'd need to use the comparable MVS command which is DYNAM ALLOC. Syntax of this is also different, due to the O/S requirements and differences in the file structure. You should check your CMS or TSO guide to operations manual for the exact syntax of FILEDEF or DYNAM ALLOC on the mainframe. It's also included in the online doc and in the documentation CDs.

JC
 
Report This Post
Expert
posted Hide Post
Sorry about that - I did not realize you're on Mainrame FOCUS.

This should work (I cannot test it). You MAY not need the -CLOSE.

DYNAM ALLOC DD SEARCH SPACE 2,2 TRACKS RECFM FB LRECL 20 BLKSIZE 0
-RUN

-WRITE SEARCH 'J$*'
-WRITE SEARCH 'TR$*'
-CLOSE SEARCH

TABLE FILE CAR
PRINT *
WHERE CAR IN FILE SEARCH ;
END
-RUN
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
<toby mills>
posted
Good one Francis! That should do the trick for him.

-Toby
 
Report 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     search using wildcards of different length.

Copyright © 1996-2020 Information Builders