Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ 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
View previous topic :: :: View next topic  
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

Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, 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
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts FINDREP Syntax Error seahawk789 DFSORT/ICETOOL 4 Thu Mar 09, 2017 10:11 pm
No new posts IMS DC screen Access sivasaras IMS DB/DC 3 Fri Nov 18, 2016 6:38 pm
This topic is locked: you cannot edit posts or make replies. RANDOM Function in COBOL swapnil781 COBOL Programming 2 Tue Nov 15, 2016 6:17 pm
No new posts Access SQLCA fields inside a stored p... gangapd DB2 6 Thu Oct 27, 2016 10:20 am
No new posts RACF profile access vasanthz All Other Mainframe Topics 11 Fri Sep 23, 2016 5:51 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us