Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Totally new to WebFocus and have a question..

Totally new to WebFocus and have a question..

Totally new to WebFocus and have a question..

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'

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


RE: Totally new to WebFocus and have a question..


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.



Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close