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
 

 

Purpose Of REF clause in the below DD Statement

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Purpose Of REF clause in the below DD Statement
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    Post subject: Re: Purpose Of REF clause in the below DD Statement
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

Site Director


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

PostPosted: Thu Feb 08, 2007 9:01 pm    Post subject:
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    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts ROUNDED Problem with COMPUTE statement shalem COBOL Programming 11 Thu Feb 09, 2017 8:16 pm
No new posts VALIDATE NULL VALUE IN DB2 CASE STATE... useit DB2 5 Thu Feb 09, 2017 4:34 pm
No new posts -913/-911 Deadlock during UPDATE stat... NoSleep319 DB2 5 Fri Nov 18, 2016 12:37 am
No new posts COBOL DB2 - CALL statement - high CPU... TS70363 DB2 15 Sun Sep 11, 2016 6:07 am
No new posts Converting NULL column into NOT NULL ... Raghu navaikulam DB2 5 Sat Aug 06, 2016 3:45 pm


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