View previous topic :: View next topic
|
Author |
Message |
maxsubrat
Active User
Joined: 27 Feb 2008 Posts: 110 Location: india
|
|
|
|
I have one requirement, the details are:
We are receiving data from other system through TSQ.
rightnow we are receiving one data which has 100 byte length.
There is some enhancement in the current process now..
so as per that we may receive multiple record instead of 1 record to process.
so suppose they sends 2 records to us, and we will receive through TSQ, then the record length will be 100 * 2 = 200 bytes in a single row..
So we need to read the TSQ till end of record..
so if we receive the data in a single row, then how to read the data through TSQ till end of record.
If we read one data, then process the data and so on.. then next record... like that we can finish all the
processings of data...
Can someone give some suggestion how to read the TSQ in this scenerio ?
Thanks |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
Did you read the manual? Did not this excerpt from the CICS Application Programming Reference manual in the READQ TS section not help?
Quote: |
LENGTH(data-area)
specifies the length, as a halfword binary value, of the record to be read.
If you specify the INTO option, LENGTH need not be specified if the length can be generated by the compiler from the INTO variable.
See "LENGTH options in CICS commands" in topic 1.7 for more information about when LENGTH must be specified.
If you specify INTO, LENGTH defines the maximum length of data that the program accepts. If the value specified is less than zero, zero is assumed. If the length of the data exceeds the value specified, the data is truncated to that value and the LENGERR condition occurs.
On completion of the retrieval operation, the data area is set to the original length of the data record read from the queue.
If you specify the SET option, the LENGTH must be specified. |
|
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
The INQUIRE TSQUEUE/TSQNAME command using keyword NUMITEMS (a binary halfword) will return the number of items (records) in the target TSQUEUE.
This command requires the "SP" option be specified during translation as INQUIRE is a System Programmer command. Check with your Technical Support team and ensure you're allowed to use this option in your shop as its use is suppressed in some. |
|
Back to top |
|
|
Peter cobolskolan
Active User
Joined: 06 Feb 2012 Posts: 104 Location: Sweden
|
|
|
|
The READQ TS also has a NUMITEMS(), and will give you the number of items in the TSQ at the first READQ TS.
When you READQ TS you will be given the ITEMERR condition when you have read all items. |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
True, but I took a guess that the OP would have known that, but maybe that was a bad assumption.... |
|
Back to top |
|
|
Marso
REXX Moderator
Joined: 13 Mar 2006 Posts: 1353 Location: Israel
|
|
|
|
Bill O'Boyle wrote: |
True, but I took a guess that the OP would have known that, but maybe that was a bad assumption.... |
Some information (like READQ TS NEXT) is on a need-to-know basis only... |
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1193 Location: Dublin, Ireland
|
|
|
|
Marso wrote: |
Bill O'Boyle wrote: |
True, but I took a guess that the OP would have known that, but maybe that was a bad assumption.... |
Some information (like READQ TS NEXT) is on a need-to-know basis only... |
... or on a 'need-to-be-pointed-out' basis.... ??
Garry |
|
Back to top |
|
|
|