<?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=IMPORT</id>
	<title>IMPORT - 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=IMPORT"/>
	<link rel="alternate" type="text/html" href="https://wiki.ice-online.com/index.php?title=IMPORT&amp;action=history"/>
	<updated>2026-09-24T14:41:34Z</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=IMPORT&amp;diff=742&amp;oldid=prev</id>
		<title>ConvertBot: Import a resource (file, environment variable, ...)</title>
		<link rel="alternate" type="text/html" href="https://wiki.ice-online.com/index.php?title=IMPORT&amp;diff=742&amp;oldid=prev"/>
		<updated>2020-04-27T22:04:43Z</updated>

		<summary type="html">&lt;p&gt;Import a resource (file, environment variable, ...)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Import a resource (file, environment variable, ...)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;IN&amp;gt;       - Input resource name. Quotes recommended. (Case-sensitive)&lt;br /&gt;
&amp;lt;OUT&amp;gt;      - Output resource name&lt;br /&gt;
&lt;br /&gt;
Keyword Only Parameters:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;DEF&amp;gt;      - Default value (case-sensitive) for case when environment variable&lt;br /&gt;
             does not exist. Otherwise result will NOT be set (since 3.1.2).&lt;br /&gt;
&amp;lt;KEY=VALUE,...,KEYn=VALUEn&amp;gt; - additional arguments for /F (import file).&lt;br /&gt;
&lt;br /&gt;
This command is intended to input an external resource of type:&lt;br /&gt;
  * OS Environment Variable&lt;br /&gt;
  * Non-Midas file&lt;br /&gt;
&lt;br /&gt;
This command throws a Midas error if &amp;lt;IN&amp;gt; is not given.&lt;br /&gt;
&lt;br /&gt;
If &amp;lt;IN&amp;gt; is &amp;quot;ALL&amp;quot;, then &amp;lt;OUT&amp;gt; will be a table of all environment variables&lt;br /&gt;
found in the shell.  If &amp;lt;OUT&amp;gt; is blank, it defaults to the uppercase of &amp;lt;IN&amp;gt;.&lt;br /&gt;
the terminal only.&lt;br /&gt;
&lt;br /&gt;
If the optional parameter &amp;lt;DEF&amp;gt; exists when importing an environment variable,&lt;br /&gt;
the given default value will be assigned to &amp;lt;OUT&amp;gt; in the even that the&lt;br /&gt;
environment variable does not exist.&lt;br /&gt;
&lt;br /&gt;
If /F is applied, &amp;lt;IN&amp;gt; is the path to a non-Midas file of data.  This&lt;br /&gt;
command will create a detached Midas header named &amp;lt;OUT&amp;gt; and rename the&lt;br /&gt;
non-Midas file to &amp;lt;OUT&amp;gt;.det.  The size is initialized assuming the&lt;br /&gt;
non-Midas file is all data and of format SB.  Any key=value parameter&lt;br /&gt;
pairs place after &amp;lt;OUT&amp;gt; are applied to the new header the same as if&lt;br /&gt;
running the HEADERMOD command on the file.  See the EXP on HEADERMOD.&lt;br /&gt;
&lt;br /&gt;
If /F is applied and &amp;lt;OUT&amp;gt; is blank, the detached Midas header file will&lt;br /&gt;
be created with the same name but a .tmp extension.  The non-Midas file&lt;br /&gt;
will not get a .det extension so it can still be used by other programs.&lt;br /&gt;
&lt;br /&gt;
Note: SIZE and DATASIZE arguments are treated as special cases. (Note that&lt;br /&gt;
SIZE is number of elements and DATASIZE is size of data in bytes).&lt;br /&gt;
&lt;br /&gt;
  SIZE: If the SIZE is specified on the IMPORT command line (e.g. SIZE=&amp;lt;value&amp;gt;),&lt;br /&gt;
        then the detached header file will be written to include &amp;lt;value&amp;gt; as the&lt;br /&gt;
        size, regardless of the actual number of elements&lt;br /&gt;
&lt;br /&gt;
  DATASIZE: If the DATASIZE is specified on the IMPORT command line (e.g.&lt;br /&gt;
        DATASIZE=&amp;lt;value&amp;gt;), then the detached header file will be written to&lt;br /&gt;
        list SIZE as &amp;lt;value&amp;gt;/(bytes per element).&lt;br /&gt;
&lt;br /&gt;
  If both SIZE and DATASIZE are specified on the IMPORT command line, then SIZE&lt;br /&gt;
  will have precedence.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
  1. Set a result with the value of the OS environment variable JREHOME&lt;br /&gt;
&lt;br /&gt;
    nM&amp;gt; import &amp;quot;JREHOME&amp;quot; jrehome  ! Note: quoting env var name prevents&lt;br /&gt;
                                  !       import from getting the VALUE&lt;br /&gt;
                                  !       of JREHOME on subsequent calls&lt;br /&gt;
&lt;br /&gt;
  2. Set a result with the value of the OS environment variable JREHOME,&lt;br /&gt;
     but if that environment variable does not exist, put it in the results&lt;br /&gt;
     table with the given &amp;lt;DEF&amp;gt; parameter value:&lt;br /&gt;
&lt;br /&gt;
     nM&amp;gt; import &amp;quot;JREHOME&amp;quot; jrehome DEF=&amp;quot;my_jrehome_path&amp;quot;&lt;br /&gt;
&lt;br /&gt;
  3. Import a file of 16 bit integers generated by MatLab&lt;br /&gt;
&lt;br /&gt;
    nM&amp;gt; import/f matlabfile.data myfile form=si&lt;br /&gt;
&lt;br /&gt;
  4. Import a file and 'force' the header to display a different size (in bytes)&lt;br /&gt;
&lt;br /&gt;
    nM&amp;gt; import/f in=testsine.bin form=cf datastart=512 datasize=800&lt;br /&gt;
&lt;br /&gt;
  5. Import a type 3000 file&lt;br /&gt;
&lt;br /&gt;
     nM&amp;gt;  import/f in=testcities.bin type=3000 form=nh &amp;amp;&lt;br /&gt;
                   sr=(POS/VD,NAME/1A) datastart=512&lt;br /&gt;
&lt;br /&gt;
Switches:&lt;br /&gt;
  /F    - Import a file. Will import env var if not set. [DEF=FALSE]&lt;br /&gt;
  /WARN - Turn on/off warnings in this command [DEF=TRUE]&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>