Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What is the command for reading a record form a TSQ?

Answer Posted / hems

Temporary Storage Queues:

The temporary program (TSP) provides the application
program with an ability to do store and retrieve the data
in a temporary storage queue (TSQ)

TSQ can be used as scratch pad memory.

TSQ can be created and deleted dynamically by an
application program without specifying anything in CICS
control tables.

Temporary storage queue which are to recovered in the event
of failure should be registered in TST (Temporary Storage
Table)

A TSQ is identified by the queue id (1 to 8 bytes).

A record in a TSQ can be read any number of times, they can
be read both sequentially and randomly and records in a TSQ
can also be updated.

TSQ can be written in the main storage or in the auxiliary
storage. If the TSQ is written in main storage, accessing
TSQ is very fast but TSQ in this mode is not recoverable.

TSQ which is written in auxiliary storage (external VSAM
file) can be recoverable.

WRITEQ TS Command

EXEC CICS WRITEQ
QUEUE (name)
FROM (data-area)
LENGTH (data-value)
ITEM (data-area)
REWRITE
MAIN / AUXILIARY
NOSUSPEND
END-EXEC.

The WRITEQ command is used to write a record (item) in a
TSQ.

LENGTH indicates the length of data records. It is a half
word binary (S9(4) COMP)
ITEM specifies the relative position number. It is defined
as a half word binary (S9(4) COMP)
MAIN : specifies main storage.
AUXILIARY : specifies auxiliary storage. This is default.
REWRITE : Option is used to rewrite a record in a TSQ,
which has been read.
NOSUSPEND : If no space is detected in the TSQ for the
new record, CICS will return the control to the next
statement after the WRITEQ command instead of suspending
the task if NOSUSPEND is specified in the WRITEQ command.

At the end of the write command CICS places item number of
the record written into ITEM parameter.

Exceptional condition to WRITEQ are:
NOSPACE Sufficient space is not available. The default
action is suspend the task untill space is available.

READQ TS Command

EXEC CICS READQ
QUEUE (name)
INTO (data-area) / SET (data-area)
LENGTH (data-area)
ITEM (data-value) / NEXT
END-EXEC.

The READQ command is used to read all the records in a TSQ
sequentially or to read a particular record randomly.

INTO determines the area to which the record data is to be
placed.
LENGTH indicates the length of the record to be read.
ITEM indicates item number of the record to be read.
SET option can also be used instead of INTO option.

Other options of the READQ command is

NUMITEMS Specify NUMITEMS (data-area) in READQ command.
The data area defined as S9(4) COMP. At the completion of
the read command, CICS will place the actual number of the
records in the TSQ specified.

NEXT if this option is specified, task will read the
next sequential record in the TSQ
specified. This option should be used very carefully.

Exceptional conditions are
QIDERR : The specified QID is not found.
ITEMERR : The specified item number is not found. For
sequential read it indicates end
of the queue.

DELETEQ TS Command

EXEC CICS DELETEQ TS
QUEUE (name)
END-EXEC.

The DELETEQ command is used to delete a TSQ entirely.
Cannot delete a single item from the TSQ.

Exceptional conditions are
QIDERR : The specified QID is not found.

Is This Answer Correct ?    10 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can you explain multitasking and multithreading?

1076


which cics service transaction is used to gain accessibility to cics control tables? Mention the one that has the highest priority.?

1142


Name the cics command used to access current date and time?

1055


Explain the difference between exec cics handle condtion and an exec cics ignore command?

981


Explain the uses that are associated to tsq and tdq ?

1037


Explain the difference between a return with transid and xctl? For example program. A is issuing return with transid to program b. Program a. Is isssuing xctl to program b?

992


Code the related portions of cics/cobol-i programs to gain addressability to twa area assigned to a particular task. Assme that the size of twa area is 300bytes. What are the advantages if cobol-ii is used in the place of cobol?

1082


How vsam files are read in cics pgms?

1232


What is a cics task?

1005


How can you access esds files from cics?

1034


What is the procedure to solve an ASRA ABEND?

982


What is interval control?

1040


What is journal recovery?

986


Explain what is a cursor in cics sql processing?

959


the dfhcommara is used to pass information from one application to another. What are some other ways that this function can be accomplished?

1088