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     ACROSS Verb Question

Read-Only Read-Only Topic
Go
Search
Notify
Tools
ACROSS Verb Question
 Login/Join
 
Member
posted
FOCUS MVS/390 V7.3

Hi all,
I was wondering if any of you could help me with the following case:

I have a file that looks like this:

ID CustCD CustDT CustAmt
-- ------ -------- -------
01 00001 12/31/04 12.50
01 00002 12/31/05 14.50
02 00001 12/12/05 10.00
03 00001 11/21/04 13.00
03 00001 12/22/05 12.00

I want file to look like this:

ID CustCD CustDT CustAmt CustCD CustDT CustAmt
-- ------ -------- ------- ------ -------- -------
01 00001 12/31/04 12.50 00002 12/31/05 14.50
02 00001 12/12/05 10.00 0 0 0.00
03 00001 11/21/04 13.00 00001 12/22/05 12.00

Your help is greatly appreciated.

Thanks,

Alaga
 
Posts: 9 | Registered: June 04, 2007Report This Post
Expert
posted Hide Post
Alaga, you're going to want to define a variable that enumerates the number of records per ID.
There are several ways to do this, the least elegant of which might be:
DEFINE FILE ..
FLAG/I4=IF ID NE LAST ID THEN 1 ELSE 1 + LAST ID;
END
TABLE FILE ...
SUM CustCD CustDT CustAMT
BY ID
ACROSS FLAG AS ''
END




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
 
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003Report This Post
Virtuoso
posted Hide Post
I think this could be done a little more simply:
-*maybe NODATA if required
SET NODATA=0
TABLE FILE fileName
SUM CustCD CustDT CustAMT
BY ID
ACROSS CUST_CD NOPRINT
END


(There is no such concept as 'least elegant' Susannah, just different approaches.)


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
Member
posted Hide Post
Thank you all for your responses.

It worked both ways.

Your help is greatly appreciated.

Alaga.
 
Posts: 9 | Registered: June 04, 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     ACROSS Verb Question

Copyright © 1996-2020 Information Builders