IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Purpose Of REF clause in the below DD Statement


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
hmurali
Warnings : 1

New User


Joined: 08 Mar 2005
Posts: 17

PostPosted: Thu Feb 08, 2007 2:02 pm
Reply with quote

SYSEX200 DD DSN=&HLQ..&DBCOPY..SEX200&LOCAT&GEN,
DISP=(,CATLG),
UNIT=CART,VOL=(,RETAIN,,,REF=*.SYSEX175),
LABEL=(75,SL,EXPDT=99000),
RECFM=FB,LRECL=4096,BLKSIZE=16384,
DCB=SYS3.GDG.MODEL

What does the REF=*.sysex175 mean?

Please let me know also what happens if two dd statement refer back to the same SYSex175 clause.
Back to top
View user's profile Send private message
cpuhawg

Active User


Joined: 14 Jun 2006
Posts: 331
Location: Jacksonville, FL

PostPosted: Thu Feb 08, 2007 6:58 pm
Reply with quote

REF tell the system to obtain volume serial numbers from an earlier DD statement. Your DD statement indicates you are trying to add the 75th dataset to a set of tapes that already has 74 datasets.

If two DD statements refer back to the same SYSEX175 DD statement, it is perfectly normal as long as the two DD statements are not in the same job step. If they were in the same step, there would be a contention issue between the two DD statements both trying to mount the same volume serial numbers.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Thu Feb 08, 2007 9:01 pm
Reply with quote

Hello,

The REF parameter is a "refer-back". It refers back(wards) to a prior dd statement. Do not refer to a dd in a step not yet executed.

In your case it is telling the system to create "this" file(&HLQ..&DBCOPY..SEX200&LOCAT&GEN) on the same volume that the referred-to dd is on (=*.SYSEX175).
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sat Feb 10, 2007 5:05 am
Reply with quote

Just to close the loop, the SYSEX175 DD stmt should contain the RETAIN param to keep the vol mounted until it's used by SYSEX200.

BTW, if the system needs (and can't get) a tape drive, it may dismount the vol anyway and remount it when the drive becomes available again.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts To search DB2 table based on Conditio... DB2 1
No new posts JOIN STATEMENT PERFORMANCE. DFSORT/ICETOOL 12
No new posts Relate COBOL statements to EGL statement All Other Mainframe Topics 0
No new posts process statement for SUPREC, CMPCOLM... TSO/ISPF 4
No new posts SYNCSORT/ICETOOL JOINKEYS SORT Statem... DFSORT/ICETOOL 13
Search our Forums:

Back to Top