Decforms compilation output - mismatch with the Decform source file line numbers. (656 Views)
Reply
Occasional Advisor
Notilus007
Posts: 10
Registered: ‎10-27-2011
Message 1 of 13 (656 Views)
Accepted Solution

Decforms compilation output - mismatch with the Decform source file line numbers.

When I compile a decform (IFDL) source file, I get a compilation output with error line numbers that do not match the line numbers in the source file itself.

 

Does anybody know a way to tell the compiler to indicate the corresponding errors line number from the source file itself?

Honored Contributor
Steven Schweda
Posts: 9,089
Registered: ‎02-23-2005
Message 2 of 13 (644 Views)

Re: Decforms compilation output - mismatch with the Decform source file line numbers.

Occasional Advisor
Notilus007
Posts: 10
Registered: ‎10-27-2011
Message 3 of 13 (640 Views)

Re: Decforms compilation output - mismatch with the Decform source file line numbers.

I don't think there is a /LIST quliflier there.

Honored Contributor
Steven Schweda
Posts: 9,089
Registered: ‎02-23-2005
Message 4 of 13 (636 Views)

Re: Decforms compilation output - mismatch with the Decform source file line numbers.

Occasional Advisor
Notilus007
Posts: 10
Registered: ‎10-27-2011
Message 5 of 13 (585 Views)

Re: Decforms compilation output - mismatch with the Decform source file line numbers.

The actual compilation command that I use is :

$FORMS TRANSLATE file_name.IFDL

 

The compilation output that I get is :

 

3016               Pan el ICA_TRT779_data_PANEL

%FORMS-E-SYNTAXERR, syntax error; an expected keyword, name or literal is missing or misspelled.

-FORMS-I-EXPECTED, one of the following was expected: ALL, WAIT, ICON, FIELD, GROUP, PANEL, BUTTON, CORRESPONDING.

 

3016               Pan el ICA_TRT779_data_PANEL

%FORMS-E-SYNTAXERR, syntax error; an expected keyword, name or literal is missing or misspelled.

-FORMS-I-ONEXPECTED, the following was expected: ON

 

3163           Copy

%FORMS-E-SYNTAXERR, syntax error; an expected keyword, name or literal is missing or misspelled.

-FORMS-I-EXPECTED, one of the following was expected: APPLY, HELP, PANEL, MESSAGE, END.

 

3165           End Copy

%FORMS-E-SYNTAXERR, syntax error; an expected keyword, name or literal is missing or misspelled.

-FORMS-I-ONEXPECTED, the following was expected: LAYOUT

 

3171              Copy

%FORMS-E-SYNTAXERR, syntax error; an expected keyword, name or literal is missing or misspelled.

-FORMS-I-ONEXPECTED, the following was expected: _/End_of_Line/_

 

3173           End Copy

%FORMS-E-SYNTAXERR, syntax error; an expected keyword, name or literal is missing or misspelled.

-FORMS-I-ONEXPECTED, the following was expected: FORM

%FORMS-W-NONCOMMENT, non comment text after END FORM has been ignored.

 

Unfortunately the line numbers do not match the line numbers on the source file (file_name.IFDL)

Honored Contributor
Steven Schweda
Posts: 9,089
Registered: ‎02-23-2005
Message 6 of 13 (580 Views)

Re: Decforms compilation output - mismatch with the Decform source file line numbers.

Honored Contributor
Hein van den Heuvel
Posts: 6,588
Registered: ‎05-19-2003
Message 7 of 13 (579 Views)

Re: Decforms compilation output - mismatch with the Decform source file line numbers.

 

Hmmm, the user provided names reported in the error messages appear relatively unique. 

Simply search for each occurance?

Are the line number in 'range' at all? 

Are there copy/include files involved?

 

Can create a DCL/Awk/Perl script to execute the includes inline 'blowing up' the source and compile the result or just use the indicate error line numbers as pointers into that exploded result?

Maybe the line numbers will match that way?

 

fwiw,

Hein

 

 

Occasional Advisor
Notilus007
Posts: 10
Registered: ‎10-27-2011
Message 8 of 13 (574 Views)

Re: Decforms compilation output - mismatch with the Decform source file line numbers.

There are copy/include files involved, but how can I have the output with error line numbers matching those in the original source file and not the LIST file ?
Somehow it works fine when I compile HP Cobol files.
Advisor
Tom Wetty
Posts: 22
Registered: ‎06-23-2005
Message 9 of 13 (565 Views)

Re: Decforms compilation output - mismatch with the Decform source file line numbers.

I do not code in DECForms, but I appears to me that the compiler is telling you what the error is; the error appears to me to be an imbedded space in the verb "PAN EL"  in your defintion. OpenVMS does not like embedded spaces in most commands and languages.

 

The other error is that the command COPY is not recognized by the DECforms compiler, is this the correct syntax and is the copy is the correct progression of the form definition ?   If it is, then it is just a secondary error caused because the PANEL verb failed from above.

 

Please review your syntax.  Just curious, did you use some kind of automated program to generate this code in the first place ? This could explan the gotchas here.

 

 Line numbering in all OpenVMS langages and compilers is a bit complicated because all the included data, functions and library definitions are included in the source at compile time and are added to line counts. These additional line are accounted for in the compliation and can extensive.  There may be a way to do this but if the error is evident do you really need the line number to find the error?  

Honored Contributor
Steven Schweda
Posts: 9,089
Registered: ‎02-23-2005
Message 10 of 13 (563 Views)

Re: Decforms compilation output - mismatch with the Decform source file line numbers.

Occasional Advisor
Notilus007
Posts: 10
Registered: ‎10-27-2011
Message 11 of 13 (556 Views)

Re: Decforms compilation output - mismatch with the Decform source file line numbers.

I have read section C.3 in "HP DECforms Guide to Commands and Utilities" and it seems that only with LSE I can do the correlation between the compilation errors and the line number in the IFDL source file. How can I do it without using LSE ?
Honored Contributor
Hein van den Heuvel
Posts: 6,588
Registered: ‎05-19-2003
Message 12 of 13 (542 Views)

Re: Decforms compilation output - mismatch with the Decform source file line numbers.

 

In this specific case, as Tom indicates, you should just SEARCH the source for "PA NEL" and fix that!

For the general case is is indeed tricky as DECforms counts the lines from FILE COPY to the listing.

COPY FROM DICTIONARY poses no problem.

 

I made a little example removing a few lines from a working IFDL, put it into a copy file (tmp.tmp) and broke a line further down just like the example

 

The LISTING makes clear how the COPY impacts the lines:

 

   658  COPY
   659     "tmp.tmp"
   660  END COPY
   661C /* RECORD LIST DEefinitions */
   662C
   663C     RECORD LIST res_cust_num
   664C         vr_control_wksp
   665C         vr_reservations_wksp
   666C         vr_customers_wksp
   667C     END LIST
   668C
   669C
   670
   671      RECORD LIST cust_res_list

 

 

See how the reported line number moved:

 

$ sea/num tmp.ifdl "pa nel"
  3707                      PA NEL confirm_panel
$ form tran tmp.ifdl

 3716                          PA NEL confirm_panel
%FORMS-E-SYNTAXERR, syntax error; an expected keyword, name or literal is missing or misspelled.
-FORMS-I-EXPECTED, one of the following was expected: ALL, WAIT, ICON, FIELD, GROUP, PANEL, BUTTON, CORRESPONDING.

 3716                          PA NEL confirm_panel
%FORMS-E-SYNTAXERR, syntax error; an expected keyword, name or literal is missing or misspelled.
-FORMS-I-ONEXPECTED, the following was expected: ON

 

 

TO map them back, you could use a script as I suggested.

I hacked one up in DCL. Crude...  Minimal parsing... but it works for me.

If you want to use it, then you need to verify the SYNTAX of your COPY / END COPY usage.

 

Enjoy!

HEin

 

 

$ @IFDL_COPY.COM tmp.ifdl 3716
538/538 Copy tmp.tmp
3716 lines.3707 Lines in IFDL, 1 Copy Files
$
$ type IFDL_COPY.COM
$ IF P2.EQS."" THEN EXIT 16
$ line = p2
$ IF F$TYPE(line).NES."INTEGER" THEN EXIT 16
$ CLOSE/NOLOG ifdl
$ OPEN/READ/ERROR=ooops ifdl 'P1
$ copy_file = 0
$ ifdl_line = 0
$ list_line = 0
$ quote = """"
$ space = " "
$main_loop:
$ read/end=done ifdl rec
$ ifdl_line = ifdl_line + 1
$ list_line = list_line + 1
$ if list_line.EQ.line THEN GOTO done
$ x = f$edit(rec,"TRIM,COMPRESS,UPCASE,UNCOMMENT")
$ IF x.NES."COPY" THEN GOTO main_loop
$ read/end=done ifdl rec
$ copy_file_name = f$edit(rec,"TRIM,COMPRESS,UPCASE,UNCOMMENT") - quote - quote
$ IF F$ELEM(1,space,copy_file_name).NES.space THEN GOTO main_loop
$ WRITE SYS$OUTPUT list_line, "/", ifdl_line, " Copy ", copy_file_name
$ CLOSE/NOLOG copy
$ OPEN/READ/ERROR=ooops copy 'copy_file_name
$ copy_file = copy_file + 1
$ copy_loop:
$   READ/END=main_loop/ERROR=ooops copy rec  ! Just leave open
$   list_line = list_line + 1
$   GOTO copy_loop
$
$done:
$ write sys$output list_line, " lines.", ifdl_line, " Lines in IFDL, ", copy_file, " Copy Files"
$ close/nolog ifdl
$ close/nolog copy
$ooops:
$ EXIT '$STATUS

 

 

 

 

 

 

 

 

Occasional Advisor
Notilus007
Posts: 10
Registered: ‎10-27-2011
Message 13 of 13 (491 Views)

Re: Decforms compilation output - mismatch with the Decform source file line numbers.

Thanks a lot Hein, we have tried your script and this solution of yours works great for us.

The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.