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] How to remove the preceding Numbers from the original values

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] How to remove the preceding Numbers from the original values
 Login/Join
 
Silver Member
posted
Hi Everyone

I need to get the data from the table and try write the data in the file.

But file created successfully with out any issues. I did not get the exact value from the table. Data is mismatch now.

For Example:

If the data in the table looks like "1105" but in the file data will have "0000041105" look like.

How to resolve this issue ?


Thanks in advance

This message has been edited. Last edited by: FP Mod Chuck,


WebFOCUS 8
Windows, All Outputs
 
Posts: 35 | Registered: February 17, 2017Report This Post
Virtuoso
posted Hide Post
You'll have to show us what your report looks like. Can you give us an example of what you're doing in the FOCUS code?

If you're in InfoAssist, click the magnifying glass on the top to see the actual code, copy and paste it here so we can see what's happening.


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Expert
posted Hide Post
Turn VARCHAR off, or DEFINE the column as A4


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Silver Member
posted Hide Post
This is the .Fex I am using

-* Fetch the record from the QAD_VD_MSTR
TABLE FILE QAD_JFRA_VD_MSTR
PRINT VD_ADDR VD_CR_TERMS VD_CURR VD__LOG01 VD_TYPE
ON TABLE SAVE AS QAD_JFRA_VD_MSTR_INFO
END
-RUN

-* Assign the variable values
-SET &VD_MSTR_NO_RECS = &RECORDS;
-SET &DATA_ROW_VD_MSTR = '';

-* Change the File attribute from Overwrite to Append
FILEDEF FILE_VD_MSTR DISK /ETL/app/dm/dev/ibi/apps/vedw_test/smtp_test/vd_mstr.ftm (APPEND
-RUN

-* Make the Loop to get all the records from the table
-REPEAT VD_MSTR_ROWS &VD_MSTR_NO_RECS TIMES
-READ QAD_JFRA_VD_MSTR_INFO &VD_ADDR.A80 &VD_CR_TERMS.A80 &VD_CURR.A30 &VD__LOG01.I11 &VD_TYPE.A30
-SET &VDADDR = TRUNCATE(&VD_ADDR);
-SET &VDCRTERMS = TRUNCATE(&VD_CR_TERMS);
-SET &VDCURR = TRUNCATE(&VD_CURR);
-SET &VDLOG01 = &VD__LOG01;
-SET &VDTYPE = TRUNCATE(&VD_TYPE);

-*-TYPE &VDADDR &VDCRTERMS &VDCURR &VDLOG01 &VDTYPE

-* Concatenate all the column values and write the file
-SET &DATA_ROW_VD_MSTR = &VDADDR || &DELIMIT || &VDCRTERMS || &DELIMIT || &VDCURR || &DELIMIT || &VDLOG01 || &DELIMIT || &VDTYPE;
-WRITE FILE_VD_MSTR &DATA_ROW_VD_MSTR



Please help me....


WebFOCUS 8
Windows, All Outputs
 
Posts: 35 | Registered: February 17, 2017Report This Post
Silver Member
posted Hide Post
quote:
Originally posted by BabakNYC:
You'll have to show us what your report looks like. Can you give us an example of what you're doing in the FOCUS code?

If you're in InfoAssist, click the magnifying glass on the top to see the actual code, copy and paste it here so we can see what's happening.



This is the .Fex I am using

-* Fetch the record from the QAD_VD_MSTR
TABLE FILE QAD_JFRA_VD_MSTR
PRINT VD_ADDR VD_CR_TERMS VD_CURR VD__LOG01 VD_TYPE
ON TABLE SAVE AS QAD_JFRA_VD_MSTR_INFO
END
-RUN

-* Assign the variable values
-SET &VD_MSTR_NO_RECS = &RECORDS;
-SET &DATA_ROW_VD_MSTR = '';

-* Change the File attribute from Overwrite to Append
FILEDEF FILE_VD_MSTR DISK /ETL/app/dm/dev/ibi/apps/vedw_test/smtp_test/vd_mstr.ftm (APPEND
-RUN

-* Make the Loop to get all the records from the table
-REPEAT VD_MSTR_ROWS &VD_MSTR_NO_RECS TIMES
-READ QAD_JFRA_VD_MSTR_INFO &VD_ADDR.A80 &VD_CR_TERMS.A80 &VD_CURR.A30 &VD__LOG01.I11 &VD_TYPE.A30
-SET &VDADDR = TRUNCATE(&VD_ADDR);
-SET &VDCRTERMS = TRUNCATE(&VD_CR_TERMS);
-SET &VDCURR = TRUNCATE(&VD_CURR);
-SET &VDLOG01 = &VD__LOG01;
-SET &VDTYPE = TRUNCATE(&VD_TYPE);

-*-TYPE &VDADDR &VDCRTERMS &VDCURR &VDLOG01 &VDTYPE

-* Concatenate all the column values and write the file
-SET &DATA_ROW_VD_MSTR = &VDADDR || &DELIMIT || &VDCRTERMS || &DELIMIT || &VDCURR || &DELIMIT || &VDLOG01 || &DELIMIT || &VDTYPE;
-WRITE FILE_VD_MSTR &DATA_ROW_VD_MSTR


WebFOCUS 8
Windows, All Outputs
 
Posts: 35 | Registered: February 17, 2017Report This Post
Virtuoso
posted Hide Post
Could you also explain what you're attempting to do? I have a feeling you're using Dialogue Manager when you should actually use TABLE which might be much easier.


WebFOCUS 8206, Unix, Windows
 
Posts: 1853 | Location: New York City | Registered: December 30, 2015Report This Post
Expert
posted Hide Post
The leading six digits is the actual length of the data: VARCHAR

So, for 1105, with VARCHAR ON, the value is 0000041105
For 123456789, its 000009123456789.

To fix, TURN VARCHAR OFF, or,
DEFINE FILE TABLENAME
NEW_COL/A9 = varchar_9_column
END

then TABLE FILE out NEW_COL.

You can try ON TABLE HOLD AS QAD_JFRA_VD_MSTR_INFO FORMAT ALPHA

Basic Stuff...


Tom Flynn
WebFOCUS 8.1.05 - PROD/QA
DB2 - AS400 - Mainframe
 
Posts: 1972 | Location: Centennial, CO | Registered: January 31, 2006Report This Post
Platinum Member
posted Hide Post
Once try, this by keeping a command
"on table set holdlist printonly"
 
Posts: 109 | Registered: February 02, 2016Report 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] How to remove the preceding Numbers from the original values

Copyright © 1996-2020 Information Builders