Synch with files from VMS has some issues....

Here you can discuss the universal Integrated Development Environment for OpenVMS.
Post Reply

Topic author
willemgrooters
Active Contributor
Posts: 41
Joined: Fri Jul 12, 2019 1:59 pm
Reputation: 0
Location: Netherlands
Status: Offline
Contact:

Synch with files from VMS has some issues....

Post by willemgrooters » Sat Nov 06, 2021 9:45 am

VMS-IDE version 1.5.45

I moved the projects I'm working on to another machine by using backup on my VMS systems, changed host definition in vmssoftware.ssh-helper-settings to the new server, and synchronized the project with files from VMS.
This yielded some unexpected results where the original environment shows no errors at all.
The whole project compiles without issues on VMS.

* all files that have been copied from VMS have a version number, where I would expect the files on PC to have been updates/overwritten by the files on VMS.

In Fortran code, I found a large number of false "errors", where the code does compile without issues. Earlier, I did not have these issues! (Origin of the code is Fortran77 but it has been adapted to compile with HP Fortran V8.0-1-104669-48GBT)

These I found in files that are included in other sources:

* statements in code that were previously fine, now signal an error: for example:

Code: Select all

 	structure /itmlstdef/
	    integer*2		length
	    integer*2		itmcode
	    integer*4		address
	    integer*4		lenaddress
	endstructure
now marks "endstructure" as an error:

Code: Select all

no viable alternative input at 'endstructure'
extraneous input 'endstructure' expecting {TYPE, STRUCTURE, RECORD, UNION, PRIVATE, PUBLIC, END, DIMENSION, VIRTUAL, REAL, EQUIVALENCE, COMMON, POINTER, INTEGER, BYTE, NAMELIST, CHARACTER, VARCHAR, ALLOCATABLE, INTENT, OPTIONAL, EXTERNAL, INTRINSIC, INTERFACE, SAVE, TARGET, DATA, DOUBLE, COMPLEX, LOGICAL, I_CONST"
in some sources, not in all. Same applies to other "end..." statements like "endmap". This is not entirely consistant: the second message may be shown on following "enstructure" lines where the first line is not shown.

* Other valid lines like:

Code: Select all

	    integer*2		open		! OPEN options
	    integer*2		close		! CLOSE options
in a structure show unexpected message:

Code: Select all

mismatched input '\t	! OPEN options\n' expecting '('
mismatched input '\t	! CLOSE options\n' expecting '('
on the comment.

* Multiple UNION statements are not well handled:

Code: Select all

	STRUCTURE      /TERM_DEF/
	  UNION
            MAP			    
              INTEGER*2       TERMINATOR_ARRAY(IP_MAXTRM) 
            END MAP			    
            MAP			    
              INTEGER*2       IC_NxtFld       ! Prev Field
 		(more INTEGER*2 lines)...
 	      UNION
		MAP
              	    INTEGER*2 IC_Search         ! Search gegevens (OBSOLETE)
		ENDMAP
		MAP
              	    INTEGER*2 IC_Search_SELECT  ! Search gegevens
		ENDMAP
	      ENDUNION
              INTEGER*2       IC_SELECT       ! Selecteer current gegeven
 		(more INTEGER*2 lines)...
            END MAP			    
	  END UNION
        END STRUCTURE 
This shows the following messages:

Code: Select all

no viable alternative at input 'UNION'
extraneous input 'UNION' expecting {TYPE, STRUCTURE, RECORD, PRIVATE, PUBLIC, END, DIMENSION, VIRTUAL, REAL, EQUIVALENCE, COMMON, POINTER, INTEGER, BYTE, NAMELIST, CHARACTER, VARCHAR, ALLOCATABLE, INTENT, OPTIONAL, EXTERNAL, INTRINSIC, INTERFACE, SAVE, TARGET, DATA, DOUBLE, COMPLEX, LOGICAL, I_CONST}
extraneous input 'ENDMAP' expecting {TYPE, STRUCTURE, RECORD, PRIVATE, PUBLIC, END, DIMENSION, VIRTUAL, REAL, EQUIVALENCE, COMMON, POINTER, INTEGER, BYTE, NAMELIST, CHARACTER, VARCHAR, ALLOCATABLE, INTENT, OPTIONAL, EXTERNAL, INTRINSIC, INTERFACE, SAVE, TARGET, DATA, DOUBLE, COMPLEX, LOGICAL, I_CONST}
no viable alternative at input 'ENDMAP\n'
no viable alternative at input 'END MAP'
mismatched input 'END' expecting {MAP, I_CONST}
mismatched input ' \n' expecting {MAP, EOS, I_CONST}
extraneous input 'ENDSTRUCTURE' expecting {TYPE, STRUCTURE, RECORD, UNION, PRIVATE, PUBLIC, END, DIMENSION, VIRTUAL, REAL, EQUIVALENCE, COMMON, POINTER, INTEGER, BYTE, NAMELIST, CHARACTER, VARCHAR, ALLOCATABLE, INTENT, OPTIONAL, EXTERNAL, INTRINSIC, INTERFACE, SAVE, TARGET, DATA, DOUBLE, COMPLEX, LOGICAL, I_CONST}
but the code compiles without a problem.
* Some comments are no longer acceptable:

Code: Select all

C	.SEVERITY	INFORMATIONAL
C	.SEVERITY	WARNING
C	.SEVERITY	ERROR
C	.SEVERITY	FATAL
and others, where other comment lines have no problem at all

* function statements without code are not accepted:

Code: Select all

	INTEGER*4 FUNCTION TIME_Asc2Cmp
	INTEGER*4 FUNCTION TIME_Cmp2Asc
	CHARACTER*(*) FUNCTION TIME_Timestamp
Second and third lines are flagged

Code: Select all

no viable alternative at input 'INTEGER*4 FUNCTION'
In Fortran compilation units:

* comment lines that are within a definition cause a problem:

Code: Select all

	parameter	(hdrtext =
!		 123456789012345678901234567890123456789012345678901234567890
	1	'AAA BBB CCCC-dd-'//
	1	'WG_PRINT TEST PRINT')
give lines:
no viable alternative at input '\n!\t 123456789012345678901234567890123456789012345678901234567890'
extraneous input '\\n!\\t\t 123456789012345678901234567890123456789012345678901234567890' expecting {ONLY, ENTRY, TYPE, RECORDTYPE, RECORD, PRIVATE, PUBLIC, SEQUENCE, BLOCKSIZE, ENDFILE, DIMENSION, REAL, EQUIVALENCE, OPERATOR, ASSIGNMENT, ASSIGN, ALLOCATE, DEALLOCATE, NULLIFY, POINTER, IMPLICIT, NONE, NAMELIST, PARAMETER, ALLOCATABLE, INTENT, OPTIONAL, EXTERNAL, INTRINSIC, INTERFACE, SAVE, TARGET, DATA, DEFAULTFILE, CYCLE, EXIT, READWRITE, OPENED, FORMATTED, FORMAT, CONTAINS, RESULT, RECURSIVE, INQUIRE, BACKSPACE, REWIND, DELETE, UNLOCK, DESCR, REF, VAL, LOC, LNOT, TRUE, FALSE, '(', '-', '+', IN, OUT, STATUS, STAT, LOGICAL, KIND, LEN, FMT, NML, REC, ADVANCE, SIZE, EOR, UNIT, ERR, IOSTAT, LET, PRECISION, IOSTART, SEQUENTIAL, DIRECT, FILE, ACCESS, POSITION, ACTION, DELIM, PAD, FORM, RECL, BLANK, EXIST, NUMBER, NAMED, NAME, TITLE, UNFORMATTED, NEXTREC, IOLENGTH, ASSOCIATEVARIABLE, BUFFERCOUNT, BUFFERED, CARRIAGECONTROL, CONVERT, DISPOSE, DISP, EXTENDSIZE, INITIALSIZE, KEY, KEYID, KEYEQ, KEYGE, KEYLE, KEYGT, KEYLT, KEYNXT, KEYNXTNE, ASCENDING, DESCENDING, KEYED, MAXREC, NOSPANBLOCKS, ORGANIZATION, SHARED, S_CONST, I_CONST, H_CONST, B_CONST, O_CONST, Z_CONST, IDENTIFIER, R_CONST}

* 'dotted' comparison are not accepted:

Code: Select all

	dowhile (i_status .ne. ss$_endoffile .and. i_Cnt .le.i_max)  
Same applies to .eq., .gt. etc

* Where a structure contains "open" and/or "close" as fieldnames, this is not accepted (This strcuture is defined in one of the included files mentioned before):

Code: Select all

					if (c_data(1:i_data_end) .eq. cp_append) then
						Listdata.open = 1
					elseif (c_data(1:i_data_end) .eq. cp_use) then
						Listdata.open = 2
					elseif (c_data(1:i_data_end) .eq. cp_over) then
						Listdata.open = 3
					endif
gives messages as:

Code: Select all

no viable alternative at input 'Listdata.open'
no viable alternative at input 'Listdata.open'
mismatched input '=' expecting '('
on each of these lines where these fields are mentioned.

* if...elseif...elseif...else...endif is not accepted:

Code: Select all

 	if (Listdata.open .eq. 0) then
		 WGLIB_print__info_openmode = cp_new
	elseif (Listdata.open .eq. 1) then
		 WGLIB_print__info_openmode = cp_append
	elseif (Listdata.open .eq. 2) then
		 WGLIB_print__info_openmode = cp_use
	elseif (Listdata.open .eq. 3) then
		 WGLIB_print__info_openmode = cp_over
	else	
		 WGLIB_print__info_openmode = cp_undef
	endif
gives

Code: Select all

mismatched input 'elseif' expecting {<EOF>, END, I_CONST}
on each elseif, else of endif line

* inline comments are not (always) accepted:

Code: Select all

	    I_STATUS  = SYS$QIOW( %val(1),		!Efn 
	1			  %val(IF_FMS.I2_TTCHAN),	!Channel
	1			  %val(IO$_SETMODE .OR. 
	2			       IO$M_CTRLCAST .OR.
	2			       IO$M_CTRLYAST),	!Func
	1			  IOSB ,		!iosb
	1			  ,			!astadr
	1			  ,			!astprm
	1			  %VAL (I_ADDR),	!p1 = ast ADDR
	1			  IF_FMS.I_CONTEXT,	! p2 = ast parameter
							! = ADDR pointerblock
	1			  ,			! p3
	1			  ,			! p4
	1			  ,			! p5
	1			  )			! p6
marks the comment after IF_FMS.I_context as wrong:

Code: Select all

no viable alternative at input 'SYS$QIOW( %val(1),%val(IF_FMS.I2_TTCHAN),%val(IO$_SETMODE .OR.IO$M_CTRLCAST .OR.IO$M_CTRLYAST),IOSB ,,,%VAL (I_ADDR),IF_FMS.I_CONTEXT,\t! p2 = ast parameter\n'
All these errors re-appear after I closed all files that are open, closed the folder, closed the IDE, and restarted IDE, opened the folder and opened any file that had these issues. But the code compiles and links without a problem.

Most annoying however is that synchronization did NOT remove version numbers....


sergey_vorfolomeev
VSI Expert
Valued Contributor
Posts: 64
Joined: Thu Aug 22, 2019 12:17 am
Reputation: 0
Status: Offline

Re: Synch with files from VMS has some issues....

Post by sergey_vorfolomeev » Tue Nov 09, 2021 1:18 am

About the fact that "synchronization did NOT remove version numbers" - it is an issue with the SFTP server on the VMS side. The IDE is not responsible for changing filenames.


sergey_vorfolomeev
VSI Expert
Valued Contributor
Posts: 64
Joined: Thu Aug 22, 2019 12:17 am
Reputation: 0
Status: Offline

Re: Synch with files from VMS has some issues....

Post by sergey_vorfolomeev » Wed Nov 10, 2021 1:42 am

Also about "endstructure", "elseif" and other - a space is required by Fortran syntax ("end structure", "else if"). Even if the compiler allows such keywords this is an error.

User avatar

arne_v
Valued Contributor
Posts: 52
Joined: Fri Apr 17, 2020 7:31 pm
Reputation: 0
Location: Rhode Island, USA
Status: Offline
Contact:

Re: Synch with files from VMS has some issues....

Post by arne_v » Wed Nov 10, 2021 9:20 am

Really?

Traditionally in Fortran spaces are insignificant. Fortran 77 and source form fixed for newer versions.

END IF
ENDIF
E N D I F
E N DIF

should all behave the same.

Obviously only the first two should be used for human readability reasons.
Arne
arne@vajhoej.dk
VMS user since 1986


sergey_vorfolomeev
VSI Expert
Valued Contributor
Posts: 64
Joined: Thu Aug 22, 2019 12:17 am
Reputation: 0
Status: Offline

Re: Synch with files from VMS has some issues....

Post by sergey_vorfolomeev » Wed Nov 10, 2021 11:38 pm

Right, seems like we missed the significant line:
Space Ignored in statements, except as part of a character constant

We will fix this issue.


kan
Visitor
Posts: 1
Joined: Thu Nov 11, 2021 5:49 am
Reputation: 0
Status: Offline

Re: Synch with files from VMS has some issues....

Post by kan » Thu Nov 11, 2021 5:56 am

* function statements without code are not accepted:

Code: Select all

	INTEGER*4 FUNCTION TIME_Asc2Cmp
	INTEGER*4 FUNCTION TIME_Cmp2Asc
	CHARACTER*(*) FUNCTION TIME_Timestamp
Is this code really used somewhere?
What is it for?

User avatar

arne_v
Valued Contributor
Posts: 52
Joined: Fri Apr 17, 2020 7:31 pm
Reputation: 0
Location: Rhode Island, USA
Status: Offline
Contact:

Re: Synch with files from VMS has some issues....

Post by arne_v » Thu Nov 11, 2021 7:41 pm

That one indeed looks weird.

Long time since I have used function statements, but as I recall it then one does not use the function keyword at all.

So I think it is OK for the IDE to reject that code.

This works:

Code: Select all

      PROGRAM Z1
      CHARACTER*2 ADDX
      CHARACTER*1 S
      ADDX(S) = S // 'X'
      WRITE(*,*) ADDX('A')
      WRITE(*,*) ADDX('B')
      WRITE(*,*) ADDX('C')
      END
Arne
arne@vajhoej.dk
VMS user since 1986


Topic author
willemgrooters
Active Contributor
Posts: 41
Joined: Fri Jul 12, 2019 1:59 pm
Reputation: 0
Location: Netherlands
Status: Offline
Contact:

Re: Synch with files from VMS has some issues....

Post by willemgrooters » Fri Nov 12, 2021 12:21 pm

Had to locate the exact location where this is used: it's within a file that was included in one source - was: the line has been commented out. Since it's about 35 years ago that this code was developed, I cannot recall why I had this anyway. So that one is indeed correct: the no longer included file can easily be removed :)

Post Reply