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.



Read-Only Read-Only Topic
Go
Search
Notify
Tools
Truncated values
 Login/Join
 
Member
posted
If I execute the following code-

DEFINE FILE F09740
TMP_BASE_ADJ_TR3/P7 = TEAM_BASELINE_ADJ_TR3 * 1000000;
TMP_BASE_ADJ_TR6/P7 = TEAM_BASELINE_ADJ_TR6 * 1000000;
TMP_BASE_ADJ_TR9/P7 = TEAM_BASELINE_ADJ_TR9 * 1000000;
CHK_BASE_ADJ_TR3/A7 = EDIT(TMP_BASE_ADJ_TR3);
CHK_BASE_ADJ_TR6/A7 = EDIT(TMP_BASE_ADJ_TR6);
CHK_BASE_ADJ_TR9/A7 = EDIT(TMP_BASE_ADJ_TR9);
END
-*
TABLE FILE F09740
PRINT PLANT_COMPANY CHK_BASE_ADJ_TR3 CHK_BASE_ADJ_TR6 CHK_BASE_ADJ_TR9
WHERE PLAN_ID IS 'BASEPLAN'
WHERE PLANT_CODE IS 'RA '
WHERE TEAM_ID IS 'CABSN'
WHERE CCICS_SEMESTER_ID IS '01050224'
-*
END

The output is -

PLANT_COMPANY USRX
CHK_BASE_ADJ_TR3 0713000
CHK_BASE_ADJ_TR6 0733700
CHK_BASE_ADJ_TR9 0754500

If I execute -

DEFINE FILE F09740
TMP_BASE_ADJ_TR3/P7 = TEAM_BASELINE_ADJ_TR3 * 1000000;
TMP_BASE_ADJ_TR6/P7 = TEAM_BASELINE_ADJ_TR6 * 1000000;
TMP_BASE_ADJ_TR9/P7 = TEAM_BASELINE_ADJ_TR9 * 1000000;
CHK_BASE_ADJ_TR3/A7 = EDIT(TMP_BASE_ADJ_TR3);
CHK_BASE_ADJ_TR6/A7 = EDIT(TMP_BASE_ADJ_TR6);
CHK_BASE_ADJ_TR9/A7 = EDIT(TMP_BASE_ADJ_TR9);
END
-*
TABLE FILE F09740
PRINT PAYROLL_COMPANY CHK_BASE_ADJ_TR3 CHK_BASE_ADJ_TR6 CHK_BASE_ADJ_TR9
WHERE PLAN_ID IS 'BASEPLAN'
WHERE PLANT_CODE IS 'RA '
WHERE TEAM_ID IS 'CABSN'
WHERE CCICS_SEMESTER_ID IS '01052004'
-*
ON TABLE SAVE AS SAVE2
END
-IF &RECORDS EQ 0 GOTO NOCALC;
-RUN
-*
-READ SAVE2 &PAYCO.A4., &BBATR3.I6., &BBATR6.I6., &BBATR9.I6.
-IF &BBATR3 GT 8000 OR &BBATR6 GT 8000 OR &BBATR9 GT 8000 THEN GOTO EXIT5093;
-RUN
-*


I inserted the last 'IF' statement to get a display of what the fields were to confirm that
the values were getting incosistently formatted. The execution resulted in the following:

IF 71300 GT 8000 or 07337 GT 8000 or 000754 GT 8000 then GOTO EXIT5093;

Note that 0713000 has become 71300,
0733700 has become 07337 and 0754500 has become 000754

The definition of the original database field names are as follows:

FIELD=TEAM_BASELINE_ADJ_TR3 ,ALIAS=TBATRIG3,FORMAT=P9.4
FIELD=TEAM_BASELINE_ADJ_TR6 ,ALIAS=TBATRIG6,FORMAT=P9.4
FIELD=TEAM_BASELINE_ADJ_TR9 ,ALIAS=TBATRIG9,FORMAT=P9.4


Why are the fields read from SAVE2 inconsistently formatted?

Thanks for any help you can provide.
 
Posts: 10 | Registered: May 11, 2005Report This Post
Platinum Member
posted Hide Post
Ricky,

It's because your saved numeric fields are 7 characters long, not 6. Your save file looks like this:

USRX071300007337000754500

Use .I7. to break that up as it should be (with | to visually demarcate the fields), and it would parse like this:

USRX|0713000|0733700|0754500

Tell FOCUS that your numeric fields are 6 characters, as you did in your -READ, and it looks like this:

USRX|071300|007337|000754|500
 
Posts: 135 | Location: Portland, OR | Registered: March 23, 2005Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic


Copyright © 1996-2020 Information Builders