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     [WORKAROUND] Report caster procedure application

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[WORKAROUND] Report caster procedure application
 Login/Join
 
Gold member
posted
We have over 300 reports set up in report caster & have recently had to provide information to another department with a description of what the jobs do. In addition to this we had to provide samples of the reports.

As a lot of the reports were ported over from our old mainframe version we didnt have documentation about why & what they did & had to note this somewhere.

Ive now created a rather simple application which reads the report caster tables BOTSCHED & BOTTASK & presents you with a list of all the jobs with clickable links to create notes. these notes are saved into BOTADDITIONAL - an extra sql table I knocked up. There isnt any validation on characters as yet but seems to do the job pretty well so far. I just thought id offer up the source code to anyone who felt that it may be useful.

Im just going through the fex's getting rid of old development code at the mo but can fire copies off when this is done.


btw...going on paternity soon, when is in the hands of the gods. so if i dont reply straight away its because ive got my hands full Smiler

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


81.05 All formats
 
Posts: 56 | Location: Manchester | Registered: November 21, 2006Report This Post
Virtuoso
posted Hide Post
Sounds like something very useful! Since I've set up almost all of our 100 or so jobs, I know what they all do, but if that job ever gets passed on, who knows? (Documentation? What's that?)

This might be a good idea for an NFR - maybe add a large text or BLOB field to those RC tables to allow for a lengthy description or sample report.

This message has been edited. Last edited by: Darin Lee,


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Report This Post
Expert
posted Hide Post
PBax, this sounds really great.
How about writing up an article... lots of developers write up an entire article, with code & screen shots, when they have something cool like this.
here is the link




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
Gold member
posted Hide Post
I dont think its perfect be any means & im sure a lot of it could be written better which is what Im trying to fit in at the moment.

Once ive minimised the code & got everything cleaned up I will make the code available & write an article.


81.05 All formats
 
Posts: 56 | Location: Manchester | Registered: November 21, 2006Report This Post
Gold member
posted Hide Post
havent had much time to progress the article but thought it would be worth posting up what I had here prior to completion to see if anyone found it useful. Smiler

We recently had a request to provide information on all our reporting procedures, which are primarily delivered by Report Caster, detailing the purpose of the reports. We found that we didn’t hold any additional documentation for many of the historic jobs that had been ported from our old mainframe environment. The ideal solution needed to be a simple method of recording this information with the minimum of input.


I opted to create an application using the report caster tables BOTSCHED & BOTTASK. This meant that all the distribution information etc was already available and duplicate input was not required. I created an additional table called BOTADDITIONAL to hold the inputted notes.


The following is a summary of the tables. In each case, packetid is the key field.

BOTSCHED

Parent entry of information in report caster. (default RC table)

BOTTASK

Entry for each of the tasks associated to the parent entry. (default RC table)


BOTADDITIONAL

Entry for each occurrence of packetid in BOTSCHED. (user created table)


I shall be incorporating additional tables in future releases. i.e BOTDEST which contains the individual email addresses of email recipients. The application detailed in this article is more of a starting point to provide an easily implemented solution

Before I continue this article, one thing to note is how we enter jobs in Report Caster. Each job is allocated an ID using the logic RCnnnnn. This Id is entered as the first 6 character of the Job Description and is parsed within the fex’s that read the information.



The following part screen shot shows a test entry and is the main view of the application. I have omitted the top part of the screen which contains our company logo and department information.









































This is the code for the reporting procedure executed in iframe1 of the application and is executed upon launch to present all the procedures in a scrollable window. The search button is set to re-present any jobs meeting the search criteria within the same window.

SET HTMLCSS = ON
SET PAGE-NUM = OFF
SET LEFTMARGIN = 0
SET TITLE = ON
SET TOPMARGIN = 0
-*****************************************************************************
-* random value to include in the drill down URL
-*****************************************************************************
-SET &RANDOM = RDUNIF(D5) * RDUNIF(D5) * 10000;
-RUN
-*****************************************************************************
-* default values for initial report run
-*****************************************************************************
-DEFAULTS &JOBVAR=' ';
-RUN

JOIN PACKETID IN BOTSCHED TO ALL PACKETID IN BOTTASK AS PBY

DEFINE FILE BOTSCHED
-*****************************************************************************
-* Extracting allocated job ID fromJob Description
-*****************************************************************************
RCID/A6=EDIT(JOBDESC,'999999');
RANDOM/A10='&RANDOM';
-*****************************************************************************
-*Converting Job description to Upper Case for search logic
-*****************************************************************************
UJOBDESC/A255=UPCASE(255, JOBDESC, 'A255');
-*****************************************************************************
-*Drill down values for main report
-*****************************************************************************
ADDNOTE/A8='Add Note';
DETAILS/A7='Details';
END

TABLE FILE BOTSCHED
PRINT
PACKETID NOPRINT
RANDOM NOPRINT
BY RCID AS 'ID'
BY JOBDESC AS 'Job Description'
BY MAILSUBJECT AS 'Subject title'
BY ADDNOTE AS ' '
BY DETAILS AS ' '
-*****************************************************************************
-*Optional where statement depending on whether a search value has been sent
-*****************************************************************************
-IF &JOBVAR EQ ' ' GOTO SKIPVAR;
WHERE UJOBDESC CONTAINS '&JOBVAR'
-SKIPVAR

ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET STYLE *
UNITS=IN,
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
GRID=OFF,
FONT='ARIAL',
SIZE=9,
$
-*****************************************************************************
-*Calling the Detailed view report
-*****************************************************************************
TYPE=DATA,
COLUMN=N5,
TARGET='_parent',
FOCEXEC=rc_kick_detailed( \
JOBVAR=N2 \
RANDOM=N7 \
PACKVAR=N6 \
),
$
-*****************************************************************************
-* Calling the application that allows the updating of notes
-*****************************************************************************
TYPE=DATA,
SQUEEZE=OFF,
COLUMN=N4,
TARGET='_parent',
FOCEXEC=rc_kick_update_notes( \
JOBVAR=N2 \
RANDOM=N7 \
),
$
TYPE=TITLE,
STYLE=-UNDERLINE+BOLD,
$
ENDSTYLE
END


Clicking the ‘Details’ link allows us to view further details about the Job Description. This executes rc_kick_detailed, which in turn brings up a further HTML page. This HTML page contains 2 reports showing recipient/distribution list, tasks, output format & also any notes that have been input.



















































This report can include as much information as you require but we found this would suffice our current requirements.
The code for the above report is as shown below.

SET HTMLCSS = ON
SET PAGE-NUM = OFF
SET LEFTMARGIN = 0
SET TITLE = ON
SET TOPMARGIN = 0

-*****************************************************************************
-* random value to include in the drill down URL
-*****************************************************************************
-SET &RANDOM = RDUNIF(D5) * RDUNIF(D5) * 10000;
-RUN

-DEFAULTS &JOBVAR=' ', &NVAR=' '
-RUN

JOIN PACKETID IN BOTSCHED TO ALL PACKETID IN BOTTASK

DEFINE FILE BOTSCHED
RCID/A6=EDIT(JOBDESC,'999999');
ADDNOTE/A8='Add Note';
RANDOM/A10='&RANDOM';
END

TABLE FILE BOTSCHED

PRINT
PACKETID NOPRINT
TASKOBJ AS 'Focexec'
SENDFORMAT AS 'Output Format'
RANDOM NOPRINT
BY RCID AS 'ID'
BY JOBDESC AS 'Job Description'
BY MAILSUBJECT AS 'Subject title'
BY DISTLIST AS 'Distribution'
BY CASTER_USER AS 'RC Segment' NOPRINT
-************************************************************
-*Retrieving job description sopecified from the main view
-************************************************************
WHERE JOBDESC EQ '&JOBVAR'
HEADING
"ID <+0> "
"Job Description <+0> "
"Edit Notes "
ON TABLE NOTOTAL
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET STYLE *
UNITS=IN,
SQUEEZE=ON,
ORIENTATION=PORTRAIT,
$
TYPE=REPORT,
GRID=OFF,
FONT='ARIAL',
SIZE=9,
$
TYPE=TITLE,
STYLE=-UNDERLINE+BOLD,
$
TYPE=HEADING,
LINE=1,
ITEM=1,
STYLE=BOLD,
SIZE=13,
$
TYPE=HEADING,
LINE=3,
ITEM=1,
STYLE=BOLD,
SIZE=13,
$
TYPE=HEADING,
LINE=1,
ITEM=2,
POSITION=1.64,
SIZE=15,
STYLE=BOLD,
$
TYPE=HEADING,
LINE=3,
ITEM=2,
POSITION=.5,
STYLE=BOLD,
SIZE=15,
$
TYPE=HEADING,
LINE=5,
TARGET='_parent',
FOCEXEC=rc_kick_update_notes( \
JOBVAR='&JOBVAR' \
PACKVAR=N6 \
RANDOM=N10 \
),
$
ENDSTYLE
END


The job to update the notes we called rc_update_notes & the code is shown below.

SET HOLDFORMAT = ALPHA
SET HOLDLIST = PRINTONLY


TABLE FILE BOTSCHED
PRINT JOBDESC
WHERE RECORDLIMIT EQ 1
WHERE PACKETID EQ '&PACKVAR'
ON TABLE HOLD AS RCNVAR
END
-RUN

-READ RCNVAR &JOBVAR2.A90
-RUN

-SET &JOBVAR=EDIT(&JOBVAR2,'$$$$$$999999999999999999999999999999999999999999999999999999999999999999999999999999999999');
END

TABLE FILE BOTSCHED
PRINT PACKETID NOPRINT
COMPUTE SQL/A500 = 'DELETE FROM dbo.BOTADDITIONAL WHERE PACKETID =(' ||
'''' || PACKETID || '''' ||
')';
WHERE RECORDLIMIT EQ 1
WHERE PACKETID EQ '&PACKVAR'

ON TABLE HOLD AS JUPDEL
END
-RUN

TABLE FILE BOTSCHED
PRINT PACKETID NOPRINT
COMPUTE SQL/A500 = 'INSERT INTO dbo.BOTADDITIONAL (PACKETID, BOTNOTE) VALUES (' ||
'''' || PACKETID || '''' ||
', ''' || '&NOTEVAL' || '''' ||
')';
WHERE RECORDLIMIT EQ 1
WHERE PACKETID EQ '&PACKVAR'
ON TABLE HOLD AS JUPADD
END
-RUN

SQL
-INCLUDE JUPDEL
END

SQL
-INCLUDE JUPADD
END


81.05 All formats
 
Posts: 56 | Location: Manchester | Registered: November 21, 2006Report 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     [WORKAROUND] Report caster procedure application

Copyright © 1996-2020 Information Builders