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     reading with GETTOK for blank fields there may be

Read-Only Read-Only Topic
Go
Search
Notify
Tools
reading with GETTOK for blank fields there may be
 Login/Join
 
Gold member
posted
Hi,
123456789,,,,,,,,

is a line from comma delimited file. I am trying to read this line and make it into each field. This is defined as FILLER with length of 112 in total to read this one whle line in my master.

-*GETTOK(infield, inlen, token_number, 'delim', outlen, outfield)
SSN/A09 = GETTOK(FILLER,112,1,',',09,'A09'); <-- IS THE FIRST FIELD.
CELL/A10 = GETTOK(FILLER,112,2,',',10,'A10');
this wont work..WHEN it is a blank field if the users dont fill this field out etc. How do code for this if the field I am trying to print into each field is blank?
Thanks so much in advance.


on VMS: OpenVMS AXP V8.2 Prod and TestEnvironment
Webfocus: WebFocus 7.6.1 Prod and TestEnvironment
 
Posts: 71 | Registered: May 23, 2004Report This Post
Master
posted Hide Post
If you do just the SSN do you get the proper output? Is FILLER the only field in the master? Is it defined as A112 or A112V? Have you tried changing the 112 to FILLER.LEN or using ARGLEN to determine the actual length of the variable?

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


Pat
WF 7.6.8, AIX, AS400, NT
AS400 FOCUS, AIX FOCUS,
Oracle, DB2, JDE, Lotus Notes
 
Posts: 755 | Location: TX | Registered: September 25, 2007Report This Post
Platinum Member
posted Hide Post
I have concatenated on to the end of a field "extra" tokens things always work properly.

WORK/A115 = FILLER || ', , , ';
SSN/A09 = GETTOK(WORK,115,1,',',09,'A09');
CELL/A10 = GETTOK(WORK,115,2,',',10,'A10');


Jim Morrow
Web Focus 7.6.10 under Windows 2003
MVS 7.3.3



 
Posts: 129 | Registered: June 01, 2005Report This Post
Expert
posted Hide Post
Using your post to build an example, and it works OK for me. What errors / symptoms are you receiving?

EX -LINES 4 EDAPUT MASTER,tempmast,CV,FILE
FILENAME=TEMPMAST, SUFFIX=FIX,$
SEGNAME=ONE, SEGTYPE=S1 ,$
  FIELD=FILLER  ,ALIAS=  ,A112 ,A112 ,$
-RUN

FILEDEF tempmast DISK tempmast.ftm
-RUN

-WRITE tempmast 123456789,,,,,,,,

-RUN
DEFINE FILE tempmast
  SSN/A09 = GETTOK(FILLER,112,1,',',09,'A09');
  CELL/A10 = GETTOK(FILLER,112,2,',',10,'A10');
END
TABLE FILE tempmast
PRINT *
      SSN
      CELL
END

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report 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     reading with GETTOK for blank fields there may be

Copyright © 1996-2020 Information Builders