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     [SOLVED]Blank Character removed from my string

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED]Blank Character removed from my string
 Login/Join
 
Virtuoso
posted
I have this line of code:

FULL_DATA_LINE/A100 = PARKING_STREET_A30 | ',' | PARKING_CITY_A20 | ',' | PARKING_COUNTY_A3 | ',' | PARKING_ZIP_A5 | ',' | PARKING_ZIP_4_A4 | ',' | MAKE_NAME_A4 | ',' | MODEL_YEAR_A4 | ',' | TX_VIN_A19 | ',' | FUEL_CATEGORY_A2 | HEXBYT(32, 'A1');


. . . on this output type:

ON TABLE HOLD AS FUELTYPE FORMAT DFIX DELIMITER , HEADER NO


It's exactly 100 characters. That last character at the end of the string is not appearing in my file. Needless to say I started with a simple
| ' '
but that didn't work either. I can put an 'X' there and it prints. When I put a blank there it does me the favor of removing it.

Unfortunately I'm programming to a formal spec that asks for a blank on the end of the line. Any recommendations?

This message has been edited. Last edited by: <Emily McAllister>,



 
Posts: 1012 | Location: At the Mast | Registered: May 17, 2007Report This Post
Master
posted Hide Post
what about using the HEXBYT function?

... | HEXBYT(32,'A1');  


confusingly, the HEXBYT function uses the ASCII value of the character.


Eric Woerle
8.1.05M Gen 913- Reporting Server Unix
8.1.05 Client Unix
Oracle 11.2.0.2
 
Posts: 750 | Location: Warrenville, IL | Registered: January 08, 2013Report This Post
Master
posted Hide Post
oops, nevermind.... I didn't scroll all the way to the right.... I didn't see that you already did that.


Eric Woerle
8.1.05M Gen 913- Reporting Server Unix
8.1.05 Client Unix
Oracle 11.2.0.2
 
Posts: 750 | Location: Warrenville, IL | Registered: January 08, 2013Report This Post
Expert
posted Hide Post
John, since you're already computing the commas, perhaps there's no need for the DFIX output format. Maybe just ALPHA will work for you:

SET HOLDLIST=PRINTONLY
DEFINE FILE CAR
PARKING_STREET_A30/A30  = 'A23456789012345678901234567890';
PARKING_CITY_A20/A20    = 'B2345678901234567890';
PARKING_COUNTY_A3/A3    = 'C23';
PARKING_ZIP_A5/A5       = 'D2345';
PARKING_ZIP_4_A4/A4     = 'E234';
MAKE_NAME_A4/A4         = 'F234';
MODEL_YEAR_A4/A4        = 'G234';
TX_VIN_A19/A19          = 'H234567890123456789';
FUEL_CATEGORY_A2/A2     = 'I2';
END

FILEDEF FUELTYPE DISK baseapp/fuletype.txt

TABLE FILE CAR
PRINT
COUNTRY NOPRINT
COMPUTE FULL_DATA_LINE/A100 = PARKING_STREET_A30 | ',' | PARKING_CITY_A20 | ',' | PARKING_COUNTY_A3 | ',' | PARKING_ZIP_A5 | ',' | PARKING_ZIP_4_A4 | ',' | MAKE_NAME_A4 | ',' | MODEL_YEAR_A4 | ',' | TX_VIN_A19 | ',' | FUEL_CATEGORY_A2 | ' ';

ON TABLE SAVE AS FUELTYPE
END


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Virtuoso
posted Hide Post
And that worked? It kept your last space?



 
Posts: 1012 | Location: At the Mast | Registered: May 17, 2007Report This Post
Expert
posted Hide Post
Yes it does.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
This is the file: fuletype.txt


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Virtuoso
posted Hide Post
I'm having quite a day. I did this and I'm getting no CR/LF on the end of the line. It goes about 100 characters farther to the right.

I'm also getting a text field interpreted as a numeric field in a Recap in EXL2K format. It's the day when things don't work!

And then some joker is going to pull out a Worker Placement game tonight. Ain't gonna play.

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



 
Posts: 1012 | Location: At the Mast | Registered: May 17, 2007Report This Post
Expert
posted Hide Post
Did you try the code I posted? Seems to work for me.

Sorry for your troubles. What's a Worker Placement game? I don't like games and this doesn't sound enticing.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Virtuoso
posted Hide Post
Got it.

Two fields:
  FULL_DATA_LINE/A100 = PARKING_STREET_A30 | ',' | PARKING_CITY_A20 | ',' | PARKING_COUNTY_A3 | ',' | PARKING_ZIP_A5 | ',' | PARKING_ZIP_4_A4 | ',' | MAKE_NAME_A4 | ',' | MODEL_YEAR_A4 | ',' | TX_VIN_A19 | ',' | FUEL_CATEGORY_A2;
  BLANK_SPACE/A1 MISSING ON = MISSING;



Printed both of them and set a specific blank space delimiter:

TABLE FILE VEHICLES
BY FULL_DATA_LINE
BY BLANK_SPACE 
.
.
.
ON TABLE HOLD AS FUELTYPE FORMAT DFIX DELIMITER ' ' HEADER NO


Once I figured out I could set a blank character as the delimiter I realized I could put another field after it, an empty one, to get that last blank space put on the line by the Delimiter option. I should rename that second field to MISSING_SPACE.

Note that I removed the final space on the FULL_DATA_LINE field -- it was being incorrectly ignored but I don't want an upgrade to WebFOCUS to fix that and start sending two spaces. So I pulled it.

At this point I have the entire line as specified with no additional blank spaces at the end of it.


I closed out one of my three weirdo bugs today! Thanks for the help!



 
Posts: 1012 | Location: At the Mast | Registered: May 17, 2007Report This Post
Virtuoso
posted Hide Post
quote:
Originally posted by Francis Mariani:
Did you try the code I posted? Seems to work for me.

Sorry for your troubles. What's a Worker Placement game? I don't like games and this doesn't sound enticing.


I did try it, but the CR/LF was off to the far right for my output. Windows 2012 Server, I-Way V8.

Worker Placement is a game mechanic where other people can stop you from doing what you want to. It's incredibly frustrating after a day of working hard bugs. I don't get assigned easy bugs anymore.



 
Posts: 1012 | Location: At the Mast | Registered: May 17, 2007Report 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     [SOLVED]Blank Character removed from my string

Copyright © 1996-2020 Information Builders