jcl interview questions

JCL interview questions

JCL interview questions

what is S322 abend how you will resolve??

Basically s322 is timeout abend this means that the job has taken probably long time to execute. i.e ., more than alloted CPU time. CPU time is the time which has allocated to job so that it should not use more than allocated time. If the job uses more than the allocated time then it will leads to S322 abend

so to overcome this abend we can specify Time=1440 parameter on Jobcard or if it for specific job step then we can specify Time parameter on Exec statement

eg: Time parameter At Job level

//MYJOB JOB (ACCinfo),programer_name,CLASS=A,MSGLEVEL=(1,1),TIME=1400

eg: Time parameter at step level

//MYJOB JOB (ACCinfo),programer_name,CLASS=A,MSGLEVEL=(1,1)

//STEP1 EXEC PGM=PROG1

//.............................................

//STEP2 EXEC PGM=PROG2,TIME=1400

//..........

//

How can you bypass the step in JCL with out using condition parameter??

By using the conditional statements we can by pass the steps from execution..see the following code

//MYJOB JOB .............

//STEP1 EXEC PGM=PROG1

//DDNAME1 DD DSN=EXMAPLES.HUBPAGES.IFCOND,DISP=SHR

// IF RC=0 THEN

//STEP2 EXEC PGM=PROG2

//DDNAME1 DD DSN=EXMAPLES.HUBPAGES.IFCOND1,DISP=SHR

// ELSE

//STEP3 EXEC PGM=PROG3

//DDNAME1 DD DSN=EXMAPLES.HUBPAGES.IFCOND2,DISP=SHR

// ENDIF

//

in the above code there are three steps..when the job has been submitted first step will trigger and if the return code from the first step is 0(ZERO) that means if the first step completed successfully then STEP2 will be triggered other wise(ELSE) STEP3 will be triggered.

What is the use of time parameter ? where we code it in JCL?

the TIME parameter in JCL tells the maximum alloted CPU time for a particular job or job step. once this time is reached the job will get abend. We can code TIME parameter at JOB level and at a STEP level following are the syntaxes.

Time parameter at job level

//MYJOB JOB (hub,page,accnt),CLASS=A,MSGCLASS=G,TIME=400

//STEP1 EXEC PGM=PROG1

//STEP2 EXEC PGM=PROG2

in the above case the time allocated for the entire job is 400. That means all the steps should complete by 400 minutes. if this time is exceeded the job will get abend

Time parameter at step level

//MYJOB JOB (hub,page,accnt),CLASS=A,MSGCLASS=G

//STEP1 EXEC PGM=PROG1,TIME=200

//STEP2 EXEC PGM=PROG2,TIME=100

in the above case the time allocated for the job step STEP1 is 200 minutes. and for STEP1 is 100 minutes. once this time is reached job will get abend.

In How many ways we can pass the data to the COBOL program from JCL

We can pass the data in three ways.

  • By PARM paramter
  • By SYSIN
  • By data sets

Can I have a different record length members in a single PDS

No we can't have a different record length members in a single PDS. at the time creating the PDS we will mention record length and all the members should be of that same record length.

Check your knowledge

More by this Author


Comments

No comments yet.

    Sign in or sign up and post using a HubPages Network account.

    0 of 8192 characters used
    Post Comment

    No HTML is allowed in comments, but URLs will be hyperlinked. Comments are not for promoting your articles or other sites.


    Click to Rate This Article
    working