Focal Point
[SHARING] WebFOCUS Coding Standards/Guidelines

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/71410176

April 01, 2009, 02:41 PM
TedB
[SHARING] WebFOCUS Coding Standards/Guidelines
I'm looking for some WebFOCUS coding standards/guidelines and heard that there was a 2007 Summit presentation on this topic. Are Summit presentations available online or does someone have a copy of this presentation?

Thanks,
Ted

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


Dev Studio 8.0.09
App Studio 8.2.01
DB2, FOCUS
PDF, HTML, Excel, CSV
In Focus since 1983
April 01, 2009, 03:21 PM
Glenda
I have a copy of the presentation. It was written by:

Francis Mariani
Susannah Jones
Anthony Alsford

If you would like I can send it to you.


Glenda

In FOCUS Since 1990
Production 8.2 Windows
April 01, 2009, 03:33 PM
jodye
I would love a copy of that also actually. Especially since it was written by the those three gurus!

Smiler


WF 8.0.0.5M
April 01, 2009, 03:43 PM
Glenda
All I need is an email address and it's yours.


Glenda

In FOCUS Since 1990
Production 8.2 Windows
April 01, 2009, 04:09 PM
Tony A
Actually, it was written only by Susannah Jones and Anthony Alsford, Francis was otherwise occupied.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
April 01, 2009, 04:11 PM
Francis Mariani
Yes, I wasn't involved in this interesting topic.


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
April 01, 2009, 04:19 PM
Glenda
Sorry guys. I was just relaying what the power point indicated.


Glenda

In FOCUS Since 1990
Production 8.2 Windows
April 02, 2009, 05:19 AM
Eswara Rao
I would like to receive the power point of the WebFOCUS coding standards/guidelines.
Can any one mail to this mail aeswararao@gmail.com

Thank you in advance


WebFOCUS 7.1
Windows
HTML, PDF,Excel
April 02, 2009, 09:01 AM
<sfernan2>
Could you please forward a copy to me also. We are in the process of implementing Webfocus. My email is: sfernan2@ford.com

thanks!
April 02, 2009, 10:21 AM
RPUNO
Could I please get a copy as well? I'm new to WebFOCUS and something like this would really help me out. My e-mail is: rpuno@bchousing.org


WebFOCUS 7.6.7
Windows
Output: ALL
April 02, 2009, 10:36 AM
Francis Mariani
Time for a Susannah/Tony roadshow!


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
April 02, 2009, 11:00 AM
Dave Ayers
i was involved with a Focus coding standards committee at Ford Motor back in the mainframe days, and would be very interested in seeing a copy of that document too !

Thanks,


Regards,
Dave

http://www.daveayers.com

WebFocus/Maintain 7.6.4-8
on Win2000 and 2003 Server
April 02, 2009, 11:44 AM
Glenda
Good News!

I sent Kerry a copy and she is going to post it to the presentation section on the developer center and it will be available for all to download and review.


Glenda

In FOCUS Since 1990
Production 8.2 Windows
April 02, 2009, 11:56 AM
Kerry
Thanks Glenda for sending me the file.

To all, this PowerPoint file is now in the Presentations section on the Developer Center. Here is the link to download it. We also have many other presentations that may be of interest to you:
http://www.informationbuilders...s/presentations.html

Cheers,

Kerry

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


Kerry Zhan
Focal Point Moderator
Information Builders, Inc.
April 02, 2009, 02:39 PM
Dave Ayers
Thanks to Glenda, Kerry, Susannah and Tony for making this presentation available to us !

Interesting that, even through Focus has changed a lot, the same code formatting guidelines are still there from the early mainframe days Smiler


Regards,
Dave

http://www.daveayers.com

WebFocus/Maintain 7.6.4-8
on Win2000 and 2003 Server
April 02, 2009, 04:56 PM
Tony A
quote:
Interesting that, even through Focus has changed a lot, the same code formatting guidelines are still there from the early mainframe days

Dave,

As you may have guessed, that is where I first used FOCUS, on a 4381 running VM followed by a 3081 running MVS - as many MIPS as a modern calculator Confused

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
April 02, 2009, 07:35 PM
Dave Ayers
I live by those code formatting guidelines, plus some of my own additions. In fact, I can't really read code well, unless it is properly formatted. I reformat a lot of OP code !

Maybe that is a failing, not being flexible, but I have internalized that text structure so deeply, it is how I understand code.

But I find it amazing that so few programmers use the formatting ! I don't know how they can manage to troubleshoot their own work ?

I don't recall what particular IBM CPU was running the MVS/TSO I learned on back in '85. And it's MIPS were probably about the same, but they were efficient machines and OS's, and could run LOTS of terminals and batch jobs. So I don't look down my nose at them , even now Smiler


Regards,
Dave

http://www.daveayers.com

WebFocus/Maintain 7.6.4-8
on Win2000 and 2003 Server
April 03, 2009, 08:45 AM
Danny-SRL
Well, Thomas Jefferson had a point but it is very "New World". I think that Talleyrand, the "Prince of Diplomats" had it better when he proferred:
Appuyez-vous solidement sur vos principes, ils finiront bien par ceder.

For those who have difficulty with the brogue of Voltaire, here is a rough translation:
Lean solidly on your priciples, in the end they will collapse.

But that doesn't allow anyone to write sloppy code!


Daniel
In Focus since 1982
wf 8.202M/Win10/IIS/SSA - WrapApp Front End for WF

April 03, 2009, 10:40 AM
Tony A
quote:
I don't know how they can manage to troubleshoot their own work

I am not sure that even appears on their radar Dave, but then we of the "old ways" did a lot of things differently and have kept the traits into our middle years Wink

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
April 03, 2009, 02:23 PM
susannah
Francesco indeed contributed, albeit remotely. and i just taught a class this morning using one of his lessons. Check your focus errors after every paragraph (ie DEFINE->END,JOIN->END,TABLE->END)
..some fex paragraph
-RUN
-IF &FOCERRNUM EQ 0 GOTO continue.1;
-TYPE i blew it focerror is &FOCERRNUM
? &FOCERRNUM
-GOTO eoj ;
-continue.1




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
April 06, 2009, 09:59 AM
Francis Mariani
I don't know why those aren't the most popular lines of FOCUS code...


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
April 07, 2009, 04:34 PM
Waz
Those lines should be mandatory code for any FOCUS programmer.

The last thing any one wants is to have a report run and get nasty code and error messages come back, it should always be handled.

In our reports we have a standard block for error handling.

At each logical point in the code we test for errors and if found pass the flow to one of the labels below.
Other Code...

-GOTO RPT_OK

-*******************************************************************************
-RPT_ER1

-SET &RPT_MSG ='(XX00002) Report terminated - insufficient parameters entered';
-GOTO RPT_END
-*******************************************************************************
-RPT_ER2

-SET &RPT_MSG = '(XXX00002) Error - No Report Generated' ;
-GOTO RPT_END
-*******************************************************************************
-RPT_ER3

-SET &RPT_MSG = '(XXXO00003) Error - ' | &ERR_MSG ;
-GOTO RPT_END
-*******************************************************************************
-RPT_FERR

-SET &RPT_MSG = '(XXX00003) Error - Focus Error Number ' 
-             | &FOCERRNUM | ' Encountered' ;
-GOTO RPT_END
-*******************************************************************************
-RPT_0RECS

-SET &NoReport = 'YES' ;
-SET &RPT_Type = 'XXX_PDF' ;
-SET &OUT_FMT001 = 'PDF' ;
-SET &RPT_Format   = &OUT_FMT001

-INCLUDE PARM_PAGE

-INCLUDE OUTPUT_HANDLER

-RUN

-IF &FOCERRNUM GT 0 THEN GOTO RPT_FERR ;

-*******************************************************************************
-RPT_OK

-INCLUDE TIME_STAMP

-SET &RPT_MSG = '(XXX00001) Report completed successfully' ;

-RPT_END

-INCLUDE ERROR_HANDLER



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!

April 07, 2009, 04:43 PM
susannah
for us,
the dba's make teeny changes to files that affect the masters oh so slightly , with the 'oh it should have no effect on you'
and of course it knocks us slam out of the water!




In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
April 12, 2009, 10:29 PM
Mark Swanson
Please send it also to Mark.Swanson@fmr.com


7.6.6 AIX
April 13, 2009, 11:11 AM
ira
Kerry: Thanks for the link. Ira


aix-533,websphere 5.1.1,apache-2.0,
wf 538(d), 537 (p),
==============
7.6.11 (t) aix 5312
websphere 6.1.19
apache 2.0
September 16, 2013, 06:37 PM
boydad85
Hi Glenda,

Curious if you still have a copy of the presentation mentioned below and would be willing to send to me. I just tried the User Forum Presentation link provided by Kerry Zhan back on April 2009 and couldn't find the presentation.

Thanks,

Amy
boydad@ncat.edu


quote:
Originally posted by Glenda:
I have a copy of the presentation. It was written by:

Francis Mariani
Susannah Jones
Anthony Alsford

If you would like I can send it to you.



WebFOCUS 7.6
Windows, All Outputs
September 17, 2013, 12:40 PM
prodrigu
Glenda,

I would also like a copy of the presentation mentioned above. I also looked for the presentation on the User Forum Presentation link and did not see it.

email: Mike.Rodriguez@ejgallo.com

Thanks,
prodrigu


Prod: WebFOCUS 7.7.03: Win 2008 & AIX hub/Servlet Mode; sub: AS/400 JDE; mostly Self Serve; DBs: Oracle, JDE, SQLServer; various output formats
September 17, 2013, 04:28 PM
prodrigu
quote:
Originally posted by Waz:
Those lines should be mandatory code for any FOCUS programmer.

The last thing any one wants is to have a report run and get nasty code and error messages come back, it should always be handled.

In our reports we have a standard block for error handling.

At each logical point in the code we test for errors and if found pass the flow to one of the labels below.
Other Code...

-GOTO RPT_OK

-*******************************************************************************
-RPT_ER1

-SET &RPT_MSG ='(XX00002) Report terminated - insufficient parameters entered';
-GOTO RPT_END
-*******************************************************************************
-RPT_ER2

-SET &RPT_MSG = '(XXX00002) Error - No Report Generated' ;
-GOTO RPT_END
-*******************************************************************************
-RPT_ER3

-SET &RPT_MSG = '(XXXO00003) Error - ' | &ERR_MSG ;
-GOTO RPT_END
-*******************************************************************************
-RPT_FERR

-SET &RPT_MSG = '(XXX00003) Error - Focus Error Number ' 
-             | &FOCERRNUM | ' Encountered' ;
-GOTO RPT_END
-*******************************************************************************
-RPT_0RECS

-SET &NoReport = 'YES' ;
-SET &RPT_Type = 'XXX_PDF' ;
-SET &OUT_FMT001 = 'PDF' ;
-SET &RPT_Format   = &OUT_FMT001

-INCLUDE PARM_PAGE

-INCLUDE OUTPUT_HANDLER

-RUN

-IF &FOCERRNUM GT 0 THEN GOTO RPT_FERR ;

-*******************************************************************************
-RPT_OK

-INCLUDE TIME_STAMP

-SET &RPT_MSG = '(XXX00001) Report completed successfully' ;

-RPT_END

-INCLUDE ERROR_HANDLER



Waz,

Can you send me an example of the standard block for error handling. I like what I see but is it possible if you can send or post an example with the car file.


Prod: WebFOCUS 7.7.03: Win 2008 & AIX hub/Servlet Mode; sub: AS/400 JDE; mostly Self Serve; DBs: Oracle, JDE, SQLServer; various output formats
September 17, 2013, 06:03 PM
Waz
This is a link to a working example of how we use this sort of coding.

standard_code

Ours is a little more complicated and structured, but you should get the basic idea.

You can run this with no parameter or wrong parameters, or put a coding error in the code and see what happens.


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!

October 01, 2013, 11:58 AM
nd
quote:
Originally posted by boydad85:
I just tried the User Forum Presentation link provided by Kerry Zhan back on April 2009 and couldn't find the presentation.


I am also seeking a copy of this and was disappointed to see it no longer available on the presentations site.


WF: WebFocus 7.7.03
Data: Oracle, MSSQL, DB2
OS: Windows
Output: HTML/AHTML,PDF,EXL2K FORMULA, COMT