Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 2504
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 User access certification In Mainfram... Virendra Shambharkar All Other Mainframe Topics 4 Tue Oct 03, 2017 12:32 pm
No new posts how to see when the last read access ... Mike 1304 DB2 1 Tue Sep 12, 2017 7:52 pm
No new posts WER268A OUTREC STATEMENT : SYNTAX E... frozenblood87 SYNCSORT 12 Sat Aug 26, 2017 9:45 pm
This topic is locked: you cannot edit posts or make replies. Limit access to certain RACF group cvnlynn CLIST & REXX 5 Wed Aug 23, 2017 2:28 am
No new posts NDM syntax checking without actually ... GAPX1 All Other Mainframe Topics 0 Wed Jun 07, 2017 2:36 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us