Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Totally new to WebFocus and have a question..

Status
Not open for further replies.

markl66

Programmer
Mar 9, 2006
1
GB
Hi all,

Well I have been asked to look after all WebFocus reporting for my division and following a few days training from the last developer I am now trying to code!

Firstly, I haven't been shown how to use any of the design aids or utilities and have only been shown how to edit and chop up the program.fex and the htm screens. Is this a bad start?!

What I could really do with getting to grips with is the If statements. All of the examples I see in our code are of the style :

-IF confition1 EQ '123' THEN GOTO abc;
'Customer_Code' as 'Customer'
-abc

There are goto statements everywhere and it is a complete mess! Is this the only way to code a conditional if statement? Must I use goto's?

There are no If, Then, Else statements and no Ends!

My programming experience is RPG400 and a bit VB.

Many thanks

Mark
 
Mark,

Not entirely sure what you question is. The way these IF statements work in WebFOCUS is simply to miss out sections of code if they are satisfied. There are no end statements when coding the -IF statements, webfocus simply reads the line, decides if the condition is met and then either skips to the specified line because the condition is true, or carries on its merry way if it is not.

If you want to see how the code is being interpreted try using -SET ECHO=ALL; at the top of your code and viewing the output in the console. This will only show you the lines of code that have been run, and therefore you can see how the IF statements have been interpreted.

You can use ELSE statements, but perhaps in the code you have it's not required, as if no else is specified, Focus understands it is to carry on running the code.

Regards

Tewy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top