tag:blogger.com,1999:blog-37301099567973342162017-02-07T20:54:59.184-08:00J C L ⌂ G U R U K U L®Perfectionistnoreply@blogger.comBlogger12125tag:blogger.com,1999:blog-3730109956797334216.post-72899194475650085192011-11-01T14:59:00.000-07:002011-02-23T22:51:22.588-08:00WELCOME ALL TO JCLGURUKUL!!!<em><blockquote>This Blog has been dedicated for IBM MAINFRAME JCL users.</blockquote></em><br /><br />The acronym JCL stands for JOB CONTROL LANGUAGE.<br /><br />Over the years,it has been came to our notice that there is no clear,detail and thorough knowledge about jcl present over the internet.<br /><br />Especially for the one ,who are new to this grate mainframe system.<br /><br />Mainframe is like big ocean, the deeper you go only to come to know that it is much much more deeper. Well i am not scaring you...but the fact.<br /><br />Mainframe have mainly the subsystems called as JCL,COBOL,DB2,VSAM,CICS etc.<br /><br />Out of all JCL looks to be quight different,never seen before kind of structure for any language,appears somewhat greekish but carries most power among it's siblings subsystem but sadly given very less important,,,why??? Most of the people work on it use the jcl's which some one has created but if they stuck somewhere there is no way out without the expert....<br /><br />Here is complete package to this solution with approch never before. Actually if you understand this you will come to know that you can go much more heights apart from it's basic functinality....<br /><br />Well what to say about the subsystem (read as jcl)without which you can not run a single program on IBM MAINFRAM,,,YES IT IS A FACT,,,,<br /><br />so read on................<br /><br /><br /><br />The acronym JCL stands for JOB CONTROL LANGUAGE.Ok so what do you mean by JOB CONTROL LANGAUGE??<br />Let's take those three word JOB , CONTROL and LANGUAGE<br /><br />Jcl is the lanuage which controls the execution of JOb. Fair enough but what is job???<br /><br />JOB:<br /><br />Every job consist of mainly three statement<br /><br />1.JOb Statement<br />2.Exec(Execution) statement<br />3.DD(Data Defination) Statement<br /><br />For every job there is one and only one job statement but same is not true about Exec and DD statemetthat means we can have different number of exec and DD statement for single job.<br /><br /><br />Job statement:<br /><br />To understand what is Job statemet YOU must have two questions in your mind.<br /><br />1> What it contais??<br />2> What's the use of it?? other way around what if we do not use it??<br /><br /><br />1> what it contains:<br /><br />Job statement consist of mainly two parameters<br /><br />a> Keyword parameter<br />b> Positional parameter<br /><br />Keyword parameter: This is the parameter which can be recognized by it's keyword. Ex: Time(5,20),Msglevel(1,1)<br /><br />Positional parameter: The name itself suffies that, it is the parameter which can be recognized by it's position in the statement<br /><br />Example of job statement:<br /><br />//BARJ4400 JOB 'CRIS63M0' TIME=(1,45),MSGCLASS=S,MSGLEVEL=(1,1),SCHENV=DB2DBJM<br /><br /><br />read on further under tutorial part,,,Perfectionistnoreply@blogger.comtag:blogger.com,1999:blog-3730109956797334216.post-35299366637791067432010-01-26T20:33:00.000-08:002010-01-26T20:57:10.065-08:00How the DB2 application program works on Mainframe continued...The pre-compilation timestamp token placed by DB2 pre-compiler on the Modified source code can be found in variable SQL-TIMESTAMP-1 SQL-TIMESTAMP-2 in Listing.<br /><br /><br /><br />COBOL Compiler (IGYCRCTL): <br /><br />The modified source code out of the DB2 pre-compiler will now fed to the COBOL compiler. The compiler will check the code for syntax error and creates the OBJLIB (Object Library)<br /><br />Link-Edit (IEWL) : <br /><br />IEWL is the program which link-edit the OBJLIB created in previous step by Cobol compiler to create a LOAD MODULE (The corresponding machine level code of our main DB2 Application program)<br /><br /><br />BIND : <br /><br />The second part created out of DB2 Pre-compiler (DBRMLIB) will now get processed.<br />The Bind is type of compiler to the SQL statement (DB2 statement).It will read the DB2 <br />Statement from the DBRMLIB and check it for syntax error and create a mechanism to<br />to execute the SQL statement.<br /><br />There are two types of BIND, BIND PLAN and BIND PACKAGE.<br /><br /><br />BIND PLAN: <br /><br /> This will have the one or more DBRM, Packages or the combination of DBRM and Package as an input. The BIND PLAN command will invoke the DB2 Optimizer which intern will create the PLAN containing optimized access path to execute the SQL statement inside DBRM.<br /><br /><br />BIND PACKAGE: <br />This will have only single DBRM as an input. The Package created here is not executable and need to be bind to plan again in order to get executedPerfectionistnoreply@blogger.comtag:blogger.com,1999:blog-3730109956797334216.post-53432407380930229782004-07-11T00:52:00.000-07:002010-05-22T02:59:08.581-07:00INTERVIEW QUESTIONS - MEDIUM1> How to by pass the step without cond parameter??<br /><br />Ans: By using the IF and END IF <br /><br />IF (rc<0)<br /><br />----------<br /><br />Endif<br /><br />2> What are the difference between in-stream procedure and inline procedure in jcl ??<br /><br />Ans: An in-stream PROC is defined right in the jcl stream and doesn't reside in the proclib. This is an older technique associated with punched cards but it is still in use with setup and installation programs from vendors.<br /><br />For the in-line perform instead of:<br /><br />perform add-paragraph until switch = 'y'<br /><br />you can code<br /><br />perform until switch = 'y'<br /><br />body of code<br /><br />end-perform<br /><br />body of code is the code from add-paragraph appearing in-line (ie right in the perform) instead of in a separate paragraph (out of line code) <br /><br />3> How do you override a specific DDNAME in PROC from JCL???<br /><br />Ans: //stepname.dd dsn=...<br /><br />4> How to check syntax of JCL without running it??<br /><br />Ans: TYPERUN = SCAN on the JOB card.<br /><br />5> can you code instrean data in PROC????<br /><br />Ans: NO<br /><br />6> How to change default PROCLIB??<br /><br />Ans: //ABC JCLLIB ORDER=(XY.MYPROCLIB,SYS1.PROCLIB)<br /><br />7> What is COND=ONLY??<br /><br />Ans: Execute the stepl only if the previous step terminated abnormally.<br /><br />8> How do you restart a PROC from perticular step??<br /><br />Ans: In the Job card ,specify RESTART = procstep.stepname<br /><br /> where procstep = Name of the jcl step that invoke proc.<br /> stepname = Name of the procstep where you want execution to start.<br /><br />9> What is the improvement to COND= in the latest version of MVS?<br /><br />Ans: If you use 'IF and END IF', step will get executed when IF is satisfied. In case of COND parameter, step is bypassed when <br /><br />The COND parameter in the Version of MVS is used as condition parameter and if the given condition is true means that step will be bypassed. <br /><br />10> What is a GDG? How is it referenced? How is it defined? What is a MODELDSCB? GDG stands for generation data group. It is a dataset with versions that can be referenced absolutely or relatively. It is defined by an IDCAMS define generation datagroup execution.<br /><br />Ans: It is defined using an IDCAMS command DEFINE GENERATIONDATAGROUP or DEF GDG for short. Not many parameters, just a maxgeneration as I recall.<br /><br />If you create a GDG called MY.GDG, this first instance will be cataloged as MY.GDG.G00001V00 and onwards. Each time you reference one you can do so by absolute reference, as above, or relative. MY.GDG(0) which is the most recent generation. MY.GDG(-1) is the next oldest, and so on.<br /><br />To create a new GDG generation, you code in your JCL. DSN=MY.GDG(+1), DISP=(NEW,CATLG) etc as normal. Whatever you created as a max generations, the last one gets dropped off (uncataloged and deleted) assuming you have that many generations. <br /><br />They are useful for backups and the like. If you run a particular batch job on a daily basis, then its often the case that you have a 5 generation (or 7?!) GDG to capture your output or parameters etc. You then have a week to print them or reference them. <br /><br />11> Can we call one proc from another??? if yes,what is the maximum limit??<br /><br />Yes we can.Maximum limit is 15.<br /><br /><br /><br /><br /><br />Go back to <a href="http://jclgurukul.blogspot.com/2009/07/interview-questions.html">INTERVIEW QUESTIONS</a>!Perfectionistnoreply@blogger.comtag:blogger.com,1999:blog-3730109956797334216.post-45732675656397636832004-07-06T13:45:00.000-07:002009-07-06T14:04:47.117-07:00COMPILE JCL//***************************************************************<br />//* THIS SKELETON IS USED TO COMPILE COBOL SOURCE * <br />//***************************************************************<br />//CEOCOCOM JOB (CRIS01M0),<br />// MSGCLASS=T,<br />// PRTY=13,<br />// REGION=4096K,<br />// NOTIFY=&sysuid<br />//****************************************************************<br />//* RESOLVE COPY STATEMENTS FROM THE SYSLIB DD LIBRARIES<br />//****************************************************************<br />//*<br />//RESOLVE EXEC PGM=ADPACOPY,PARM=('C**AYY5,,,,,,')<br />//STEPLIB DD DSN=TPD1.TELON.LOAD,DISP=SHR<br />//PRINT DD DUMMY<br />//*<br />//******* WRITE HERE THE NAME OF THE PROGRAM TO BE COMPILE ********<br />//SYSIN DD DSN=MNT7.NGANDHI.COBRA(EOCOCOMP),DISP=SHR <br />//*****************************************************************<br />//*<br />//******* THE NAME OF DATASET CONTAIN THE COPYBOOK USED IN PROGARM*<br />//SYSLIB DD DSN=MNT7.NGANDHI.COPY,DISP=SHR<br />//*****************************************************************<br />// DD DSN=CBO7.EMER.COPY,DISP=SHR<br />// DD DSN=CBO7.EMER.SQL,DISP=SHR<br />// DD DSN=CBO1.PROD.EMER.COPY,DISP=SHR<br />// DD DSN=CBO1.PROD.EMER.SQL,DISP=SHR<br />// DD DSN=CBO1.PROD.PROD.COPY,DISP=SHR<br />// DD DSN=CBO1.PROD.PROD.SQL,DISP=SHR<br />// DD DSN=TPD1.RVB.COPY,DISP=SHR<br />// DD DSN=SYS1.MACLIB,DISP=SHR<br />// DD DSN=SYS1.MODGEN,DISP=SHR<br />// DD DSN=ENV1.COPYLIB,DISP=SHR<br />// DD DSN=SYS1.SCEESAMP,DISP=SHR<br />//SYSOUT DD DSN=&&PROGRAM(EOCOCOMP),<br />// DISP=(NEW,PASS),<br />// MGMTCLAS=WORK,SPACE=(TRK,(15,5,3)),<br />// RECFM=FB,LRECL=80,BLKSIZE=6160,DSORG=PO<br />//SYSPRINT DD SYSOUT=*<br />//*<br />//******************************************************************<br />//* DB2 PRE COMPILE COBOL2 PROGRAM<br />//******************************************************************<br />//*<br />//DB2PC EXEC PGM=DSNHPC,<br />// PARM=('SOURCE','HOST(IBMCOB)','APOST,SOURCE')<br />//STEPLIB DD DSN=DBS1.#JB.COMP.LOAD,DISP=SHR<br />//DBRMLIB DD DSN=&&DBRMTEMP(EOCOCOMP),<br />// DISP=(NEW,PASS),<br />// SPACE=(TRK,(15,5,3)),MGMTCLAS=WORK,<br />// RECFM=FB,LRECL=80,BLKSIZE=6160,DSORG=PO<br />//SYSCIN DD DSN=&&DB2OUT(EOCOCOMP),<br />// DISP=(NEW,PASS),<br />// SPACE=(TRK,(15,5,3)),MGMTCLAS=WORK,<br />// RECFM=FB,LRECL=80,BLKSIZE=6160,DSORG=PO<br />//SYSIN DD DSN=&&PROGRAM(EOCOCOMP),DISP=SHR<br />//SYSLIB DD DSN=MNT7.NGANDHI.COPY,DISP=SHR <br />//* Name of dataset where copy book present<br />// DD DSN=CBO7.EMER.COPY,DISP=SHR<br />// DD DSN=CBO7.EMER.SQL,DISP=SHR<br />// DD DSN=CBO1.PROD.EMER.COPY,DISP=SHR<br />// DD DSN=CBO1.PROD.EMER.SQL,DISP=SHR<br />// DD DSN=CBO1.PROD.PROD.COPY,DISP=SHR<br />// DD DSN=CBO1.PROD.PROD.SQL,DISP=SHR<br />// DD DSN=TPD1.RVB.COPY,DISP=SHR<br />// DD DSN=SYS1.MACLIB,DISP=SHR<br />// DD DSN=SYS1.MODGEN,DISP=SHR<br />// DD DSN=ENV1.COPYLIB,DISP=SHR<br />// DD DSN=SYS1.SCEESAMP,DISP=SHR<br />//SYSUT1 DD SPACE=(800,(500,500),,,ROUND),MGMTCLAS=WORK<br />//SYSUT2 DD SPACE=(800,(500,500),,,ROUND),MGMTCLAS=WORK<br />//SYSPRINT DD DSN=&&PCPRLIST,<br />// DISP=(NEW,PASS),MGMTCLAS=WORK,<br />// SPACE=(TRK,(19,19)),<br />// RECFM=FB,LRECL=133,BLKSIZE=1330,DSORG=PS<br />//SYSTERM DD DUMMY<br />//SYSUDUMP DD DUMMY<br />//*<br />//**************************************************************<br />//* GENER THE DB2 PRECOMPILE OUTPUT<br />//**************************************************************<br />//*<br />//PCPRINTB EXEC PGM=IEBGENER<br />//SYSIN DD DUMMY<br />//SYSPRINT DD DUMMY<br />//SYSUT1 DD DSN=&&PCPRLIST,DISP=SHR<br />//SYSUT2 DD SYSOUT=*<br />//*<br />//**************************************************************<br />//* COBOL -<br />//* - OS390/NEW<br />//* - COMPILE (DEFAULT COMPILE PARAMETER)<br />//**************************************************************<br />//*<br />//CMPILE EXEC PGM=IGYCRCTL,<br />// PARM='LANG(UE),XREF'<br />//STEPLIB DD DSN=ENV1.COBMVS.SIGYCOMP,DISP=SHR<br />//*TEPLIB DD DSN=OSD7.COBOL.V3R4.SIGYCOMP,DISP=SHR<br />//SYSIN DD DSN=&&DB2OUT(EOCOCOMP),DISP=OLD<br />//* Name of dataset where copy book present<br />//SYSLIB DD DSN=MNT7.NGANDHI.COPY,DISP=SHR <br />// DD DSN=CBO7.EMER.COPY,DISP=SHR<br />// DD DSN=CBO7.EMER.SQL,DISP=SHR<br />// DD DSN=CBO1.PROD.EMER.COPY,DISP=SHR<br />// DD DSN=CBO1.PROD.EMER.SQL,DISP=SHR<br />// DD DSN=CBO1.PROD.PROD.COPY,DISP=SHR<br />// DD DSN=CBO1.PROD.PROD.SQL,DISP=SHR<br />// DD DSN=TPD1.RVB.COPY,DISP=SHR<br />// DD DSN=SYS1.MACLIB,DISP=SHR<br />// DD DSN=SYS1.MODGEN,DISP=SHR<br />// DD DSN=ENV1.COPYLIB,DISP=SHR<br />// DD DSN=SYS1.SCEESAMP,DISP=SHR<br />//SYSUT1 DD UNIT=WORK,SPACE=(TRK,(50,25))<br />//SYSUT2 DD UNIT=WORK,SPACE=(TRK,(50,25))<br />//SYSUT3 DD UNIT=WORK,SPACE=(TRK,(50,25))<br />//SYSUT4 DD UNIT=WORK,SPACE=(TRK,(50,25))<br />//SYSUT5 DD UNIT=WORK,SPACE=(TRK,(50,25))<br />//SYSUT6 DD UNIT=WORK,SPACE=(TRK,(50,25))<br />//SYSUT7 DD UNIT=WORK,SPACE=(TRK,(50,25))<br />//SYSUT8 DD UNIT=WORK,SPACE=(TRK,(50,25))<br />//* Name of OBJLIB created by the compiler output.<br />//SYSLIN DD DSN=NGANDHI.OBJLIB(EOCOCOMP),DISP=SHR<br />//*YSPRINT DD SYSOUT=*<br />//* Name of dataest which contains the listing of program<br />//SYSPRINT DD DSN=CBO7.PROD.LISTING(EOCOCOMP),DISP=SHR<br />//***********************************************************<br />//* GENER COMPILE OUTPUT<br />//***********************************************************<br />//*<br />//COMPLIST EXEC PGM=IEBGENER<br />//SYSIN DD DUMMY<br />//SYSPRINT DD DUMMY<br />//SYSUT1 DD DSN=CBO7.PROD.LISTING(EOCOCOMP),DISP=SHR <br />//* Name of dataest which contains the listing of program<br />//SYSUT2 DD SYSOUT=*<br />//*<br />//*SKELETON******************* NDVSCOPY **********************<br />//* COPY THE NEW DBRM USING IEBCOPY<br />//************************************************************<br />//*<br />//DBRMCOPY EXEC PGM=IEBCOPY<br />//IN DD DSN=&&DBRMTEMP,DISP=(OLD,PASS)<br />//OUT DD DSN=MNT7.NGANDHI.DBRMLIB,DISP=SHR <br />//* Name of DBRM dataset , Only if you are acessing db2 table<br />//SYSIN DD *<br /> COPY INDD=IN,OUTDD=OUT<br /> SELECT MEMBER=((EOCOCOMP,,R))<br />/*<br />//SYSPRINT DD SYSOUT=*<br />//SYSUT1 DD UNIT=WORK,SPACE=(CYL,(5,10))<br />//SYSUT2 DD UNIT=WORK,SPACE=(CYL,(5,10))<br />//SYSUT3 DD UNIT=WORK,SPACE=(CYL,(5,10))<br />//SYSUT4 DD UNIT=WORK,SPACE=(CYL,(5,10))<br />//*SKELETON******************* NDVSCHLB *************************<br />//* CHECK TO SEE IF THE DBRM EXIST, IS EMPTY, OR CONTAINS A DATA<br />//***************************************************************<br />//CHPDSMEM EXEC PGM=IKJEFT01<br />//SYSEXEC DD DSN=TSB1.ENDEVOR.CLIST,DISP=SHR<br />//*<br />//SYSTSPRT DD SYSOUT=*<br />//*<br />//SYSTSIN DD *<br /> %CHPDSMEM MNT7.NGANDHI.DBRMLIB(EOCOCOMP)<br />/*<br />//SYSOUT DD SYSOUT=*<br />//SYSIN DD DUMMY<br />//*<br />//**************************************************************<br />//* DELETE THE DBRM IF IT IS EMPTY<br />//**************************************************************<br />//DELTDBRM EXEC PGM=IDCAMS,COND=(14,NE,CHPDSMEM)<br />//SYSPRINT DD SYSOUT=*<br />//SYSIN DD *<br /> DELETE MNT7.NGANDHI.DBRMLIB(EOCOCOMP)<br />/*Perfectionistnoreply@blogger.comtag:blogger.com,1999:blog-3730109956797334216.post-20154406861757239462003-07-07T01:17:00.000-07:002009-07-30T01:47:05.831-07:00INTERVIEW QUESTIONS - TOUGH1> How do you access a file that has a disposition of KEEP???<br /><br />Ans: Need to supply Volume serial no. VOL=SER=XXXX<br /><br />2> What is tht diffrance between JES2 and JES3??<br /><br />Ans: JES3 allocates datasets for all steps before the job is sheduled.<br /> In JES2,allocation of datasets required by a step are done only just before the <br /> step executes.<br /><br />3> What PERFORM parameter in EXEC statement is meant for?<br /><br />Ans: In os/390 installation, the system programmer defines several performance groups, which has specific performance characteristics like storage,speed etc. Now,each job class is associated with a default performance group. If one wants to override the default performance group associated with the class he can do it by this parameter- PERFORM=value in the JOB or EXEC stmt. When used in EXEC stmt only that step will be influenced by that performance group. <br /><br />4> What is the work of initiator?<br /><br />Ans: initiator is a special address register.<br /><br />5> How to Execute from the second step in the PROC that is used in the JCL??<br /><br />Ans: On jobcard using RESTART option specify PROCName.StepName you want to restart at. <br /><br />6> How can I get the number of records of a sequential file without browsing it?<br /><br />Ans: you can use tso command "COUNT" over sequential dataset to know the number of records in it with out browsing it. <br /><br />7> I have a main program in a pds i.e a.b.c and sub program is in a.b.d.<br />the question is how would be the dd statement?<br /><br />Ans: If you are calling your sub pgm dynamically then DD stmt would be:<br />//SETP01 exec IGYWCL<br />//COBOL.SYSIN DD DSN= NAME OF PDS<br />(MAIN PROGRAM //LKED.SYSLMOD DD DSN= PDS NAME FOR LOAD MODULE//STEPLIB DD DSN=( NAME OF PDS WHICH CONTAINS THE LOAD MODULE OF SUB PGM) FOR STATIC CALL //STEP01 EXEC IGYWCL //COBOL.SYSIN DD DSN= NAME OF PDS(MAIN PROGRAM //LKED.SYSLMOD DD DSN= PDS NAME FOR LOAD MODULE//LKED.SYSLIB DD DSN=( NAME OF PDS WHICH CONTAINS THE LOAD MODULE OF SUB PGM)<br /><br />8> Why we use export-import over repro??<br /><br />Ans: There is much faster way to do the same:<br /><br />- Use FAVER utility to take a back up (very fast). It will contain data as well as all definitions (base cluster, AIX, path, all parameters)<br /><br />- XMIT dataset to hwre is has to go<br /><br />- Use FAVER utility to restore it<br /><br />Also, SORT utility is a faster tool to load VSAM than IDCAMS<br /><br />9> What is difference between addressing mode and residential mode??<br /><br />Ans: Addressing mode specifies the architecture used, ie 24 bit addressing mode or the 31 bit addressing mode,ie, Amode=24 or Amode=31.<br /><br />The residential or Rmode is used to specify whether or not the job exists above or below the 16Mb line, ie, where it is resident. <br /><br />10> Question How do you convert negative packed decimal number to positive PD using JCL?<br /> <br />Ans: JCL is not a programming language, it's a script language for executing programs and defining data that programs use. Write a COBOL program to multiply the negative numbers by -1. Then use JCL to execute the program. <br /><br />Go back to <a href="http://jclgurukul.blogspot.com/2009/07/interview-questions.html">INTERVIEW QUESTIONS</a>!Perfectionistnoreply@blogger.comtag:blogger.com,1999:blog-3730109956797334216.post-38569536830068399982003-03-03T01:58:00.000-08:002009-07-30T01:59:43.546-07:00TUTORIALC O M I N G S O O NPerfectionistnoreply@blogger.comtag:blogger.com,1999:blog-3730109956797334216.post-67684472008888968452002-05-08T00:17:00.000-07:002009-07-30T00:51:03.373-07:00INTERVIEW QUESTIONS - EASY1> How can i pass a data from jcl to cobol program??<br /><br />Ans: There are two ways<br /><br /> a> Through Insteram (using sysin dd *)<br /> b> Through PARM parameter<br /><br />2> How do you code insteram data in JCL???<br /><br />Ans:<br /> //SYSIN DD *<br /> input data<br /> input data<br /> .<br /> .<br /> /*<br />3> Maximum length of PARM parameter??<br /><br />Ans: 100 char.<br /><br />4> What if both JOBLIB and STEPLIB is specified???<br /><br />Ans: JOBLIB is ignored.<br /><br />5> What is the diffrance between primary and secondary allocation of dataset?? <br /><br />Ans:Secondary space is done when more space is required than what has already been allocated<br /><br />6> What is the purpose and meaning of the TIME keyword and what JCL statement is it associated with? <br /><br />Ans: TIME specifies the maximum CPU time allocated for a particular job or job step. If TIME is in the JOB card, it relates to the entire job; if in the EXEC statement, it relates to the job step. <br /><br />we can code TIME=1440 to have maximum time limit so that the job will not be abended also we can code TIME=NOLIMIT or TIME=MAXIMUM. this allow you to have a maximum of 248 days. a job can be executed continuously for 248 days in mainframe. <br /><br />7> What is the difference between specifying DISP=OLD and DISP=SHR for a dataset? <br /><br />Ans: DISP=OLD --> Exclusive HOLD. Read from beginning of dataset. But if u write, then it will overwrite on existing data. i.e old data is lost. <br /><br /><br />DISP=SHR --> multiple user can share the data. Its read-only file.<br /><br /><br />8> What is the difference between BLKSIZE and LRECL? <br /><br />Ans: LRECL is the Logical RECord Length (or size of the record in bytes.<br />BLKSIZE is the physical size, in bytes, of all the records that are grouped together into a block of records.Both LRECL and BLKSIZE are expressed as bytes. <br /><br />9> How can be determined if date contained in the header of a file is date current date?<br /><br />Ans : Use date parameter<br /><br />10> How will you call the return code of JCL ?<br /><br />Ans: Return Code in JCL can b obtained by the use of COND paramater...it is used to know the return codes of previous steps.<br /><br />Go Back to <a href= "http://jclgurukul.blogspot.com/2009/07/interview-questions.html">INTERVIEW QUESTION MENU</a>!Perfectionistnoreply@blogger.comtag:blogger.com,1999:blog-3730109956797334216.post-6570467508536575452001-11-02T18:53:00.000-08:002010-01-20T19:15:09.904-08:00How the DB2 application program runs on mainframe environment.Step by Step process of how the DB2 Application program(Cobol + DB2) works on mainframe.(Also explain the concept of precompilation timestamp)<br /><br />What is DB2 Application program?<br /><br />The program written in any High-Level language (In this context COBOL language) which access the data stored in DB2 database.<br /><br /><br />IF we feed the DB2 application program written in COBOL to the Cobol Compiler (IGYCRCTL) it can recognize only Cobol statements in application program and cannot recognize any DB2 statement hence before feeding this program directly to Cobol compiler, we want something which can recognize DB2 statement and separate the DB2 statement from the Cobol program. This can be done by feeding the application program to DB2 Pre-compiler. <br /><br /><br /><br /><br />DB2 Pre-compiler : <br /><br />•The DB2 pre-compiler will comment out the DB2 statement in program and replace them with the CALL statement. <br /><br />•The DB2 pre-compiler will comment out the DB2 statement in program and replace them with the CALL statement. <br /><br /><br />This commented DB2 statement will be stored separately in different dataset which is called as DBRM (Data Base Request Module).<br /><br />So this pre-compiler separates out the main program in two parts<br /><br />1>The modified Source code (The main program with Commented Db2 statements and corresponding replaced CALL statement)<br /><br />2>The DBRM (Contains all the DB2 statement from the source program)<br /><br /><br />•Place the timestamp token on DBRM and modified source code .This<br />Timestamp token will then carry forward in both parts and will be checked at the run time when these two separated parts reunite.<br />So at the run time the matching timestamp token will indicate that we are using the same DBRM and Modified source code which get separated at pre-compile step.<br /><br />The pre-compilation timestamp token placed by DB2 pre-compiler on the DBRM can be obtained by checking the value from POS 25 through POS 32 in the DBRM header, which is the first record in the DBRM member.<br /><br /><a href="http://jclgurukul.blogspot.com/2009/07/interview-questions-easy.html">CONTINUE...</a><br>Perfectionistnoreply@blogger.comtag:blogger.com,1999:blog-3730109956797334216.post-10680673259730381972001-01-01T23:45:00.000-08:002009-07-30T01:51:41.265-07:00INTERVIEW QUESTIONS☺ <a href="http://jclgurukul.blogspot.com/2009/07/interview-questions-easy.html">EASY</a><br><br />☺ <a href="http://jclgurukul.blogspot.com/2004/07/interview-questions-medium.html">MEDIUM</a><br><br />☺ <a href="http://jclgurukul.blogspot.com/2003/07/interview-questions-tough.html">TOUGH</a>Perfectionistnoreply@blogger.comtag:blogger.com,1999:blog-3730109956797334216.post-52521216430731060001999-07-24T02:38:00.000-07:002009-07-30T01:54:23.409-07:00<A HREF="http://jclgurukul.blogspot.com/2005/07/compile-jcl_06.html">◄ SAMPLE COMPILE JCL</A><br /><A HREF="WWW.AAA.COM">◄ SAMPLE LINK JCL</A> <br /><A HREF="WWW.AAA.COM">◄ SAMPLE BIND JCL</A><br /><A HREF="WWW.AAA.COM">◄ SAMPLE RUN JCL</A>Perfectionistnoreply@blogger.comtag:blogger.com,1999:blog-3730109956797334216.post-60014883762439784161988-07-17T05:59:00.000-07:002009-07-28T03:05:39.795-07:00ABEND CODESSo what is ABEND or ABEND CODES???<br /><br />let's take the word ABEND : AB(abnormally) + END (ended)<br /><br />ABEND CODE: The error code return by mainframe O/S when the JOB abnormally ended(NOT ENDED OK.<br />SO, if you wrote some JCL statements and ready to submit a cobol program through your jcl but...<br /><br />1> What if you miss one jcl statment in between??<br />2> what if you miss to write a DD name for a DD statement??<br />3> What if due to some bug in the code you program is going in loop??<br />4> What if due to some reason you have to cancel the job before it ended??<br /><br />So if you miss something in your jcl and try to submit the jcl the O/S will return some error code that we have to decode and take the action accordingly and run our jcl again.<br /><br />But the problem here is that the error code returned by O/S is not in plain english statement but infact it returns a 4 digit number and that is what our ABEND CODE/ERROR is .so here we will see how many of those different abend codes are present ,under what condition that will be displayed and what to do once thay came.<br />Click on below link for complete list of abend codes.<br /><br /><a href="http://jclgurukul.blogspot.com/2009/07/bac.html">COMPLETE LIST OF ABEND CODES!!!</a>.Perfectionistnoreply@blogger.comtag:blogger.com,1999:blog-3730109956797334216.post-5240226861388155161978-07-28T02:58:00.000-07:002009-07-28T04:21:24.671-07:00COMPLETE LIST OF ABEND CODES!!!.<table border="2" width="100%"><br /><tr><td>ABEND CODE </td><td>REASON</td><td>DESCRIPTION</td><td>USER RESPONCE</td><br /></tr> <tr><td>S0C4</td><br /> <td>Caused by subscript being out of range</td><br /> <td>INVALID ADDRESS WAS REFERENCED DUE TO SUBSCRIPT ERROR,TRIED TO READ OR WRITE A FILE WHICH WAS NOT OPEN - USED DD DUMMY AND LOGIC SAYS AT END MOVE HIGH VALUES TO FD </td><br /><td> If table is defined as Occurs N times,check whether subscript value is going out of range (grater than N or less than N) </td><br /></tr><br /><tr><br /> <td> S0C7</td><br /> <td>Caused by bad data, which the program was unable to Detect. The result is an ABEND failure</td><br /> <td>SUBSCRIPT ERROR, REFERENCED BEYOND TABLE. COBOL - WORKING STORAGE NOT INITIALIZED - BAD DATA, SHOULD CHECK DATA FOR ERRORS - GARBAGE IN A FIELD BEING TESTED OR DISPLAYED - MOVE ZEROES TO GROUP LEVEL IS DISPLAY, HAD SUBLEVELS THAT WERE NOT - PERIOD MISSING AFTER IMPERATIVE STATEMENTS WITHIN AT END CLAUSE - BINARY FIELD IN AN ARITHMETIC OPERATION IS NOT LARGE ENOUGH TO ACCEPT RESULT </td><br /><td> N/A </td><br /></tr><br /><br /><tr><br /> <td> S222</td><br /> <td>Caused by job being cancelled by the operator</td><br /> <td>EITHER THE OPERATOR OR THE JOB ENTRY SUBSYSTEM CANCELLED THE JOB.</td><br /><td> N/A </td><br /></tr><br /><br /><tr><br /> <td> S237</td><br /> <td>Caused by end of volume being encountered</td><br /> <td>INCORRECT VOLUME SERIAL, INCORRECT VOLUME MOUNTED, INCORRECT LABELS S237 - 04 - A BLOCK OF DATA HAS BEEN MISSED OR SKIPPED. S237 - 08 - THE DSNAME IN A HEADER LABEL DOES NOT MATCH THAT IN THE JFCB ON THE SECOND OR SUBSEQUENT VOLUME OF A MAGNETIC TAPE DATASET. VERIFY THAT THE CORRECT VOLUME AND DSNAME WERE SPECIFIED. S237 - 0C - THE NUMBER OF BLOCKS PROCESSED, WHICH IS DETERMINED BY THE POSITION OF THE TAPE, DOES NOT MATCH THE DCB BLOCK COUNT..</td><br /><td> N/A </td><br /><br /></tr><br /><br /><tr><br /> <td> S322</td><br /> <td>Caused when CPU time assigned to the job, job step or procedure has been exceeded</td><br /> <td>JOB OR STEP TIME EXCEEDED THE SPECIFIED LIMIT OR<br /> PROGRAM IS IN A LOOP INSUFFICIENT TIME PARAMETER ON JOB OR EXEC. CARD.</td><br /><td> Change the TIME parameter on JOB or EXEC statement OR Check whether program is going in loop.<br /></td> <br /></tr><br /><br /><tr><br /> <td> S413</td><br /> <td>This abend occurs if the DD statement referenced by UNIT=AFF statement is not closed before the DD statement that comes before it</td><br /> <td>AT END OF VOLUME</td><br /><td> N/A</td> <br /></tr><br /><tr><br /> <td> S522</td><br /> <td>Caused when a wait state exceeds an installation defined time limit</td><br /> <td>WAIT TIME OR OPERATOR DID NOT MOUNT THE REQUIRED TAPE WITHIN ALLOWED TIME LIMIT</td><br /><td> N/A </td><br /> <br /></tr><br /><br /><br /><br /><tr><br /> <td> S822</td><br /> <td>Region Unavailable</td><br /> <td>A REGION REQUIRED TO RUN THE STEP COULD NOT BE OBTAINED. </td><br /><td> N/A </td><br /> <br /></tr><br /><br /><br /><tr><br /> <td> SB37</td><br /> <td>Caused by lack of sufficient secondary space</td><br /> <td>AT END OF VOLUME </td><br /><td> N/A </td><br /> <br /></tr><br /><br /><tr><br /> <td> SD37</td><br /> <td>Caused by lack of sufficient disk space</td><br /> <td>04 - (04 IS THE ONLY POSSIBLE RETURN CODE ASSOCIATED WITH SD37) A DATASET OPENED FOR OUTPUT USED ALL THE PRIMARY SPACE, AND NO SECONDARY SPACE WAS REQUESTED. </td><br /><br /><td> EITHER SPECIFY A LARGER PRIMARY QUANTITY OR ADD A SECONDARY QUANTITY TO THE REQUEST.</td> <br /></tr><br /><br /><tr><br /> <td> SE37</td><br /> <td>Caused by lack of space for PDS</td><br /> <td>THE ERROR OCCURRED DURING END OF VOLUME PROCESSING</td> <br /><td> N/A </td><br /> <br /></tr><br /><br /><br /><tr><br /> <td> S806</td><br /> <td>Load module not found</td><br /> <td>THE MEMBER NAME MENTIONED ON EXEC PARAMETER NOT FOUND IN ANY PDS LIBRARY MENTIONED.</td> <br /><br /><td> Check whether correct member name or library name is given</td> <br /></tr><br /><br /><tr><br /> <td> S0C1</td><br /> <td>Operation Exception. Check for subscript errors, missing DD card, file not opened. </td><br /> <td>MISSED THE DD NAME.</td> <br /><br /><td> Check whether you missed to give the name to any DD statement</td><br /></tr><br /><tr><br /> <td> S0CB</td><br /> <td>Divide by Zero</td><br /> <td>ATTEMPTING TO DIVIDE BY ZERO AND NOT USING ON SIZE ERROR.</td> <br /><br /><td> Check mathematical bug in code such as divide by zero etc.</td><br /></tr><br /></table>Perfectionistnoreply@blogger.com