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] var length field prepending length or adding trailing spaces w/ TABLE SAVE

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] var length field prepending length or adding trailing spaces w/ TABLE SAVE
 Login/Join
 
Gold member
posted
I have fex that executes a stored procedure that returns 3-??? number of records. For each record there is a field that is variable length. Once I get the date from SQL, I need to write just the variable length field to an .hl7 file for an an external vendor to use.

Here is the code I am using.

SQL SQLMSS
EX dbo.usp_UpdateEMRDataAllTest '&ProcessingID';
TABLE FILE SQLOUT
PRINT EMRDemographicID SortOrder EMRRecord
ON TABLE HOLD AS HDATA FORMAT ALPHA
END

TABLE FILE HDATA
WRITE EMRRecord
BY EMRDemographicID NOPRINT
BY SortOrder NOPRINT
ON TABLE SAVE AS EMRUPLD FORMAT ALPHA
END

EMRRecord is a varchar field. There are three records for each EMRDemographicID, represented by SortOrder (1, 2, or 3). The EMRRecord for all SortOrder = 1 records is 124 characters line. The others may be as little as 20 or as large as 1250.

The problem I am having, is the first 6 digits of each line in the EMRUPLD file is the 6 digit length of EMRRecord. I need to exclude the length from the file I am created.

I have tried SQL SQLMSS SET VARCHAR OFF. This does eliminate the 6 digit length at the beginning of each line, but adds trailing spaces to the end of each line. Which will not be accepted by the external vendor.

Is there a way to print/write EMRRecord to a file without prepending the 6 digit length or adding all the trailing spaces?

Thank you,
Deana

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


WebFOCUS 7.6.8 and 7.7.03; Windows Server 2003 R2 and Windows Server 2008 R2, respectively; Development environments - Windows Server 2003 R2 and Windows 7 Professional, respectively;
excel, html, pdf
 
Posts: 89 | Registered: March 19, 2011Report This Post
Expert
posted Hide Post
A suggestion I have is to use PUTDDREC.

This function allows you to write out to a DD Name and also specify the length of the record to write.

This is an example of writing out to a file with variable length records.


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
Waz,

Thank you so much. This worked wonderfully well. I really appreciate your assistance.

Deana


WebFOCUS 7.6.8 and 7.7.03; Windows Server 2003 R2 and Windows Server 2008 R2, respectively; Development environments - Windows Server 2003 R2 and Windows 7 Professional, respectively;
excel, html, pdf
 
Posts: 89 | Registered: March 19, 2011Report This Post
Expert
posted Hide Post
This recent response might also help:

[CLOSED]6-digit character count on ALPHA


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
  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] var length field prepending length or adding trailing spaces w/ TABLE SAVE

Copyright © 1996-2020 Information Builders