Mainframe vs Windows - Errors



Software AG's platform-independent programming language with full support for open-source and Internet applications

Mainframe vs Windows - Errors

Postby newjb » Mon Apr 27, 2015 5:59 am

Sorry, hopefully I am posting this in the correct location. I am using Natural within Windows:
Software AG Natural for Windows. -- Version 6.3.14 PL 0

Mainframe vs Windows - Errors.

I have a Natural program that I am able to view either within my windows environment or on the mainframe. Both locations STOW correctly. However, when you view the program within the windows environment, the +/- for a FOR and IF statement are both highlighted in red.

Is it possible for a program to STOW ok, yet still have problems with a statement? I can't find any other information for this indicator within the environment.

Attached & below is an example. So there may be problem with the way this - FOR and IF statement are setup that I am not seeing yet....? I’m assuming that is why there is a red box next to those parts of the code.. Sorry, still new to this. The attachment shows the code that is marked in red.

4860 FOR #AA = 1 TO 6
4862 IF #H-BUDGET(#AA) > ' '
4864 EXAMINE #BUDGET-ARRAY(*) FOR #H-BUDGET(#AA) GIVING INDEX #BB
4866 IF #BB > 0 AND
4868 #H-FUND(#AA) = #FUND-ARRAY(#BB) AND
4870 #H-OBJ-CAT(#AA) = #OBJ-CAT(#BB)
4872 ADD #H-OBJ-CAT-AMT(#AA) TO #OBJ-CAT-AMT(#BB)
4874 ** ADD #H-OBJ-CAT-AMT(#AA) TO #WORK-INCM.#AMNT-BUDG-ADJ(#BB)
4876 ELSE
4878 ADD 1 TO #CC
4880 MOVE #H-BUDGET(#AA) TO #BUDGET-ARRAY(#CC)
4882 MOVE #H-FUND(#AA) TO #FUND-ARRAY(#CC)
4884 MOVE #H-OBJ(#AA) TO #OBJECT-ARRAY(#CC)
4886 ** MOVE #H-OBJ(#AA) TO #WORK-INCM.#CODE-BUDG-ADJ(#CC)
4888 MOVE #H-OBJ-CAT(#AA) TO #OBJ-CAT(#CC)
4890 ADD #H-OBJ-CAT-AMT(#AA) TO #OBJ-CAT-AMT(#CC)
4892 ** ADD #H-OBJ-CAT-AMT(#AA) TO #WORK-INCM.#AMNT-BUDG-ADJ(#CC)
4894 END-IF
4896 ELSE
4898 ESCAPE BOTTOM
4900 END-IF
4902 END-FOR


Thank you in advance.
You do not have the required permissions to view the files attached to this post.
newjb
 
Posts: 20
Joined: Fri Sep 07, 2012 11:25 pm
Has thanked: 3 times
Been thanked: 0 time

Re: Mainframe vs Windows - Errors

Postby RGZbrog » Mon Apr 27, 2015 11:11 am

You know the program's syntax is correct, because it STOWed. The bug is in the colorization routine, whose logic is not as comprehensive as the compiler.

You can fix the coloring by removing the FOR keyword from the EXAMINE statement, but the EXAMINE won't read as well.
User avatar
RGZbrog
 
Posts: 101
Joined: Mon Nov 23, 2009 1:34 pm
Location: California, USA
Has thanked: 0 time
Been thanked: 0 time


Return to Natural