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

the use of AVGREC parameter.


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
mf_user
Currently Banned

New User


Joined: 05 Jan 2006
Posts: 47

PostPosted: Fri Jan 13, 2006 11:54 am
Reply with quote

Hi,

I have created a new OUTPUT dataset in the following way:

//SYSUT1 DD DSN=INPUT.DATASET.IP,
// DISP=(NEW,CATLG,CATLG),
// SPACE=(1048,(10,5),RLSE),
// VOL=(,,,5),
// UNIT=PERMDA,
// AVGREC=K,
// RECFM=FB,
// LRECL=1048,
// BLKSIZE=27248
//*

Due to huge incoming data the job abended with SB37. So, the programmer did the following change and reran the job successfully.

//SYSUT1 DD DSN=INPUT.DATASET.IP,
// DISP=(NEW,CATLG,CATLG),
// SPACE=(1500,(10,5),RLSE),
// VOL=(,,,5),
// UNIT=PERMDA,
// AVGREC=K,
// RECFM=FB,
// LRECL=1048,
// BLKSIZE=27248
//*

After completion of the job, the dataset was created with the LRECL of 1048 only. I would like to know how it could be possible even though the SPACE param was changed to have a AVGREC of 1500. (1048 value was changed to 1500 !!!!)

Your inputs are most welcome to make this understand.

Thanks 4 ur time.
Back to top
View user's profile Send private message
Gautam512

Active User


Joined: 05 Oct 2005
Posts: 308
Location: Vizag / US

PostPosted: Fri Jan 13, 2006 12:30 pm
Reply with quote

HI,

Space parameters are no way related to the LRECL.

SPACE parameter requests space for a new data set on a DASD
volume. You can either request an amount of space and let MVS
locate the space for you, or you can request specific track numbers
on a DASD volume.

The LRECL parameter is used to specify the logical record length for the records in a data set. Its function is equivalent to that of the LRECL= subparameter of the DCB=parameter.
LRECL can be used to override the LRECL information for a data class
if SMS (System Managed Storage) is installed and active.

Thanks,
Gau
Back to top
View user's profile Send private message
gowtham_1982
Warnings : 1

Active User


Joined: 02 Dec 2005
Posts: 109

PostPosted: Fri Jan 13, 2006 3:33 pm
Reply with quote

Gautam512 wrote:
HI,

Space parameters are no way related to the LRECL.

SPACE parameter requests space for a new data set on a DASD
volume. You can either request an amount of space and let MVS
locate the space for you, or you can request specific track numbers
on a DASD volume.

The LRECL parameter is used to specify the logical record length for the records in a data set. Its function is equivalent to that of the LRECL= subparameter of the DCB=parameter.
LRECL can be used to override the LRECL information for a data class
if SMS (System Managed Storage) is installed and active.

Thanks,
Gau


hai mf_user,

what Gau said is right.

corrections welcomed...

gowtham
Back to top
View user's profile Send private message
mf_user
Currently Banned

New User


Joined: 05 Jan 2006
Posts: 47

PostPosted: Fri Jan 13, 2006 6:57 pm
Reply with quote

So, instead of giving the

SPACE=(LRECL,(M,N),RLSE),
AVGREC=K,
LRECL=250

I can also give as mentioned here

SPACE=(TRKS,(M,N),RLSE),
AVGREC=K,
LRECL=250

Please enlighten me.
Back to top
View user's profile Send private message
Gautam512

Active User


Joined: 05 Oct 2005
Posts: 308
Location: Vizag / US

PostPosted: Fri Jan 13, 2006 8:08 pm
Reply with quote

Hi mf_user,

Go thru the attachemetn ,u'll have gud idea of space parameter.....

Thanks,
Gau
Back to top
View user's profile Send private message
mf_user
Currently Banned

New User


Joined: 05 Jan 2006
Posts: 47

PostPosted: Sat Jan 14, 2006 4:02 pm
Reply with quote

Thanks for the doco.
Back to top
View user's profile Send private message
Gautam512

Active User


Joined: 05 Oct 2005
Posts: 308
Location: Vizag / US

PostPosted: Tue Jan 17, 2006 6:24 pm
Reply with quote

Ur most welcome .........

Thanks,
Gau
Back to top
View user's profile Send private message
priya

Moderator


Joined: 24 Jul 2003
Posts: 568
Location: Bangalore

PostPosted: Sat Feb 16, 2008 3:25 am
Reply with quote

Quote:
So, instead of giving the

SPACE=(LRECL,(M,N),RLSE),
AVGREC=K,
LRECL=250

I can also give as mentioned here

SPACE=(TRKS,(M,N),RLSE),
AVGREC=K,
LRECL=250

Please enlighten me.


No, You can't. AVGREC parameter cannot be specified when TRK/CYL is used in the SPACE Parameter. (And its TRK, not TRKS)
Back to top
View user's profile Send private message
leo_sangha

New User


Joined: 11 Aug 2005
Posts: 85
Location: England

PostPosted: Wed Apr 02, 2008 7:44 pm
Reply with quote

Quote:
No, You can't. AVGREC parameter cannot be specified when TRK/CYL is used in the SPACE Parameter. (And its TRK, not TRKS)


Hi Priya,

I also read it in the Manual that AVGREC parameter should not be coded with TRK/CYL parameters. BUT STILL

I am just curious to know what will happen if i give space parameters as shown below:

LRECL=800,
SPACE=(CYL,(3000,1000),RLSE),AVGREC=K

Can you please clarify if what i am thinking is correct:

For the above space allocation:

The MVS will try to allocate 3000 X 1024 cylinders every time.

OR
It will ignore the CYL part and will try to allocate
800 X 1024 bytes of Primary Quantity.

Please share your views on this.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed Apr 02, 2008 7:47 pm
Reply with quote

Well, however you decide to allocate your DASD space, the operating system always converts in into either tracks or cylinders, which are the only two values accepable by the DASD subsystems.

It's not difficult to work out space requirements, so why not just stick to TRK & CYL
Back to top
View user's profile Send private message
leo_sangha

New User


Joined: 11 Aug 2005
Posts: 85
Location: England

PostPosted: Wed Apr 02, 2008 11:37 pm
Reply with quote

Thanks for the prompt reply.

But still i would like to know what will happen if i code the space parameters like :

I know that if i code:
LRECL=100,
SPACE=(100,(50,10),RLSE),AVGREC=K

MVS will allocate space equivalent to (50 X 1024 records) of LRECL 100.

what will happen if i code

LRECL=100,
SPACE=(CYL,(50,10),RLSE),AVGREC=K

how will MVS allocate space ? Thanks !
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Wed Apr 02, 2008 11:47 pm
Reply with quote

The manual is clear icon_cool.gif

Quote:
12.5 AVGREC Parameter
Parameter Type Keyword, optional -- use this parameter only with SMS
Purpose Use the AVGREC parameter when you define a new data set to specify that:
* The units of allocation requested for storage space are records.
* The primary and secondary space quantity specified on the SPACE parameter represents units, thousands, or millions of records.
When you use AVGREC with the SPACE parameter, the first subparameter (reclgth) on the SPACE parameter must specify the average record length of the records.
Code the AVGREC parameter when you want to (1) specify records as the units of allocation or (2) override the space allocation defined in the data class for the data set.
If SMS is not installed or is not active, the system checks the syntax and then otherwise ignores the AVGREC parameter.
Back to top
View user's profile Send private message
leo_sangha

New User


Joined: 11 Aug 2005
Posts: 85
Location: England

PostPosted: Thu Apr 03, 2008 6:56 pm
Reply with quote

Thanks Enrico, it was really helpful.

I am left to assume in production either SMS is not installed or NOT active, otherwise the job should have abended(Reason - Syntax Error), for coding space parameters as below :

SPACE=(CYL,(50,10),RLSE),AVGREC=K

And the AVGREC parameter is getting ignored all the times.

Am i on the right track now icon_question.gif
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Thu Apr 03, 2008 7:02 pm
Reply with quote

almost icon_smile.gif

as the docs says avgrec is ignored when the allocation unit does not represent a record length ( not numeric )
Back to top
View user's profile Send private message
vamskrish
Warnings : 1

New User


Joined: 31 Jan 2007
Posts: 27
Location: virginia

PostPosted: Tue Apr 29, 2008 6:23 am
Reply with quote

AVGREC=U - means 100's of records
AVGREC=K - means 1000's of records
AVGREC=M - means millions of records

when u use AVGREC parameter, u dont use CYL OR TRKS in ur space parm. instead u use the record length of the file.

for ex:

SPACE=(100,(10,5),RLSE),AVGREC=K means that ur output file can handle
primary space for 10 * 1000 = 10,000 records each of length 100. this is the best practice to avoid using CYL and TRKS.

similarly
SPACE=(100,(10,5),RLSE),AVGREC=M, means ur output file can handle 10 million records.

if u know approx., how many records ur output file will have then u can use AVGREC. if there are million records and if u have mentioned
AVGREC = K, then u will get space abend.
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 Using the Jobname parameter in a Qual... ABENDS & Debugging 1
No new posts Demand with DEADLINE TIME parameter CA Products 4
No new posts Option DYNALLOC second parameter. DFSORT/ICETOOL 11
No new posts Writing the output file name from a p... JCL & VSAM 7
No new posts Reference for COND parameter. JCL & VSAM 1
Search our Forums:

Back to Top