Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
Syntax for random access- RRDS

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
Author Message
MARINA JOSEPH

New User


Joined: 11 Jun 2009
Posts: 61
Location: chennai

PostPosted: Thu Jun 18, 2009 6:05 pm    Post subject: Syntax for random access- RRDS
Reply with quote

Hi all,

Can some somebody tell me if the below syntax for random access of an RRDS file is correct?

Deleting from an RRDS file is possible. But it is not possible to delete from an ESDS file.

RRDS – Random Access

/*Read RRDS file */
EXEC CICS READ DATASET('RRDS')
RIDFLD(RRDS-KEY)
INTO(DUMMY-AREA)
UPDATE
RRN
RESP(WS-RESP)
END-EXEC.


/*Update RRDS file*/
EXEC CICS REWRITE DATASET('RRDS')
FROM(WS-FILE-VAR)
RESP(WS-RESP)
END-EXEC.



/*Write RRDS file */

EXEC CICS WRITE DATASET('RRDS')
RIDFLD(RRDS-KEY)
FROM(WS-FILE-VAR)
RRN
RESP(WS-RESP)
END-EXEC.

/* Delete RRDS file*/

EXEC CICS DELETE DATASET('RRDS')
RIDFLD(RRDS-KEY)
RRN
RESP(WS-RESP)
END-EXEC.



Thanks,
Marina.
Back to top
View user's profile Send private message
References
Bill O'Boyle

Active Member


Joined: 14 Jan 2008
Posts: 982
Location: South Carolina, USA

PostPosted: Thu Jun 18, 2009 10:36 pm    Post subject: Reply to: Syntax for random access- RRDS
Reply with quote

Yes, a cursory look indicates the syntax is fine, but you should review the appropriate manual to be sure.

One word of caution; when you DELETE a record (other than ESDS which does not allow deletes), good practice and good technique dictates that you must first read the record for UPDATE, then followed by the DELETE or (if you don't want to issue the DELETE), then issue an UNLOCK.

Try not to leave a record in UPDATE mode for too long, because you are not just locking the record, you are locking the entire CONTROLINTERVAL where this record and potentially many others, reside.

You'll be glad you did.... icon_wink.gif

Regards,
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS All times are GMT + 6 Hours
Page 1 of 1