<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to use JSL how to modify decimal numbers to binary data in this format? in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/How-to-use-JSL-how-to-modify-decimal-numbers-to-binary-data-in/m-p/518944#M74501</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;c = "0000000000000000000000000000000000";&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;34——OK&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;c = "0000000000000000000000";&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;22——&lt;EM&gt;&lt;SPAN class=""&gt;&lt;A target="_blank"&gt;wrong&lt;/A&gt;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 08 Jul 2022 07:11:10 GMT</pubDate>
    <dc:creator>lala</dc:creator>
    <dc:date>2022-07-08T07:11:10Z</dc:date>
    <item>
      <title>How to use JSL how to modify decimal numbers to binary data in this format?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-use-JSL-how-to-modify-decimal-numbers-to-binary-data-in/m-p/518907#M74495</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;How to use JSL how to modify decimal numbers to binary data in this format?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;000903
999999&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2022-07-08_13-31-17.png" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/43804iD0876320ADBB3226/image-size/large?v=v2&amp;amp;px=999" role="button" title="2022-07-08_13-31-17.png" alt="2022-07-08_13-31-17.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jun 2023 17:03:46 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-use-JSL-how-to-modify-decimal-numbers-to-binary-data-in/m-p/518907#M74495</guid>
      <dc:creator>lala</dc:creator>
      <dc:date>2023-06-09T17:03:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to use JSL how to modify decimal numbers to binary data in this format?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-use-JSL-how-to-modify-decimal-numbers-to-binary-data-in/m-p/518908#M74496</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;D:\E\download1.dat&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 08 Jul 2022 05:47:43 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-use-JSL-how-to-modify-decimal-numbers-to-binary-data-in/m-p/518908#M74496</guid>
      <dc:creator>lala</dc:creator>
      <dc:date>2022-07-08T05:47:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to use JSL how to modify decimal numbers to binary data in this format?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-use-JSL-how-to-modify-decimal-numbers-to-binary-data-in/m-p/518932#M74498</link>
      <description>&lt;P&gt;This is just a conversion to Hex&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
a = "000903";
theHex = "";
i = 1;
While( Substr( a, i, 1 ) != "",
	theHex = theHex || Hex( Substr( a, i, 1 ) );
	i++;
);
Show( theHex );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;This returns&lt;/P&gt;
&lt;PRE&gt;theHex = "303030393033";&lt;/PRE&gt;</description>
      <pubDate>Fri, 08 Jul 2022 06:21:02 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-use-JSL-how-to-modify-decimal-numbers-to-binary-data-in/m-p/518932#M74498</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2022-07-08T06:21:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to use JSL how to modify decimal numbers to binary data in this format?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-use-JSL-how-to-modify-decimal-numbers-to-binary-data-in/m-p/518938#M74499</link>
      <description>&lt;P&gt;Thank Jim!&lt;/P&gt;&lt;P&gt;So I understand the principle of calculation.But I still can't figure out how to end up adding something else and saving it in this format.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks Experts!&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2022-07-08_14-39-03.png" style="width: 396px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/43805i737D0ED3C7B01998/image-size/large?v=v2&amp;amp;px=999" role="button" title="2022-07-08_14-39-03.png" alt="2022-07-08_14-39-03.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jul 2022 06:42:41 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-use-JSL-how-to-modify-decimal-numbers-to-binary-data-in/m-p/518938#M74499</guid>
      <dc:creator>lala</dc:creator>
      <dc:date>2022-07-08T06:42:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to use JSL how to modify decimal numbers to binary data in this format?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-use-JSL-how-to-modify-decimal-numbers-to-binary-data-in/m-p/518943#M74500</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2022-07-08_14-58-14.png" style="width: 938px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/43807iE89301F4A502D5AB/image-size/large?v=v2&amp;amp;px=999" role="button" title="2022-07-08_14-58-14.png" alt="2022-07-08_14-58-14.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jul 2022 06:59:37 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-use-JSL-how-to-modify-decimal-numbers-to-binary-data-in/m-p/518943#M74500</guid>
      <dc:creator>lala</dc:creator>
      <dc:date>2022-07-08T06:59:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to use JSL how to modify decimal numbers to binary data in this format?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-use-JSL-how-to-modify-decimal-numbers-to-binary-data-in/m-p/518944#M74501</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;c = "0000000000000000000000000000000000";&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;34——OK&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;c = "0000000000000000000000";&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;22——&lt;EM&gt;&lt;SPAN class=""&gt;&lt;A target="_blank"&gt;wrong&lt;/A&gt;&lt;/SPAN&gt;&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jul 2022 07:11:10 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-use-JSL-how-to-modify-decimal-numbers-to-binary-data-in/m-p/518944#M74501</guid>
      <dc:creator>lala</dc:creator>
      <dc:date>2022-07-08T07:11:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to use JSL how to modify decimal numbers to binary data in this format?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-use-JSL-how-to-modify-decimal-numbers-to-binary-data-in/m-p/519229#M74526</link>
      <description>&lt;P&gt;d="0100303030393033000000000000000000000001003939393939390000000000000000000000"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't understand&amp;nbsp; 34=OK and 33=wrong&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jul 2022 16:38:49 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-use-JSL-how-to-modify-decimal-numbers-to-binary-data-in/m-p/519229#M74526</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2022-07-08T16:38:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to use JSL how to modify decimal numbers to binary data in this format?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-use-JSL-how-to-modify-decimal-numbers-to-binary-data-in/m-p/519334#M74531</link>
      <description>&lt;UL&gt;&lt;LI&gt;&lt;P class=""&gt;That's what's right. C has to have 34 zeros.&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;d="0100303030393033000000000000000000000000000000000001003939393939390000000000000000000000000000000000"&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;d="0100303030393033000000000000000000000000000000000001003939393939390000000000000000000000000000000000"&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 09 Jul 2022 01:44:48 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-use-JSL-how-to-modify-decimal-numbers-to-binary-data-in/m-p/519334#M74531</guid>
      <dc:creator>lala</dc:creator>
      <dc:date>2022-07-09T01:44:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to use JSL how to modify decimal numbers to binary data in this format?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-use-JSL-how-to-modify-decimal-numbers-to-binary-data-in/m-p/519428#M74544</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/17251"&gt;@lala&lt;/a&gt;&amp;nbsp;, it's really hard to follow you, what you do and what you want. I think the suggestion of Jim is fine, and your problem is not in JSL but in file operations.&lt;/P&gt;
&lt;P&gt;My feeling is that you shouldn't write binary data in a text file. If this would work, you should be able to re-read it, but this is not the case, JMP throws an errror.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

tem = {"000903", "999999"};
b = "0100";
c = "0000000000000000000000000000000000";
d = "";
j = 1;
For( j = 1, j &amp;lt;= N Items( tem ), j++,
	a = tem[j];
	theHex = "";
	i = 1;
	While( Substr( a, i, 1 ) != "",
		theHex = theHex || Hex( Substr( a, i, 1 ) );
		i++;
		
	);
	d = d || b || theHex || c;
);
Show( d );
Show( "d = 0100303030393033000000000000000000000000000000000001003939393939390000000000000000000000000000000000" );
filename = Save Text File( "TEMP\try1.dat", Hex To Blob( d ) );
text = Load Text File( filename );
Show( (Blob To Char( text )) );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 10 Jul 2022 13:09:27 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-use-JSL-how-to-modify-decimal-numbers-to-binary-data-in/m-p/519428#M74544</guid>
      <dc:creator>Georg</dc:creator>
      <dc:date>2022-07-10T13:09:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to use JSL how to modify decimal numbers to binary data in this format?</title>
      <link>https://community.jmp.com/t5/Discussions/How-to-use-JSL-how-to-modify-decimal-numbers-to-binary-data-in/m-p/519431#M74545</link>
      <description>&lt;P&gt;Sorry, I've been wrong, Load/Save Text File supports BLOB, see scripting index. But I think anything else is going wrong during file operation. Below JSL with option for reading BLOB.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );

tem = {"000903", "999999"};
b = "0100";
c = "0000000000000000000000000000000000";
d = "";
j = 1;
For( j = 1, j &amp;lt;= N Items( tem ), j++,
	a = tem[j];
	theHex = "";
	i = 1;
	While( Substr( a, i, 1 ) != "",
		theHex = theHex || Hex( Substr( a, i, 1 ) );
		i++;
		
	);
	d = d || b || theHex || c;
);
Show( d );
Show( "d = 0100303030393033000000000000000000000000000000000001003939393939390000000000000000000000000000000000" );
filename = Save Text File( "$TEMP\try1.dat", Hex To Blob( d ) );
text = Load Text File( filename, BLOB );
Show( (Blob To Char( text )) );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 10 Jul 2022 14:16:43 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/How-to-use-JSL-how-to-modify-decimal-numbers-to-binary-data-in/m-p/519431#M74545</guid>
      <dc:creator>Georg</dc:creator>
      <dc:date>2022-07-10T14:16:43Z</dc:date>
    </item>
  </channel>
</rss>

