What is the difference between the Refer-back & Overriding parameters?

All sort of Mainframes Interview Questions.
Post Reply
Sushant S
Registered Member
Posts: 20
Joined: Fri Aug 16, 2013 2:44 pm

What is the difference between the Refer-back & Overriding parameters?

Post by Sushant S »

Hi,


This was the question which goes like this, what is the difference between the refer-back & overriding parameters? Are not they serving the same purpose? How are they coded in a JCL?

I have answered it like... when we use refer-back, we actually refer back to an earlier DD statement in the job or in cataloged or in in-stream procedure called by a job step.


Code: Select all

//MYJOB JOB ..
//STEP1 EXEC ..
//DD1 DD DSN=REPORT ...
.
.
//DD4 DD DSN=*.DD1


For Over riding, for a JCL in in-stream or Cataloged procedures, the DD names mentioned in the JCL will override the
ones in the procedures.

But I was not able to answer of they behave just the same, do they? Please help.
nicc
Global Moderator
Global Moderator
Posts: 691
Joined: Wed Apr 23, 2014 8:45 pm

Re: What is the difference between the Refer-back & Overriding parameters?

Post by nicc »

I don't know why you asked! Your answer was correct and that demonstrates that they are not the same.
Regards
Nic
Sushant S
Registered Member
Posts: 20
Joined: Fri Aug 16, 2013 2:44 pm

Re: What is the difference between the Refer-back & Overriding parameters?

Post by Sushant S »

Becasue I felt that I was not able to answer of they behave just the same, do they? How would I answer it better as I found interviewer was not satisfied with the answer.
nicc
Global Moderator
Global Moderator
Posts: 691
Joined: Wed Apr 23, 2014 8:45 pm

Re: What is the difference between the Refer-back & Overriding parameters?

Post by nicc »

Take an example:
If this is your catalogued procedure:

Code: Select all

//COPY PROC IN=,
//          OUT=
//*
//S010    EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSUT1   DD DSN=&IN,DISP=SHR
//SYSUT2   DD DSN=&OUT,DCB=*.SYSUT1,
//            SPACE=(TRK,(15,15),RLSE)
//            DISP=(,CATLG,DELETE)
//SYSIN    DD DUMMY
You would normally run it like this (perhaps)

Code: Select all

//NICC JOB (),....
//A EXEC MYPROC,
//  IN=input.dataset.name,
//  OUT=output.dataset.name
But then you want to maximise the space utilisation and the input dataset is LRECL=80, BLKSIZE=800 (really inefficient) so you need an override:

Code: Select all

//NICC JOB (),....
//A EXEC MYPROC,
//  IN=input.dataset.name,
//  OUT=output.dataset.name
//S010.SYSUT2 DD DCB=BLKSIZE=0
However, now-a-days, we have the ISPF so using a refer-back is, more or less, simply laziness on the part of the coder.
Regards
Nic
Sushant S
Registered Member
Posts: 20
Joined: Fri Aug 16, 2013 2:44 pm

Re: What is the difference between the Refer-back & Overriding parameters?

Post by Sushant S »

nicc wrote: However, now-a-days, we have the ISPF so using a refer-back is, more or less, simply laziness on the part of the coder.
Thanks for the example. How does ISPF changes that? Sorry but I did not get it. Can you please explain again?
nicc
Global Moderator
Global Moderator
Posts: 691
Joined: Wed Apr 23, 2014 8:45 pm

Re: What is the difference between the Refer-back & Overriding parameters?

Post by nicc »

Because in the old days you had to code it all by hand and then punch it onto punch cards so using a refer-back saved effort. With ISPF and online submission you have a good editor that you can use to copy lines and edit as required with next to no effort so such short-cuts are no longer required except by the very lazy.
Regards
Nic
Sushant S
Registered Member
Posts: 20
Joined: Fri Aug 16, 2013 2:44 pm

Re: What is the difference between the Refer-back & Overriding parameters?

Post by Sushant S »

nicc wrote:Because in the old days you had to code it all by hand and then punch it onto punch cards so using a refer-back saved effort. With ISPF and online submission you have a good editor that you can use to copy lines and edit as required with next to no effort so such short-cuts are no longer required except by the very lazy.
Thanks nicc.
Post Reply

Create an account or sign in to join the discussion

You need to be a member in order to post a reply

Create an account

Not a member? register to join our community
Members can start their own topics & subscribe to topics
It’s free and only takes a minute

Register

Sign in

Return to “Interview Questions.”