<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.ice-online.com/index.php?action=history&amp;feed=atom&amp;title=GROUP2</id>
	<title>GROUP2 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.ice-online.com/index.php?action=history&amp;feed=atom&amp;title=GROUP2"/>
	<link rel="alternate" type="text/html" href="https://wiki.ice-online.com/index.php?title=GROUP2&amp;action=history"/>
	<updated>2026-08-03T14:51:02Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.1</generator>
	<entry>
		<id>https://wiki.ice-online.com/index.php?title=GROUP2&amp;diff=717&amp;oldid=prev</id>
		<title>ConvertBot: Creates a new file from the grouping of fields in two input files.</title>
		<link rel="alternate" type="text/html" href="https://wiki.ice-online.com/index.php?title=GROUP2&amp;diff=717&amp;oldid=prev"/>
		<updated>2020-04-27T22:04:36Z</updated>

		<summary type="html">&lt;p&gt;Creates a new file from the grouping of fields in two input files.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Creates a new file from the grouping of fields in two input files.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;OUT&amp;gt;   Output file&lt;br /&gt;
&amp;lt;IN1&amp;gt;   First input file.&lt;br /&gt;
&amp;lt;IN2&amp;gt;   Second input file.&lt;br /&gt;
&amp;lt;TAB1&amp;gt;  Table defining the mappings for a the first input file.&lt;br /&gt;
&amp;lt;TAB2&amp;gt;  Table defining the mappings for a the second input file.&lt;br /&gt;
&amp;lt;TYPE&amp;gt;  Output file type (1000,2000,3000,5000 or 6000).&lt;br /&gt;
&lt;br /&gt;
Summary:&lt;br /&gt;
  This command interleaves data from two or more input files and outputs a&lt;br /&gt;
  Type 1000/2000/3000/5000/6000 file. To allow for more flexibility this&lt;br /&gt;
  command takes in a mapping of the records for each of the input files. This&lt;br /&gt;
  mapping maps the new record to the old record, using the following syntax:&lt;br /&gt;
    {&amp;lt;NEW1&amp;gt;=&amp;lt;OLD1&amp;gt;,&amp;lt;NEW2&amp;gt;=&amp;lt;OLD2&amp;gt;}&lt;br /&gt;
&lt;br /&gt;
  This primitive will create a subrecord named &amp;lt;NEW1&amp;gt; in the output file that&lt;br /&gt;
  corresponds to the subrecord named &amp;lt;OLD1&amp;gt; in the input file. The subrecord&lt;br /&gt;
  created in the new file will have the same format as that in the old file.&lt;br /&gt;
&lt;br /&gt;
  For greater flexibility it is possible to perform in-line conversions that&lt;br /&gt;
  will change the numeric type or change the size of an ASCII type (it will&lt;br /&gt;
  not convert between ASCII and numbers) using the following syntax:&lt;br /&gt;
    {&amp;lt;NEW1&amp;gt;=&amp;lt;T1&amp;gt;:&amp;lt;OLD1&amp;gt;,&amp;lt;NEW2&amp;gt;=&amp;lt;T2&amp;gt;:&amp;lt;OLD2&amp;gt;}&lt;br /&gt;
&lt;br /&gt;
  The above syntax will make a subrecord named &amp;lt;NEW1&amp;gt; in the output file that&lt;br /&gt;
  is equal to the subrecord named &amp;lt;OLD1&amp;gt; in the input file after converting&lt;br /&gt;
  to format &amp;lt;T1&amp;gt; (where &amp;lt;T1&amp;gt; is a type format such as &amp;quot;SF&amp;quot; or &amp;quot;VD&amp;quot; or &amp;quot;4A&amp;quot;).&lt;br /&gt;
  If the new type has more scalar values than the old one (e.g. old is &amp;quot;CF&amp;quot;&lt;br /&gt;
  and new is &amp;quot;VF&amp;quot;) the extra values will be filled with zeros; if it has fewer&lt;br /&gt;
  scalars (e.g. old is &amp;quot;VD&amp;quot; and new is &amp;quot;SD&amp;quot;) then any extra ones will be&lt;br /&gt;
  discarded. (ASCII values will be padded with spaces or truncated as needed.)&lt;br /&gt;
&lt;br /&gt;
  A third syntax allows the grouping of multiple subrecords in the input file&lt;br /&gt;
  into a single subrecord in the new file (not available for ASCII types):&lt;br /&gt;
    {&amp;lt;NEW1&amp;gt;=&amp;lt;T1&amp;gt;:&amp;lt;OLD1a&amp;gt;|&amp;lt;OLD1b&amp;gt;,...}&lt;br /&gt;
  &lt;br /&gt;
  The above syntax will make a subrecord named &amp;lt;NEW1&amp;gt; where each value is&lt;br /&gt;
  in the output file that is equal to the grouping of the two fields in the&lt;br /&gt;
  input file. Note that a type specifier is required. Typical usage:&lt;br /&gt;
    {COMP=CF:REAL|IMAG,POS=VD:ALT|LL}&lt;br /&gt;
&lt;br /&gt;
  The above example will create a subrecord &amp;quot;COMP&amp;quot; that is &amp;quot;CF&amp;quot; that has the&lt;br /&gt;
  two scalar values (&amp;quot;REAL&amp;quot; and &amp;quot;IMAG&amp;quot;) combined (i.e. COMP=(real,imag)).&lt;br /&gt;
  Additionally it will create a subrecord &amp;quot;POS&amp;quot; that combines the scalar &amp;quot;ALT&amp;quot;&lt;br /&gt;
  and the &amp;quot;CF&amp;quot; value &amp;quot;LL&amp;quot; (i.e. POS1=(lat,lon)) and makes them a &amp;quot;VD&amp;quot; value&lt;br /&gt;
  (i.e. POS=(alt,lat,lon)).&lt;br /&gt;
&lt;br /&gt;
  Note that it is an error for the output file to contain more records than&lt;br /&gt;
  the file type allows:&lt;br /&gt;
     Type 1000: max = 1&lt;br /&gt;
     Type 2000: max = &amp;lt;frame size&amp;gt;&lt;br /&gt;
     Type 3000: max = 26&lt;br /&gt;
     Type 5000: max = 14&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
  - It is an error for an output name to be defined more than once.&lt;br /&gt;
  - If the output file is a Type 2000 file, all output fields must have the&lt;br /&gt;
    same format.&lt;br /&gt;
  - Only one input file is required. This feature can be used to convert&lt;br /&gt;
    between file types or convert names.&lt;br /&gt;
  - If the output file is a Type 3000 file, the &amp;quot;offset&amp;quot; field in the record&lt;br /&gt;
    definition will match the actual byte offset required (there will be no&lt;br /&gt;
    gaps in the data).&lt;br /&gt;
  - If the output file is a Type 5000 file the &amp;quot;units&amp;quot; and &amp;quot;type&amp;quot; for the&lt;br /&gt;
    component will default to NONE (0). Additionally the QUADWORD fields in&lt;br /&gt;
    the adjunct header will be set to zero (the name will be blank).&lt;br /&gt;
  - If the input file is a Type 1000 file its sole record will use the&lt;br /&gt;
    name &amp;quot;F1&amp;quot;.&lt;br /&gt;
  - If the input file is a Type 2000 file its record will be named &amp;quot;F1&amp;quot;,&lt;br /&gt;
    &amp;quot;F2&amp;quot;, ... &amp;quot;Fn&amp;quot; (where n is the frame size). -- These names match the&lt;br /&gt;
    column names used by LIST.&lt;br /&gt;
  - If the two input files differ in size, the output file will have the&lt;br /&gt;
    same size as &amp;lt;IN1&amp;gt;. If &amp;lt;IN2&amp;gt; is larger, the extra values will be&lt;br /&gt;
    ignored; if &amp;lt;IN2&amp;gt; is smaller the missing values will be treated as if&lt;br /&gt;
    they were zero (blank strings for ASCII types).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
  1. The first input file is a Type 5000 file with records &amp;quot;FOO&amp;quot;,&amp;quot;BAR&amp;quot;,&amp;quot;BAZ&amp;quot;;&lt;br /&gt;
     the second is a Type 3000 file with records &amp;quot;MISC&amp;quot;. The output file&lt;br /&gt;
     should be a Type 3000 file that contains all of the records in the two&lt;br /&gt;
     files:&lt;br /&gt;
&lt;br /&gt;
       nM&amp;gt; GROUP2 outfile 3000 in1 {FOO=FOO,BAR=BAR,BAZ=BAZ} in2 {MISC=MISC}&lt;br /&gt;
&lt;br /&gt;
  2. The first input file is a Type 5000 file with records &amp;quot;FOO&amp;quot;,&amp;quot;BAR&amp;quot;;&lt;br /&gt;
     the second is a Type 3000 file with records &amp;quot;BAR&amp;quot;,&amp;quot;BAZ&amp;quot;. The output file&lt;br /&gt;
     should be a Type 5000 file that contains all of the records in the two&lt;br /&gt;
     files, except that the &amp;quot;BAR&amp;quot; in the first should be named &amp;quot;BAR1&amp;quot; and the&lt;br /&gt;
     &amp;quot;BAR&amp;quot; in the second should be named &amp;quot;BAR2&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
       nM&amp;gt; GROUP2 outfile 5000 in1 {FOO=FOO,BAR1=BAR} in2 {BAR2=BAR,BAZ=BAZ}&lt;br /&gt;
&lt;br /&gt;
  3. Convert a Type 3000 file with records &amp;quot;NAME&amp;quot;,&amp;quot;ALT&amp;quot;,&amp;quot;LAT&amp;quot;,&amp;quot;LON&amp;quot; to a&lt;br /&gt;
     Type 5000 file with records &amp;quot;NAME&amp;quot;,&amp;quot;POS&amp;quot; where &amp;quot;POS&amp;quot; is (alt,lat,lon):&lt;br /&gt;
&lt;br /&gt;
       nM&amp;gt; GROUP2 outfile 5000 infile {NAME=NAME,POS=VD:ALT|LAT|LON}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  4. Use the /ORDER= switch to set the order of the records in the output&lt;br /&gt;
     file:&lt;br /&gt;
&lt;br /&gt;
       nM&amp;gt; GROUP2/ORDER=&amp;quot;FOO,BAR,BAZ&amp;quot; outfile 3000 in1 {BAR=BAR,FOO=FOO} &amp;amp;&lt;br /&gt;
                                                   in2 {BAZ=BAZ}&lt;br /&gt;
&lt;br /&gt;
  5. Create a Type 3000 file with records &amp;quot;FOO&amp;quot;,&amp;quot;BAR&amp;quot;,&amp;quot;VAL&amp;quot; where &amp;quot;VAL&amp;quot; is&lt;br /&gt;
     a value that comes from a Type 1000 file.&lt;br /&gt;
&lt;br /&gt;
       nM&amp;gt; GROUP2 outfile 3000 in1 {BAR=BAR,FOO=FOO} in2 {VAL=F1}&lt;br /&gt;
&lt;br /&gt;
  6. Create a Type 3000 file with records &amp;quot;FOO&amp;quot;,&amp;quot;BAR&amp;quot;,&amp;quot;VAL&amp;quot; where &amp;quot;VAL&amp;quot; is&lt;br /&gt;
     a complex value that comes from a Type 2000 file that has a frame size&lt;br /&gt;
     of 2 where frame 1 is the real component and frame 2 is the imaginary.&lt;br /&gt;
&lt;br /&gt;
       nM&amp;gt; GROUP2 outfile 3000 in1 {BAR=BAR,FOO=FOO} in2 {VAL=F1|F2}&lt;br /&gt;
&lt;br /&gt;
  7. Join two Type 1000 files into a Type 3000 file with record names &amp;quot;IN1&amp;quot;&lt;br /&gt;
     and &amp;quot;IN2&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
       nM&amp;gt; GROUP2 outfile 3000 in1 {IN1=F1} in2 {IN2=F2}&lt;br /&gt;
&lt;br /&gt;
  8. Join a Type 1000 file with timecode and a Type 2000 file with a frame&lt;br /&gt;
     size of 4:&lt;br /&gt;
&lt;br /&gt;
       nM&amp;gt; GROUP2 outfile 3000 in1 {TIME=F1} in2 {F1=F1,F2=F2,F3=F3,F4=F4}&lt;br /&gt;
&lt;br /&gt;
  9. Combine three Type 1000 files one of which holds timecode (&amp;quot;TIME&amp;quot;),&lt;br /&gt;
     another with the real values and a third with the corresponding&lt;br /&gt;
     imaginary values into a Type 3000 file with fields &amp;quot;TIME&amp;quot; and &amp;quot;VAL&amp;quot;&lt;br /&gt;
     (where VAL=(real,imag)).&lt;br /&gt;
&lt;br /&gt;
       nM&amp;gt; GROUP2 temp    3000 in2 {REAL=F1} in3 {IMAG=F1}&lt;br /&gt;
       nM&amp;gt; GROUP2 outfile 3000 in1 {TIME=F1} temp {VAL=CF:REAL|IMAG}&lt;br /&gt;
&lt;br /&gt;
 10. Combine two Type 1000 files into a Type 2000 file:&lt;br /&gt;
&lt;br /&gt;
       nM&amp;gt; GROUP2 outfile 2000 in1 {F1=F1} in2 {F2=F1}&lt;br /&gt;
&lt;br /&gt;
 11. Split the records of a Type 2000 file (frame size is 2) into two Type&lt;br /&gt;
     1000 files:&lt;br /&gt;
&lt;br /&gt;
       nM&amp;gt; GROUP2 out1 3000 infile {F1=F1}&lt;br /&gt;
       nM&amp;gt; GROUP2 out2 3000 infile {F1=F2}&lt;br /&gt;
&lt;br /&gt;
 13. Split a Type 5000 file with &amp;quot;POS&amp;quot;,&amp;quot;NAME&amp;quot;,&amp;quot;FREQ&amp;quot; into three Type 1000&lt;br /&gt;
     files (where &amp;quot;POS&amp;quot; is converted to &amp;quot;VD&amp;quot;, &amp;quot;NAME&amp;quot; to &amp;quot;2A&amp;quot; and &amp;quot;FREQ&amp;quot; to&lt;br /&gt;
     &amp;quot;SF&amp;quot;):&lt;br /&gt;
&lt;br /&gt;
       nM&amp;gt; GROUP2 out1 1000 infile {F1=VD:POS}&lt;br /&gt;
       nM&amp;gt; GROUP2 out2 1000 infile {F1=2A:NAME}&lt;br /&gt;
       nM&amp;gt; GROUP2 out3 1000 infile {F1=SF:FREQ}&lt;br /&gt;
&lt;br /&gt;
 14. Combine two files using mappings defined in tables:&lt;br /&gt;
&lt;br /&gt;
       nM&amp;gt; res MAP1 {FOO=&amp;quot;FOO&amp;quot;}&lt;br /&gt;
       nM&amp;gt; res MAP2 { }&lt;br /&gt;
       nM&amp;gt; res MAP2.BAR=&amp;quot;BAR&amp;quot;&lt;br /&gt;
       nM&amp;gt; res MAP2.BAZ=&amp;quot;BAZ&amp;quot;&lt;br /&gt;
       nM&amp;gt; GROUP2 outfile 3000 in1 ^map1 in2 ^map2&lt;br /&gt;
&lt;br /&gt;
 15. Given a Type 3000 file with fields &amp;quot;FOO&amp;quot;,&amp;quot;BAR&amp;quot;,&amp;quot;BAZ&amp;quot;, make a copy of&lt;br /&gt;
     the &amp;quot;FOO&amp;quot; field and name it &amp;quot;COPY&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
       nM&amp;gt; GROUP2 outfile 3000 infile {FOO=FOO,BAR=BAR,BAZ=BAZ} &amp;amp;&lt;br /&gt;
                               infile {COPY=FOO}&lt;br /&gt;
&lt;br /&gt;
Switches:&lt;br /&gt;
  /ORDER=list  Defines the order of subrecords in the output file for Type&lt;br /&gt;
               3000/5000/6000 files. If this switch is not used, the ordering&lt;br /&gt;
               will be arbitrary.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:NXM_Explain]]&lt;/div&gt;</summary>
		<author><name>ConvertBot</name></author>
		
	</entry>
</feed>