CHAR (JANUS DEFINE parameter): Difference between revisions

From m204wiki
Jump to navigation Jump to search
m (1 revision)
m (minor formatting)
 
(22 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{DISPLAYTITLE:CHAR}}
<span class="pageSubtitle">Turns on character translation on a socket port</span>
<span class="pageSubtitle"><section begin="desc" /><section end="desc" /></span>


CHAR is a parameter on [[JANUS DEFINE]], which defines and sets characteristics of a Janus port. See the [[JANUS DEFINE#parmlist|List of JANUS DEFINE parameters]].
<var>CHAR</var> is a parameter on <var>[[JANUS DEFINE]]</var>, which defines and sets characteristics of a Janus port.  


This parameter requests <var class="product">[[Janus Sockets]]</var> to translate strings (sent and received with <var class="product">Janus Sockets</var> $functions or methods) between the internal representation within <var class="product">Model 204</var> (EBCDIC) and the character representation used by the remote end of the connection.


This translation can be disabled by one of the following:


This parameter requests ''[[Janus Sockets]]'' to translate strings (sent and received with ''[[Janus Sockets]]'' functions or methods) between the internal representation within ''Model 204'' (EBCDIC) and the character representation used by the remote end of the connection.
This translation can be disabled by one of the following:
<ul>
<ul>
 
<li>Setting a socket to <var>BINARY</var> using <var>[[$Sock_Set]]</var> or the <var>[[Set (Socket function)|Set]]</var> function of the <var>Socket</var> class  
<li>Setting a socket to BINARY using $SOCK_SET (:hdref reftxt=$SOCK_SET refid=skset.) or the Set function (:hdref reftxt=Set refid=setmeth.) of the Socket class  
<li>Using the <var>BINARY</var> option on an individual receive or send <var class="product">Janus Sockets</var> $function or <var>Socket</var> class method  
<li>Using the BINARY option on an individual receive or send $function or Socket class method  
<li>Using an option of the <var>[[AddField (HttpRequest subroutine)|AddField]]</var> method or the <var>[[Content (HttpResponse function)|Content]]</var> method of the <var>[[HTTP Helper]]</var>
<li>Using an option of the AddField method (:hdref reftxt=AddField refid=adfield.) or the Content method (:hdref reftxt=Content refid=content.) of the HTTP Helper
</ul>
</ul>


Individual strings can always be translated using <var>[[$Sock_Tran_In]]</var> or <var>[[$Sock_Tran_Out]]</var>, or their <var>Socket</var> method counterparts, <var>[[TranIn (Socket function)|TranIn]]</var> or <var>[[TranOut (Socket function)|TranOut]]</var>.


Individual strings can always be translated using $SOCK_TRAN_IN or $SOCK_TRAN_OUT, or their Socket method counterparts, TranIn or TranOut.  
If the <var>CHAR</var> setting is in effect, translation is determined by the tables defined by the socket's <var>[[XTAB (JANUS DEFINE parameter)|XTAB]]</var> setting.


If the CHAR setting is in effect, translation is determined by the tables defined by the socket's XTAB (:hdref reftxt=XTAB refid=xtab.) setting.  
The <var>[[BINARY (JANUS DEFINE parameter)|BINARY]]</var> parameter is the opposite of <var>CHAR</var>. <var>CHAR</var> is the default.  


The BINARY parameter (:hdref reftxt=BINARY refid=binary.) is the opposite of CHAR. CHAR is the default.  
Valid only for <var>[[JANUS DEFINE#type|CLSOCK]]</var> and <var>[[JANUS DEFINE#type|SRVSOCK]]</var> ports.


Valid only for CLSOCK and SRVSOCK ports.
==See also==
 
<ul>
==References==
<li>[[List of Janus commands]]
 
<li>[[JANUS DEFINE#parmlist|List of JANUS DEFINE parameters]]
See: [[List of Janus commands]] | [[JANUS DEFINE#parmlist|List of JANUS DEFINE parameters]].
</ul>


[[Category:JANUS DEFINE parameters|CHAR]]
[[Category:JANUS DEFINE parameters|CHAR]]

Latest revision as of 18:14, 8 June 2016

Turns on character translation on a socket port

CHAR is a parameter on JANUS DEFINE, which defines and sets characteristics of a Janus port.

This parameter requests Janus Sockets to translate strings (sent and received with Janus Sockets $functions or methods) between the internal representation within Model 204 (EBCDIC) and the character representation used by the remote end of the connection.

This translation can be disabled by one of the following:

  • Setting a socket to BINARY using $Sock_Set or the Set function of the Socket class
  • Using the BINARY option on an individual receive or send Janus Sockets $function or Socket class method
  • Using an option of the AddField method or the Content method of the HTTP Helper

Individual strings can always be translated using $Sock_Tran_In or $Sock_Tran_Out, or their Socket method counterparts, TranIn or TranOut.

If the CHAR setting is in effect, translation is determined by the tables defined by the socket's XTAB setting.

The BINARY parameter is the opposite of CHAR. CHAR is the default.

Valid only for CLSOCK and SRVSOCK ports.

See also