Difference: 0LASubrStreamRead (1 vs. 9)

Revision 92016-03-02 - JeanNeron

Line: 1 to 1
 
META TOPICPARENT name="APPXRuntimeSubroutineAPI"

.STREAM READ

Line: 39 to 39
 If --- .STREAM READ contains 'Data was truncated', it means the <read_buffer> field you passed was not large enough to contain all the data that was read. If --- .STREAM READ contains 'EOF', then there is no more data to be read.

Binary File Support - 5.4.4

Changed:
<
<
Starting in Release 5.4.4 you can open a file with a 'binary' option. In this case, the <read length> tells the API how many characters to read. If you do not pass a <read length> or pass zero, it will default to the length of the <read buffer> field. The <length read> will always tell you how many characters were actually read. If the length of <read_buffer> is greater than 32000, only the first 32000 bytes will be read. The API will return EOF in .STREAM READ when there are no more characters to be read.
>
>
Starting in Release 5.4.4 you can open a file with a 'binary' option. In this case, the <read length> tells the API how many characters to read. If you do not pass a <read length> or pass zero, it will default to the length of the <read buffer> field. If the length of <read_buffer> is greater than 32000, only the first 32000 bytes will be read. The API might return fewer characters than requested if there aren't enough in the file. The <length read> will always tell you how many characters were actually read. The API will return EOF in .STREAM READ when there are no more characters to be read.
 

Comments:

Read what other users have said about this page or add your own comments.

Revision 82016-03-02 - JeanNeron

Line: 1 to 1
 
META TOPICPARENT name="APPXRuntimeSubroutineAPI"

.STREAM READ

Line: 37 to 37
 <length_read> is the number of characters actually read (5.3.2 and higher only). This must be passed SHARED to return a value.

If --- .STREAM READ contains 'Data was truncated', it means the <read_buffer> field you passed was not large enough to contain all the data that was read. If --- .STREAM READ contains 'EOF', then there is no more data to be read.

Added:
>
>

Binary File Support - 5.4.4

Starting in Release 5.4.4 you can open a file with a 'binary' option. In this case, the <read length> tells the API how many characters to read. If you do not pass a <read length> or pass zero, it will default to the length of the <read buffer> field. The <length read> will always tell you how many characters were actually read. If the length of <read_buffer> is greater than 32000, only the first 32000 bytes will be read. The API will return EOF in .STREAM READ when there are no more characters to be read.

 

Comments:

Read what other users have said about this page or add your own comments.

Revision 72014-03-28 - JeanNeron

Line: 1 to 1
 
META TOPICPARENT name="APPXRuntimeSubroutineAPI"

.STREAM READ

This subroutine is called to read a file stream.


Changed:
<
<

Usage: (5.3.1 or earlier)

>
>

Usage: (Option 1)

 
      PASS         <read_buffer>              FIELD            SHARE? Y
      PASS         <stream_name>              FIELD            SHARE? N
      PASS         <read_length>              FIELD            SHARE? Y

Line: 13 to 13
 
    • check for errors IF --- .STREAM READ NE
Changed:
<
<

Usage: (5.3.2 or later)

>
>

Usage: (Option 2, 5.3.2 or later only)

 
      PASS         <read_buffer>              FIELD            SHARE? Y
      PASS         <stream_name>              FIELD            SHARE? N
      PASS         <read_length>              FIELD            SHARE? N

Line: 32 to 32
  <stream_name> is the name of the previously opened stream (Required).
Changed:
<
<
<read_length> is the number of bytes to read (optional). If not passed it will read up until a line termination character to a maximum of 32000 characters. If a value is passed it will read up to that number of characters or until a line termination character is encountered, whichever comes first. In Releases 5.3.1 and earlier, if passed shared, it will return the number of characters actually read, however, you should set it back to 32000 before the next GOSUB --- .STREAM READ, otherwise this subroutine will only read that number of characters. In Release 5.3.2 and higher, this will value not return anything and will not change, even if passed SHARED.
>
>
<read_length> is the number of bytes to read (optional). If not passed it will read up until a line termination character to a maximum of 32000 characters. If a value is passed it will read up to that number of characters or until a line termination character is encountered, whichever comes first. In Option 1, if passed shared, it will return the number of characters actually read, however, you should set it back to 32000 before the next GOSUB --- .STREAM READ, otherwise this subroutine will only read that number of characters (or less). If you PASS <length_read> as in Option 2, this will value not return anything and will not change, even if passed SHARED. In this case, the number of bytes read will be returned in <length_read>.
  <length_read> is the number of characters actually read (5.3.2 and higher only). This must be passed SHARED to return a value.

Revision 62014-03-19 - JeanNeron

Line: 1 to 1
 
META TOPICPARENT name="APPXRuntimeSubroutineAPI"

.STREAM READ

This subroutine is called to read a file stream.


Changed:
<
<

Usage:

>
>

Usage: (5.3.1 or earlier)

 
      PASS         <read_buffer>              FIELD            SHARE? Y
      PASS         <stream_name>              FIELD            SHARE? N
      PASS         <read_length>              FIELD            SHARE? Y
      GOSUB    --- .STREAM READ
      *        check for errors
      IF       --- .STREAM READ               NE

Changed:
<
<
>
>

Usage: (5.3.2 or later)

      PASS         <read_buffer>              FIELD            SHARE? Y
      PASS         <stream_name>              FIELD            SHARE? N
      PASS         <read_length>              FIELD            SHARE? N
      PASS         <length_read>              FIELD            SHARE? Y
      GOSUB    --- .STREAM READ
      *        check for errors
      IF       --- .STREAM READ               NE

 

Description:

This subroutine is called to read a file stream previously opened for READ access via .STREAM OPEN.

Changed:
<
<
The first two parameters are required, and the subroutine will CANCEL if they are are not all received. The <read_length> parameter is optional.
>
>
The first two parameters are required, and the subroutine will CANCEL if they are are not all received. The <read_length> and <length_read> parameters are optional.
  <read_buffer> contains the data read from <stream_name> (Required). This subroutine can read lines up to a maximum of 32000 characters long. This must be passed SHARED to return any data.

<stream_name> is the name of the previously opened stream (Required).

Changed:
<
<
<read_length> is the number of bytes to read (optional). If not passed it will read up until the line termination character specified in .STREAM OPEN to a maximum of 32000 characters. If passed shared, it will return the number of characters actually read, however, you should set it back to 32000 before the next GOSUB --- .STREAM READ, otherwise this subroutine will only read that number of characters.
>
>
<read_length> is the number of bytes to read (optional). If not passed it will read up until a line termination character to a maximum of 32000 characters. If a value is passed it will read up to that number of characters or until a line termination character is encountered, whichever comes first. In Releases 5.3.1 and earlier, if passed shared, it will return the number of characters actually read, however, you should set it back to 32000 before the next GOSUB --- .STREAM READ, otherwise this subroutine will only read that number of characters. In Release 5.3.2 and higher, this will value not return anything and will not change, even if passed SHARED.

<length_read> is the number of characters actually read (5.3.2 and higher only). This must be passed SHARED to return a value.

  If --- .STREAM READ contains 'Data was truncated', it means the <read_buffer> field you passed was not large enough to contain all the data that was read. If --- .STREAM READ contains 'EOF', then there is no more data to be read.

Comments:

Revision 52012-02-16 - JeanNeron

Line: 1 to 1
 
META TOPICPARENT name="APPXRuntimeSubroutineAPI"

.STREAM READ

Line: 24 to 24
  <stream_name> is the name of the previously opened stream (Required).
Changed:
<
<
<read_length> is the number of bytes to read (optional). If not passed, or if blank/zero is passed, it will read up until the line termination character specified in .STREAM OPEN. If passed shared, it will return the number of characters actually read, however, you should set it back to zero before the next GOSUB --- .STREAM READ, otherwise this subroutine will only read that number of characters.
>
>
<read_length> is the number of bytes to read (optional). If not passed it will read up until the line termination character specified in .STREAM OPEN to a maximum of 32000 characters. If passed shared, it will return the number of characters actually read, however, you should set it back to 32000 before the next GOSUB --- .STREAM READ, otherwise this subroutine will only read that number of characters.
  If --- .STREAM READ contains 'Data was truncated', it means the <read_buffer> field you passed was not large enough to contain all the data that was read. If --- .STREAM READ contains 'EOF', then there is no more data to be read.

Comments:

Revision 42012-02-10 - JeanNeron

Line: 1 to 1
 
META TOPICPARENT name="APPXRuntimeSubroutineAPI"

.STREAM READ

Line: 20 to 20
  The first two parameters are required, and the subroutine will CANCEL if they are are not all received. The <read_length> parameter is optional.
Changed:
<
<
<read_buffer> is the variable into which the data will be read (Required). This subroutine can read lines up to a maximum of 32000 characters. This must be passed SHARED to return any data.
>
>
<read_buffer> contains the data read from <stream_name> (Required). This subroutine can read lines up to a maximum of 32000 characters long. This must be passed SHARED to return any data.
  <stream_name> is the name of the previously opened stream (Required).

Revision 32012-01-25 - JeanNeron

Line: 1 to 1
 
META TOPICPARENT name="APPXRuntimeSubroutineAPI"

.STREAM READ

Line: 20 to 20
  The first two parameters are required, and the subroutine will CANCEL if they are are not all received. The <read_length> parameter is optional.
Changed:
<
<
<read_buffer> identifies the variable into which the data will be read (Required). This subroutine can read lines up to a maximum of 32000 characters. This must be passed SHARED to return any data.
>
>
<read_buffer> is the variable into which the data will be read (Required). This subroutine can read lines up to a maximum of 32000 characters. This must be passed SHARED to return any data.
  <stream_name> is the name of the previously opened stream (Required).

<read_length> is the number of bytes to read (optional). If not passed, or if blank/zero is passed, it will read up until the line termination character specified in .STREAM OPEN. If passed shared, it will return the number of characters actually read, however, you should set it back to zero before the next GOSUB --- .STREAM READ, otherwise this subroutine will only read that number of characters.

Changed:
<
<
This subroutine sets a result value in the corresponding results Token field. The 'Data was truncated' result means the <read_buffer> field you passed was not large enough to contain all the data that was read.
>
>
If --- .STREAM READ contains 'Data was truncated', it means the <read_buffer> field you passed was not large enough to contain all the data that was read. If --- .STREAM READ contains 'EOF', then there is no more data to be read.
 

Comments:

Read what other users have said about this page or add your own comments.

Revision 22012-01-24 - JeanNeron

Line: 1 to 1
 
META TOPICPARENT name="APPXRuntimeSubroutineAPI"

.STREAM READ

Line: 6 to 6
 

Usage:

Changed:
<
<
      PASS         <read_buffer>                               SHARE? Y
      PASS         <stream_name>                               SHARE? N
      PASS         <read_length>                               SHARE? Y

>
>
      PASS         <read_buffer>              FIELD            SHARE? Y
      PASS         <stream_name>              FIELD            SHARE? N
      PASS         <read_length>              FIELD            SHARE? Y

  GOSUB --- .STREAM READ
    • check for errors
Changed:
<
<
IF --- .STREAM OPEN NE
>
>
IF --- .STREAM READ NE
 

Description:

Line: 24 to 24
  <stream_name> is the name of the previously opened stream (Required).
Changed:
<
<
<read_length> is the number of bytes to read (optional). If not passed, or blank/zero is passed, it will read up until the line termination character specified in .STREAM OPEN. If passed shared, it will return the number of characters actually read, however, you should set it back to zero before the next GOSUB --- .STREAM READ, otherwise this subroutine will only read that number of characters.
>
>
<read_length> is the number of bytes to read (optional). If not passed, or if blank/zero is passed, it will read up until the line termination character specified in .STREAM OPEN. If passed shared, it will return the number of characters actually read, however, you should set it back to zero before the next GOSUB --- .STREAM READ, otherwise this subroutine will only read that number of characters.
  This subroutine sets a result value in the corresponding results Token field. The 'Data was truncated' result means the <read_buffer> field you passed was not large enough to contain all the data that was read.

Comments:

Revision 12012-01-23 - JeanNeron

Line: 1 to 1
Added:
>
>
META TOPICPARENT name="APPXRuntimeSubroutineAPI"

.STREAM READ

This subroutine is called to read a file stream.


Usage:

      PASS         <read_buffer>                               SHARE? Y
      PASS         <stream_name>                               SHARE? N
      PASS         <read_length>                               SHARE? Y
      GOSUB    --- .STREAM READ
      *        check for errors
      IF       --- .STREAM OPEN               NE

Description:

This subroutine is called to read a file stream previously opened for READ access via .STREAM OPEN.

The first two parameters are required, and the subroutine will CANCEL if they are are not all received. The <read_length> parameter is optional.

<read_buffer> identifies the variable into which the data will be read (Required). This subroutine can read lines up to a maximum of 32000 characters. This must be passed SHARED to return any data.

<stream_name> is the name of the previously opened stream (Required).

<read_length> is the number of bytes to read (optional). If not passed, or blank/zero is passed, it will read up until the line termination character specified in .STREAM OPEN. If passed shared, it will return the number of characters actually read, however, you should set it back to zero before the next GOSUB --- .STREAM READ, otherwise this subroutine will only read that number of characters.

This subroutine sets a result value in the corresponding results Token field. The 'Data was truncated' result means the <read_buffer> field you passed was not large enough to contain all the data that was read.

Comments:

Read what other users have said about this page or add your own comments.


<--/commentPlugin-->

-- JeanNeron - 2012-01-23

 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback