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

Difference between overriding and symbolic parameters


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
karthi_ind

Active User


Joined: 24 Feb 2004
Posts: 131
Location: Chennai

PostPosted: Tue Jan 12, 2010 11:42 am
Reply with quote

Hi all,

Following are the questions asked in IBM interview

1) difference between overriding and symbolic parameters
Ans - In symbolic the value for the symbolic is supplied when the PROC is invoked, in overriding it replaces the PROC's statement with another one.

2) Types of overriding parameter

3) how to execute only a particular step in a proc, for example there are 4 steps in a proc and I need to only execute step 3 and not step 1, 2 or 4. This I have to do in job itself.
Ans - COND.STEPNAME

4) how to split the input file into 5 output files with equally distributing the records to each files. letz say if the input file has 100 records then each file will have 20 recs.
This we can do by using DFSORT or SYNCSORT. But I want to know the actual code for this.

Can anyone please elaborate answers for each questions and correct me if the answer is wrong.

Thanks
Karthik
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Tue Jan 12, 2010 1:45 pm
Reply with quote

Let's start with - What were your answers?
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Tue Jan 12, 2010 1:51 pm
Reply with quote

Anuj Dhawan wrote:
Let's start with - What were your answers?


As far as i see it, only question 2 was not answered.
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Tue Jan 12, 2010 2:10 pm
Reply with quote

Anuj Dhawan wrote:
Let's start with - What were your answers?

Anuj, I think that you need some new glasses mate 36_2_51.gif
Back to top
View user's profile Send private message
karthi_ind

Active User


Joined: 24 Feb 2004
Posts: 131
Location: Chennai

PostPosted: Tue Jan 12, 2010 2:55 pm
Reply with quote

Hi Guys,

I answered whatever i know. Thanks.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Tue Jan 12, 2010 3:41 pm
Reply with quote

Now as I'm beaten up a bit and new pair of glasses are on their way... icon_smile.gif

1. Symbolic Parameters are used to override the parameters of an EXEC/DD statement. There are 2 types:

a. System Symbols Ex: &SYSUID
b. JCL Symbols (Symbolic Parameter)

Override parameters are used to override or to counteract the force or effectiveness of (or nulllify) DD/EXEC statements on the fly.

2. I'm not pretty sure if there are more feathers to this question, however, you can override an in-stream or cataloged procedure by following types
  • Overriding, nullifying, or adding EXEC statement parameters
  • Overriding, nullifying, or adding parameters to DD or OUTPUT JCL statements
  • Adding DD or OUTPUT JCL statements

3. If step003 is a not a PROC, RESTART=STEP003,COND=(0,LE) on the jobcard.

4. A straight forward answer is, use the below JCL:
Code:
//S1     EXEC PGM=SORT
//SYSOUT   DD SYSOUT=*
//SORTIN   DD DSN=input.file,...
//SORTOF01 DD DSN=output.file1,...
   .
   .
   .
//SORTOF05 DD DSN=output.file05,...
//SYSIN    DD *
  SORT FIELDS=COPY
  OUTFIL FILES=(01,02,03,04,05),SPLIT
/*
but the twisted side of the question is, will the input file always contain an even multiple of 5 (e.g. 100, 200) or can it contain extra records (e.g. 102). If it can contain extra records, how do you want the records split among the 5 files when you have 102 records? Must the extra 2 records go to the fifth file or can they go to the first file or what?
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: Tue Jan 12, 2010 10:35 pm
Reply with quote

Hello,

Questions 3 and 4 have been forum topics multiple times. Suggest you search the forum and if you find something that is unclear, post what you found and your doubt. Someone will be able to clarify.

Also, i'm not sure why question 3 is asked so often (i suppose the interviewers just don't know any better). None of the systems i have ever supported does this. It is rather common to restart from some point and complete a job, but to run only step 3 of 7 just is not needed. . .
Back to top
View user's profile Send private message
karthi_ind

Active User


Joined: 24 Feb 2004
Posts: 131
Location: Chennai

PostPosted: Wed Jan 13, 2010 10:26 am
Reply with quote

Thanks Anuj.
Thanks Dick.

I have few clarifications on your answers

For the 3rd question you have mentioned that we can give
restart=step003,cond(0,le) but step003 is available in proc
so do we need to mention proc also in restart like
restart=proc1.step003,cond(0,le).. am i correct? I also need to
execute only this step alone.

For 4th question if the records are not equal like 102 or 104 then those needs to be written in the last file i.e 5th file. so how can we code this in SORT logic.
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: Wed Jan 13, 2010 8:22 pm
Reply with quote

Hello,

Quote:
so do we need to mention proc also in restart like
restart=proc1.step003,cond(0,le).. am i correct?
If there is only one PROC there is no need to name it in the restart.

Your "new" question 4 is not the same as the original. Actually, this new question does not seem to even be related to the original - one is to "split the file" and the other looks at values within the file. Examples of both have been previously discussed.

If you are unwilling or unable to do some research/work on your own, it will be a very long next several years. . .
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Wed Jan 13, 2010 8:38 pm
Reply with quote

As Dick has suggested, please make use of search button, if it does not work - I'll have some work for McMillian...icon_smile.gif
Back to top
View user's profile Send private message
Ajay Baghel

Active User


Joined: 25 Apr 2007
Posts: 206
Location: Bangalore

PostPosted: Thu Jan 14, 2010 12:09 pm
Reply with quote

Q3 Restart the job from STEP3 and edit cond parameter to COND=(0,LE) in step4.

Alternatively, you can use IEBEDIT to selectivley executes steps in a JCL

Q4
SPLIT --> will move 1st rec to first o/p file, 2nd rec to second file and so on. On reaching last file, next record is moved to first file and so on in cyclic order.
SPLITBY=N-->will move 1st N recs to first o/p file, next N recs in input to second file and so on. On reaching last file, next N recs are moved to first file and so on in cyclic order.

SPLIT1R=N-->will move 1st N recs to first o/p file, next N recs in input to second file and so on. On reaching LAST file, "all the remaining records in input file" are moved to last file. No cyclic order here.
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Fri Jan 15, 2010 6:39 am
Reply with quote

Hi Dick,

Quote:
If there is only one PROC there is no need to name it in the restart.


I don't think the above is correct, as far as I know and my tests reveal, you must code stepname.procstepname for restarting a PROC.


If you are overriding a DDNAME in a single step PROC, you don't need to code stepname.ddname


Gerry
Back to top
View user's profile Send private message
karthi_ind

Active User


Joined: 24 Feb 2004
Posts: 131
Location: Chennai

PostPosted: Fri Jan 15, 2010 11:22 am
Reply with quote

Thanks All.

Ajay - I tried all Split commands and it is working fine. Thanks for that.

Karthik
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: Fri Jan 15, 2010 9:30 pm
Reply with quote

Hi Gerry,

Possibly we are not "on the same page". . .

I didn't have anything handy to run to post as an example but this:
publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/handheld/Connected/BOOKS/iea2b680/20.23.2
and this:
publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/handheld/Connected/BOOKS/iea2b680/20.23.6
do not have procstepname in the restart - just the stepname.

What might i be missing?
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Sat Jan 16, 2010 3:19 pm
Reply with quote

Hi Dick,

this may or may not make more sense icon_lol.gif

www.ibmmainframes.com/post-6914.html

Also here is some output from 2 tests I carried out



Code:
0                                                                               
 20.05.43 JOB00498  IRR010I  USERID XXXXXLC  IS ASSIGNED TO THIS JOB.           
 20.05.43 JOB00498  ICH70001I XXXXXLC  LAST ACCESS AT 20:00:38 ON SATURDAY, JANU
 20.05.43 JOB00498  $HASP373 XXXXXLB1 STARTED - INIT 27   - CLASS P - SYS XXXA 
 20.05.43 JOB00498  IEF403I XXXXXLB1 - STARTED - TIME=20.05.43                 
 20.05.43 JOB00498  -XXXXXLB1 GO       STEP0002    00      7      1    .00    .0
 20.05.43 JOB00498  IEF404I XXXXXLB1 - ENDED - TIME=20.05.43                   
 20.05.43 JOB00498  -XXXXXLB1 ENDED.  NAME-                     TOTAL TCB CPU TI
 20.05.43 JOB00498  $HASP395 XXXXXLB1 ENDED                                     
0------ JES2 JOB STATISTICS ------                                             
-  16 JAN 2010 JOB EXECUTION DATE                                               
-            7 CARDS READ                                                       
-           36 SYSOUT PRINT RECORDS                                             
-            0 SYSOUT PUNCH RECORDS                                             
-            2 SYSOUT SPOOL KBYTES                                             
-         0.00 MINUTES EXECUTION TIME                                           
         1 //XXXXXLB1 JOB GERRY,'',                                             
           //             CLASS=P,                                             
           //             MSGCLASS=X,                                           
           //             REGION=6M,RESTART=GO.STEP0002                         
           //*                                                                 
         2 //JCLLIB   JCLLIB ORDER=(XXXXXLC.JCL.CNTL)                           
         3 //GO       EXEC PROC4                                               
         4 XXA        PROC                                                     
         5 XXSTEP0001 EXEC PGM=IEFBR14                                         
         6 XXSTEP0002 EXEC PGM=IEFBR14                                         
  STMT NO. MESSAGE                                                             
         3 IEFC001I PROCEDURE PROC4 WAS EXPANDED USING PRIVATE LIBRARY XXXXXLC.J
 ICH70001I XXXXXLC  LAST ACCESS AT 20:00:38 ON SATURDAY, JANUARY 16, 2010       
 IEF142I XXXXXLB1 STEP0002 GO - STEP WAS EXECUTED - COND CODE 0000             
 IEF373I STEP/STEP0002/START 2010016.2005                                       
 IEF374I STEP/STEP0002/STOP  2010016.2005 CPU    0MIN 00.00SEC SRB    0MIN 00.00
 IEF375I  JOB/XXXXXLB1/START 2010016.2005                                       
 IEF376I  JOB/XXXXXLB1/STOP  2010016.2005 CPU    0MIN 00.00SEC SRB    0MIN 00.00


Code:
 20.04.45 JOB00493  IRR010I  USERID XXXXXXC  IS ASSIGNED TO THIS JOB.     
 20.04.45 JOB00493  IEF430I RESTART STEP NOT FOUND FOR JOB XXXXXXB1       
 20.04.45 JOB00493  IEF452I XXXXXXB1 - JOB NOT RUN - JCL ERROR           
 20.04.45 JOB00493  $HASP396 XXXXXXB1 TERMINATED                         
0------ JES2 JOB STATISTICS ------                                       
-  16 JAN 2010 JOB EXECUTION DATE                                         
-            7 CARDS READ                                                 
-           27 SYSOUT PRINT RECORDS                                       
-            0 SYSOUT PUNCH RECORDS                                       
-            1 SYSOUT SPOOL KBYTES                                       
-         0.00 MINUTES EXECUTION TIME                                     
         1 //XXXXXXB1 JOB GERRY,'',                                       
           //             CLASS=P,                                       
           //             MSGCLASS=X,                                     
           //             REGION=6M,RESTART=STEP0002                     
           //*                                                           
         2 //JCLLIB   JCLLIB ORDER=(XXXXXXC.JCL.CNTL)                     
        3 //GO       EXEC PROC4                                               
        4 XXA        PROC                                                     
        5 XXSTEP0001 EXEC PGM=IEFBR14                                         
        6 XXSTEP0002 EXEC PGM=IEFBR14                                         
 STMT NO. MESSAGE                                                             
        3 IEFC001I PROCEDURE PROC4 WAS EXPANDED USING PRIVATE LIBRARY XXXXXXC.
        1 IEF661I RESTART STEP NOT FOUND                                     



Gerry
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: Sat Jan 16, 2010 6:34 pm
Reply with quote

Hi Gerry,

The posted jcl error is from a job that appears to use multiple procs - in which case procstepname would be required.

My observation is for jobs that use only one proc. . . Which is about 99% of our production jobs - which are the ones most likely to be restarted. . .
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1702
Location: Australia

PostPosted: Sun Jan 17, 2010 1:41 am
Reply with quote

Hi Dick,

Quote:
The posted jcl error is from a job that appears to use multiple procs -


In the posted JCL, I don't see the use of mutiple PROCS, it's one PROC with 2 steps, each step executing PGM=IEFBR14.

If mutiple PROC's was being used, the output would show mutiple lines of this
Code:
3 IEFC001I PROCEDURE PROC4 WAS EXPANDED USING PRIVATE LIBRARY


Gerry
Back to top
View user's profile Send private message
kumar119119

New User


Joined: 31 May 2010
Posts: 25
Location: Pune

PostPosted: Thu Oct 21, 2010 12:36 pm
Reply with quote

Hi Gerry,

I read the above post,
I understood one thing,
i.e

dick scherrer,said that
If a JOB has single PROC we use RESTART=STEP2,
here STEP2=procstepname,
no need to give RESTART=jobstepname.procstepname,

But,
You provided the spool info. on this & you said

RESTART=jobstepname.procname
is must for single proc/ two or more procs

is my understanding correct or not?
please tell me,

Thanks in advance.
Back to top
View user's profile Send private message
Anuj Dhawan

Superior Member


Joined: 22 Apr 2006
Posts: 6250
Location: Mumbai, India

PostPosted: Thu Oct 21, 2010 8:02 pm
Reply with quote

Just a suggestion - Why not you also do an experiment like Gerry did?
Back to top
View user's profile Send private message
kumar119119

New User


Joined: 31 May 2010
Posts: 25
Location: Pune

PostPosted: Thu Oct 21, 2010 8:11 pm
Reply with quote

Hi Anuj Dhawan,
Good Evening,

Actually I released from the project,
I need to join in a week in another MNC,

So I can't do anything,

So, Please tell me this,

is RESTART=procstepname sufficient instead of RESTART=jobstepname.procstepname ?

Please tell me,
else sorry, I will stop asking

Thank you.
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sat Nov 13, 2010 11:41 pm
Reply with quote

Hi Karthi,

Quote:
2) Types of overriding parameter


He may have been looking for "key word and positional" as an answer.
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 -> Mainframe Interview Questions

 


Similar Topics
Topic Forum Replies
No new posts Passing Parameters to Programs Invoke... PL/I & Assembler 5
No new posts Timestamp difference and its average ... DB2 11
No new posts Difference when accessing dataset in ... JCL & VSAM 7
No new posts Injecting HTTPHEADER parameters in th... PL/I & Assembler 0
No new posts pass data as symbolic parameter from ... CLIST & REXX 2
Search our Forums:

Back to Top