has free form Vars following fixed field vars

Hi

I am trying to read a node list and an edge list to create a network. However, I am getting these error. Where do I look for about what these errors mean and how to resolve them ?

I have tab limited text files with node havings (N,X,Y), and edges have (A,B, DISTANCE, SPEED, CLASS) . I have tried both with heading row and without heading row. 

Thank you

F(717): LINKI[1] has free form Vars following fixed field vars.

F(717): NODEI[1] has free form Vars following fixed field vars.

Parents
  • Hello.

    Could you please share the script file showing how you are defining the attributes to be read. Have you looked into the LINKI > VAR (below) within the CUBE Voyager Reference Guide?

    LINKI

    VAR

    |SV|

    Name of a variable to be extracted from the file. Name lengths may not exceed 15 characters; case is ignored.

    To read variables from fixed-format text files, use the BEG and LEN subkeywords.

    To read character-string variables from free-format text files, use the subkeywords TYP and LEN, or append (C) or (Cn) to the variable name, where n specifies the number of characters.

    To read character-string variables from fixed-format text files, use the TYP, BEG, and LEN subkeywords.

    If the file is ASCII, and the variable is to be extracted from specific positions on each file record, BEG and LEN will have to be specified. The program assumes that ASCII files are free format and all fields are separated by white space, a comma, or some combination of both. Examples of free-form records:

    1 2 3

    1,2,3

    1 ,       2 3

    1    ,2,3

    All four of the above illustrated records contain three fields: 1, 2, and 3.

    Subkeywords of VAR include:

    BEG |I|

    Designates the beginning of the field in the input records. The first column of the record is designated as 1.

    LEN |I|

    Designates the length of the field that begins at position BEG.

    TYP |S|

    May be used to specify that the format of the variable is not numeric. An “A” means that the variable is alphanumeric. If TYP=A is specified for free format input, the LEN must also be specified, or it will default to 1. TYP A variable values on free format input must be enclosed within quote or literal marks ('...' or "..."), if they contain special characters (other than alphanumeric characters: a-z, 0-9).

    MIN |R|

    May be used to specify a minimum allowable value for the field. If the input value of the variable is less than this value, the variable will be rejected as an error.

    (continued)

     

    VAR may also be specified with parameters directly (without the above subkeywords). If the field following the variable name is a number, this format is automatically triggered. The total format is name,beg,len,min,max,typ. All these fields must be numeric, or null. A null field is specified by coding two commas with nothing between them. The parameter list is considered as exhausted when a non-numeric field is encountered. Typ must be coded as 1 to indicate that the variable is to be an alphanumeric field.

    Example: VAR=A,1,5,B,6,5 (A is in columns 1-5 and B is in 6-10). If the first two numbers that follow the name are separated by a dash, the numbers indicate the actual columns of the data record where the field is located.

    For example: VAR=A,1-5,B,6-10 (A is in columns 1-5, and B is in columns 6-10). If both forms may be used to specify variable (numeric format, followed by any of the sub-keywords); the keyword values will override the positional numbers

  • Thank you for the detailed response  

    I have all numeric fields as below, so I did not go into the specifics of the formatting subkeywords. 

    Although I have understood most of your reponse,

    Q1. I do not understand the 1-5 or n-N in general. How can a value of a field be in 5 columns ? 

    Q2. If I define a field to be alphanumeric give typ = "A" or typ=1, what would it mean to define its length as length of a string can be unknown/varying. Does the length here mean number of words in a string , eg.,  CHARLES 50 FT ROAD would be length of 4 ?

    However given the text file above and assuming speed is a character code, should I  have something like the following in my script file?:

    VAR=A,1,1,,,,B,2,1,,,,SPEED,3,1,,,,1,CLASS.......

    or 

    VAR=A,1,1,,,,B,2,1,,,,SPEED,3,1,,,,"A",CLASS.......

    Thank you

Reply
  • Thank you for the detailed response  

    I have all numeric fields as below, so I did not go into the specifics of the formatting subkeywords. 

    Although I have understood most of your reponse,

    Q1. I do not understand the 1-5 or n-N in general. How can a value of a field be in 5 columns ? 

    Q2. If I define a field to be alphanumeric give typ = "A" or typ=1, what would it mean to define its length as length of a string can be unknown/varying. Does the length here mean number of words in a string , eg.,  CHARLES 50 FT ROAD would be length of 4 ?

    However given the text file above and assuming speed is a character code, should I  have something like the following in my script file?:

    VAR=A,1,1,,,,B,2,1,,,,SPEED,3,1,,,,1,CLASS.......

    or 

    VAR=A,1,1,,,,B,2,1,,,,SPEED,3,1,,,,"A",CLASS.......

    Thank you

Children
No Data