Giving access on a dataset for other user
Posted: Thu May 10, 2012 8:05 pm
Hi,
I(TEST123) want to access a particular dataset of T12345 with READ access at beginning of my program execution and after finishing everything i want the READ access to be revoked on the dataset which i acquired READ permissions in begining.
for this i wrote two JCL for getting READ access and REVOKING access
for revoking the access i'm writing
My whole idea is to get READ access on T12345.OP.PS and revoking that READ access at the end. Both has to be successful with MAXCC = 0.
Is the way what i wrote is correct ??
I(TEST123) want to access a particular dataset of T12345 with READ access at beginning of my program execution and after finishing everything i want the READ access to be revoked on the dataset which i acquired READ permissions in begining.
for this i wrote two JCL for getting READ access and REVOKING access
//DATSETPR EXEC PGM=IKJEFT01,DYNAMNBR=20,REGION=512K
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
ADDSD 'T12345.OP.PS' UACC(NONE)
PE 'T12345.OP.PS' ID(TEST123) ACCESS(NONE)
//
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
ADDSD 'T12345.OP.PS' UACC(NONE)
PE 'T12345.OP.PS' ID(TEST123) ACCESS(NONE)
//
for revoking the access i'm writing
//DATSETPR EXEC PGM=IKJEFT01,DYNAMNBR=20,REGION=512K
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
DELDSD 'T12345.OP.PS'
//
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
DELDSD 'T12345.OP.PS'
//
My whole idea is to get READ access on T12345.OP.PS and revoking that READ access at the end. Both has to be successful with MAXCC = 0.
Is the way what i wrote is correct ??