· Jan 23, 2017

Synchronization failed: Invalid header in /Encounter Interface/

Hello, I've checked past posts and don't see the answer. Hope someone can help.

I'm working with our commercial version of VistA.  Cache 2016.2.

I've connected to the instance and copied a few M routines to my local Atelier project.  I edited a comment in the file and attempted to save/compile the routine back to the server.  

I'm getting

Synchronization failed: Invalid header in /Encounter Interface/VFD.......

Is there something I'm missing? Thanks in advance.

Discussion (4)0
Log in or sign up to continue

Yes, Atelier requires all files to have a header which defines the metadata for the file. The extension of the file is not enough ( for example in an INT the language mode is important ). Normally you don't need to know the rules as Atelier will handle this for you.  For reference here are the rules. I'll ensure that they are added to the Atelier reference documentation

It is required that Caché sources be stored in the file system in a textual format as opposed to the XML format that we have been using for some time now. The primary purpose of this requirement is to facilitate easy comprehension, editing and the performance of diffs. 

The current XML format captures additional meta-data ( for example, 'language mode' ) that does not appear in the body of the document. Any textual format MUST be able to accommodate this meta-data to ensure that no information is lost. 
Therefore, for exporting .mac, .int, .inc, .bas, .mvb and .mvi items during export a single line of header information appears as the first line of text in the following format :-

Routine NAME [Type = TYPE, LanguageMode = MODE, Generated] "Routine" is a case insensitive string which identifies this document as being a routine document container NAME is the name of the routine item (case sensitive) Following the name there is an optional collection of keyword value pairs that are enclosed in square brackets '[' ']'.

Currently three keywords are supported :-

Type = TYPE. Where TYPE is one of bas, inc, int, mac, mvb, mvi.

LanguageMode = MODE. Where MODE is an integer that is supported as an argument to $SYSTEM.Process.LanguageMode(MODE).

Generated. Its presence indicates that the routine is generated.

The keywords are optional and if none is specified then the square brackets containing them should not be present (though it is NOT a syntax error to specify an empty pair of square brackets ([])).

The LanguageMode keyword applies only for Type=mac or Type=int and will be ignored for other types. The default value for the LanguageMode keyword is 0.

Whitespace is freely supported within the header

Everything that comes after the single first line is source content and MUST be formatted according to the established rules of the particular document type. There is no trailer that indicates the end of the document.