Data Warehousing (1107) Databases (3004) JAVA Related 2673) MainFrames (975) Microsoft Related (2296) Networking (553)
Operating Systems (919) Programming (3254) SAP (2318) Testing FAQS (1674) Testing Material (252) Web Related (994)
Custom Search

What is 1000Projects

'1000projects.com' is an educational content website dedicated to finding and realizing Final Year Projects, IEEE Projects, Engineering Projects, Science Fair Projects, Project Topics, Project Ideas, Major Projects, Mini Projects, Paper Presentations, Presentation Topics, IEEE Topics, .Net Projects, Java Projects, PHP Projects, VB Projects, SQL Projects, C & DS Projects, C++ Projects, Perl Projects, ASP Projects, Delphi Projects, HTML Projects, Cold Fusion Projects, Java Script Projects, Btech Projects, BE Projects, MCA Projects, Mtech Projects, MBA Projects, Project on Software, CBSE Projects, Testing Projects, Embedded Projects, Chemistry Projects, Electronics Projects, Electrical Projects, Science Projects, Mechanical Projects, Mba project Reports, Placement papers, Sample Resumes, Entrance Exams, Technical Faq's, Puzzles, etc

how it works?

Everything on this site is submitted by the students in this professional community. You Can submit your Projects, Project Topics & Ideas to info.1000projects{at}gmail.com after you submit your project/project Idea/Abstract/Seminar Topics, These are being verified and approved by our administrator. after approval of this project/project Idea/Abstract/Seminar Topics, It can be shown on 1000projects.com so that other users can read/discuss it.The entire content on this website is Only For Educational Purpose, Non Commercial use!

Please help us/Other Users by sending projects/project Ideas/Abstracts/Seminar Topics. Thanking You!!!!!


Category Articles
main() { int i=400,j=300; printf("%d..%d"); }
Added on Tue, Dec 8, 2009
400..300 Explanation: printf takes the values of the first two assignments of the program. Any number of printf’s may be given. All of them take only the first two values. If more number of assignments given in the program,then printf will take... Read More
Can I have members of different record length in a single PDS?
Added on Tue, Dec 8, 2009
you can have different record length member in a pds but while concatenating all the members must have same logical record length. Read More
There are 100 steps in a jobcard.If we want to execute 100th step,what to do? and but remaining 99 steps should not execute?
Added on Tue, Dec 8, 2009
Suppose i have 110 steps , and i want to execute only step 100, step 1 to 99 and step 101 to 110 should not be execute. How i will do this. 1.we can do it by using COND parameter in JOB statement. 2.we can do it by commenting all... Read More
main() { char *p; printf("%d %d ",sizeof(*p),sizeof(p)); }
Added on Tue, Dec 8, 2009
1 2 Explanation: The sizeof() operator gives the number of bytes taken by its operand. P is a character pointer, which needs one byte for storing its value (a character). Hence sizeof(*p) gives a value of 1. Since it needs two bytes to store the... Read More
What are SD37, SB37, SE37 abends?
Added on Tue, Dec 8, 2009
All indicate dataset out of space. SD37 - no secondary allocation was specified. SB37 - end of vol. and no further volumes specified. SE37 - Max. of 16 extents already allocated. Read More
main() { char *p; int *q; long *r; p=q=r=0; p++; q++; r++; printf("%p...%p...%p",p,q,r); }
Added on Fri, Dec 11, 2009
Answer: 0001...0002...0004 Read More
How will you call the return code of JCL ?
Added on Fri, Dec 11, 2009
Return Code in JCL can b obtained by the use of COND paramater...it is used to know the return codes of previous steps. Read More
A PROC has five steps. Step 3 has a condition code. How can you override/nullify this condition code?
Added on Tue, Dec 8, 2009
Provide the override on the EXEC stmt in the JCL as follows: //STEP001 EXEC procname,COND.stepname=value All parameters on an EXEC stmt in the proc such as COND, PARM have to be overridden like this. Read More
How do you convert negative packed decimal number to positive PD using JCL?
Added on Tue, Dec 8, 2009
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. Read More
What are the valid DSORG values ?
Added on Fri, Dec 11, 2009
PS - QSAM, PO - Partitioned, IS - ISAM Read More
#include<stdio.h> main() { const int i=4; float j; j = ++i; printf("%d %f", i,++j); }
Added on Fri, Dec 11, 2009
Compiler error Explanation: i is a constant. you cannot change the value of constant Read More
What is NOTCAT 2 ?
Added on Tue, Dec 8, 2009
This is an MVS message indicating that a duplicate catalog entry exists. E.g., if you already have a dataset with dsn = ?xxxx.yyyy? and u try to create one with disp new,catlg, you would get this error. the program open and write would go through and... Read More
What is S322 abend ?
Added on Tue, Dec 8, 2009
Indicates a time out abend. Your program has taken more CPU time than the default limit for the job class. Could indicate an infinite loop. Read More
#include<stdio.h> main() { int i=1,j=2; switch(i) { case 1: printf("GOOD"); break; case j: printf("BAD"); break; } }
Added on Tue, Dec 8, 2009
Compiler Error: Constant expression required in function main. Explanation: The case statement can have only constant expressions (this implies that we cannot use variable names directly so an error). Note: Enumerated types can be used in case... Read More
main() { int i=0; for(;i++;printf("%d",i)) ; printf("%d",i); }
Added on Tue, Dec 8, 2009
1 Explanation: before entering into the for loop the checking condition is "evaluated". Here it evaluates to 0 (false) and comes out of the loop, and i is incremented (note the semicolon after the for loop). Read More
i have a main program in a pds i.e a.b.c and sub program is in a.b.d. the question is how would be the dd statement?
Added on Fri, Dec 11, 2009
If you r calling your sub pgm dynamically then DD stmt would be://SETP01 exec IGYWCL//COBOL.SYSIN DD DSN= NAME OF PDS(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... Read More
void main() { static int i=5; if(--i){ main(); printf("%d ",i); } }
Added on Fri, Dec 11, 2009
0 0 0 0 Explanation: The variable "I" is declared as static, hence memory for I will be allocated for only once, as it encounters the statement. The function main() will be called recursively unless I becomes equal to 0, and since main() is... Read More
What is DISP=(NEW,PASS,DELETE)?
Added on Tue, Dec 8, 2009
This is a new file and create it, if the step terminates normally, pass it to the subsequent steps and if step abends, delete it. This dataset will not exist beyond the JCL. Read More
#define f(g,g2) g##g2 main() { int var12=100; printf("%d",f(var,12)); }
Added on Tue, Dec 8, 2009
How to by pass the step without cond parameter?
Added on Fri, Dec 11, 2009
By using the IF and END IF IF (rc<0) ---------- Endif Read More
Explain concatenating datasets?
Added on Fri, Dec 11, 2009
Concatenation is also used to append files in the JCL for a single ddname. The order of appending will be from top FILE to bottom FILE. And the order of the RECORDS concatenated, stays still. MERGing files differ from concatenation, in a way that... Read More
What is 'S0C7' abend?
Added on Tue, Dec 15, 2009
Caused by invalid data in a numeric field. Read More
Does mainframe will support object oriented concept? Jestify?
Added on Tue, Dec 8, 2009
Cobol 2002 is based on Object Oriented Concepts and is the latest version of it. I guess Mainframes with OO will soon be launched as the heart of it ie Cobol is already ready with OO. Read More
Can you code instream data in a PROC ?
Added on Tue, Dec 8, 2009
What is a PROC? What is the difference between an instream and a catalogued PROC?
Added on Fri, Dec 11, 2009
PROC stands for procedure. It is 'canned' JCL invoked by a PROC statement. An instream PROC is presented within the JCL; a catalogued PROC is referenced from a proclib partitioned dataset. proc is set of predefined... Read More
What is abend s322?
Added on Tue, Dec 8, 2009
S322 means the system has run out on the CPU time and the job is being cancelled. My first guess is, check your program if it went into any infinite loop, if not try to change the class and Time keyord parameters in the JCL. If you still get the... Read More
What is the use of sysprint, sysin, sysout, dummy in jcl ?
Added on Tue, Dec 8, 2009
SYSPRINT: All system output will appear under this DD card. Suppose you are copy’ing a VSAM file using IDCAMS. Then, number of records processed, highest condition code etc.. will appear under sysprint. You cannot customise SYSPRINToutput. ... Read More
What does the keyword DCB mean and what are some of the keywords associated with it?
Added on Tue, Dec 8, 2009
DCB stands for data control block; it is a keyword for the DD statement used to describe datasets. Keywords associated with it are BLKSIZE, DEN, LRECL and RECFM. Read More
How do you access a file that had a disposition of KEEP?
Added on Tue, Dec 8, 2009
Need to supply volume serial no. VOL=SER=xxxx. Read More
What is the DD statement for a output file?
Added on Tue, Dec 8, 2009
Unless allocated earlier, will have the foll parameters: DISP=(NEW,CATLG,DELETE), UNIT , SPACE & DCB . Read More
main() { char string[]="Hello World"; display(string); } void display(char *string) { printf("%s",string); }
Added on Tue, Dec 8, 2009
Compiler Error : Type mismatch in redeclaration of function display Explanation : In third line, when the function display is encountered, the compiler doesn’t know anything about the function display. It assumes the arguments and... Read More
main() { printf(" ab"); printf("si"); printf(" ha"); }
Added on Tue, Dec 8, 2009
hai Explanation: - newline  - backspace - linefeed Read More
What is COND=EVEN ?
Added on Tue, Dec 8, 2009
Means execute this step even if any of the previous steps, terminated abnormally. Read More
What is COND=ONLY ?
Added on Tue, Dec 8, 2009
Means execute this step only if any of the previous steps, terminated abnormally. Read More
#define FALSE -1 #define TRUE 1 #define NULL 0 main() { if(NULL) puts("NULL"); else if(FALSE) puts("TRUE"); else puts("FALSE");
Added on Fri, Dec 11, 2009
TRUE Explanation: The input program to the compiler after processing by the preprocessor is, main(){ if(0) puts("NULL"); else if(-1) puts("TRUE"); else puts("FALSE"); } Preprocessor doesn't replace the values given inside the... Read More
What is the improvement to COND= in the latest version of MVS?
Added on Fri, Dec 11, 2009
If you use 'IF and END IF', step will get executed when IF is satisfied. In case of COND parameter, step is bypassed when Read More
main() { int *j; { int i=10; j=&i; } printf("%d",*j); }
Added on Fri, Dec 11, 2009
10 Explanation: The variable i is a block level variable and the visibility is inside that block only. But the lifetime of i is lifetime of the function so it lives upto the exit of main function. Since the i is still allocated space, *j prints the... Read More
What is the meaning of keyword in JCL? What is its opposite?
Added on Tue, Dec 8, 2009
Some part of the jcl is a must in all JCL’s we code For eg ://SYSIN statement ,//SYSOUT statement etc., Here SYSIN and SYSOUT are the keywords in jcl These keywords will not change for any JCL they are generic All others are... Read More
What is the difference between BLKSIZE and LRECL?
Added on Tue, Dec 8, 2009
LRECL is the Logical RECord Length (or size of the record in bytes. 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. Read More
What does IEFBR14 utility is used for?
Added on Tue, Dec 8, 2009
IEFBR14 is an IBM-supplied assembler program,which does nothing but gives control to os/390. It forces os/390 to executes the subsequent job steps of allocation or deallocation. This is one way of creating datasets. IEFBR14 is an... Read More
void main() { while(1){ if(printf("%d",printf("%d"))) break; else continue; } }
Added on Tue, Dec 8, 2009
Garbage values Explanation: The inner printf executes first to print some garbage value. The printf returns no of characters printed and this value also cannot be predicted. Still the outer printf prints something and so returns a non-zero value. So... Read More
What is primary allocation for a dataset?
Added on Tue, Dec 8, 2009
The space allocated when the data set is first created. Read More
How many extents are possible for a sequential file ? For a VSAM file ?
Added on Tue, Dec 8, 2009
16 extents on a volume for a sequential file and 123 for a VSAM file. Read More
What do you do if you do not want to keep all the space allocated to a dataset?
Added on Tue, Dec 8, 2009
Specify the parameter RLSE ( release ) in the SPACE e.g. SPACE=(CYL,(50,50),RLSE) Read More
main() { char *p; p="Hello"; printf("%c ",*&*p); }
Added on Tue, Dec 8, 2009
H Explanation: * is a dereference operator & is a reference operator. They can be applied any number of times provided it is meaningful. Here p points to the first character in the string "Hello". *p dereferences it and so its value is H. Again ... Read More
void main() { int i=5; printf("%d",i++ + ++i); }
Added on Tue, Dec 8, 2009
Output Cannot be predicted exactly. Explanation: Side effects are involved in the evaluation of i Read More
I have multiple jobs ( JCLs with several JOB cards ) in a member. What happens if I submit it?
Added on Tue, Dec 8, 2009
Multiple jobs are submitted (as many jobs as the number of JOB cards). Read More
What is difference between addressing mode and residential mode?
Added on Fri, Dec 11, 2009
Addressing mode specifies the architecture used, ie 24 bit addressing mode or the 31 bit addressing mode,ie, Amode=24 or Amode=31. The residential or Rmode is used to specify whether or not the job exists above or below the 16Mb line, ie,... Read More
What is order of searching of the libraries in a JCL?
Added on Fri, Dec 11, 2009
First any private libraries as specified in the STEPLIB or JOBLIB, then the system libraries such as SYS1.LINKLIB. The system libraries are specified in the linklist. Read More
main() { int i=-1; -i; printf("i = %d, -i = %d ",i,-i); }
Added on Fri, Dec 11, 2009
i = -1, -i = 1 Explanation: -i is executed and this execution doesn't affect the value of i. In printf first you just print the value of i. After that the value of the expression -i = -(-1) is printed. Read More
What is the difference between primary and secondary allocations for a dataset?
Added on Fri, Dec 11, 2009
Secondary allocation is done when more space is required than what has already been allocated. Read More
What is RESTART? How is it invoked?
Added on Tue, Dec 8, 2009
Used to indicate the step, procedure step or checkpoint at which the system is to restart the job. Syntax: RESTART=STEPNAME If the step we, which we want to restart is in a procedure then we have to mention the procedure name also before the... Read More
Write the DD step names used in IERCOMPR?
Added on Tue, Dec 8, 2009
sysut1 for first dataset. sysut2 for second dataset. Read More
102) void main() { int i=i++,j=j++,k=k++; printf(?%d%d%d?,i,j,k); }
Added on Tue, Dec 8, 2009
Garbage values. Explanation: An identifier is available to use in program code from the point of its declaration. So expressions such as i = i++ are valid statements. The i, j and k are automatic variables and so they contain some garbage value.... Read More
How can I get the number of records of a sequential file without browsing it?
Added on Tue, Dec 8, 2009
u can use tso command "COUNT" over sequential dataset to know the number of records in it with out browsing it. Read More
What is the importance of ADDRSPC parameter in EXEC statement and how is it different from REGION parameter of EXEC statement?
Added on Tue, Dec 8, 2009
The REGION parameter requests storage for individual steps.The ADDRSPC parameter prevents the step from being paged. The default is ADDRSPC=VIRT which allows it to be paged. If set to ADDRSPC=REAL, the step will be locked into real storage during the... Read More
What is the difference between specifying DISP=OLD and DISP=SHR for a dataset?
Added on Tue, Dec 8, 2009
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. DISP=MOD --> Exclusive HOLD. You can write to the end of the file without loosing your old data (i.e... Read More
main() { unsigned int i=10; while(i-->=0) printf("%u ",i); }
Added on Tue, Dec 8, 2009
10 9 8 7 6 5 4 3 2 1 0 65535 65534?.. Explanation: Since i is an unsigned integer it can never become negative. So the expression i-- >=0 will always be true, leading to an infinite loop. Read More
main() { extern int i; i=20; printf("%d",i); }
Added on Tue, Dec 8, 2009
Linker Error : Undefined symbol ’_i’ Explanation: extern storage class in the following declaration, extern int i; specifies to the compiler that the memory for i is allocated in some other program... Read More
main() { printf("%x",-1<<4); }
Added on Tue, Dec 8, 2009
fff0 Explanation : -1 is internally represented as all 1’s. When left shifted four times the least significant 4 bits are filled with 0’s.The %x format specifier specifies that the integer value be printed as a hexadecimal value. Read More
How do you override a specific DDNAME/SYSIN in PROC from a JCL?
Added on Tue, Dec 8, 2009
//<stepname.dd> DSN=... Read More
main() { char *p="hai friends",*p1; p1=p; while(*p!=’
Added on Tue, Dec 8, 2009
ibj!gsjfoet Explanation: ++*p++ will be parse in the given order  *p that is value at the location currently pointed by p will be taken  ++*p the retrieved value will be incremented  when ; is encountered the location will be incremented... Read More
#include <stdio.h> #define a 10 main() { #define a 50 printf("%d",a); }
Added on Tue, Dec 8, 2009
50 Explanation: The preprocessor directives can be redefined anywhere in the program. So the most recently assigned value will be taken. Read More
#define clrscr() 100 main() { clrscr(); printf("%d ",clrscr()); }
Added on Tue, Dec 8, 2009
100 Explanation: Preprocessor executes as a seperate pass before the execution of the compiler. So textual replacement of clrscr() to 100 occurs.The input program to compiler looks like this : main() { 100; printf("%d ",100); } ... Read More
Why do you want to specify the REGION parameter in a JCL step?
Added on Tue, Dec 8, 2009
To override the REGION defined at the JOB card level. REGION specifies the max region size. REGION=0K or 0M or omitting REGION means no limit will be applied. Read More
enum colors {BLACK,BLUE,GREEN} main() { printf("%d..%d..%d",BLACK,BLUE,GREEN); return(1); }
Added on Tue, Dec 8, 2009
0..1..2 Explanation: enum assigns numbers starting from 0, if not explicitly defined. Read More
What does the TIME parameter signify ? What does TIME=1440 mean ?
Added on Tue, Dec 8, 2009
TIME parameter can be used to overcome S322 abends for programs that genuinely need more CPU time. TIME=1440 means no CPU time limit is to be applied to this step. Read More
What is the work of initiator?
Added on Tue, Dec 8, 2009
initiator is a special address register. initiators are the special address space which maps a job according to it’s assigned class. class is againg installation depandent i.e a-z,0-9 or Initiator is a Special address... Read More
How do you check the syntax of a JCL without running it?
Added on Tue, Dec 8, 2009
TYPERUN=SCAN on the JOB card or use JSCAN. Read More
What does IEBGENER do?
Added on Tue, Dec 8, 2009
Used to copy one QSAM file to another. Source dataset should be described using SYSUT1 ddname. Destination dataset should be decribed using SYSUT2. IEBGENR can also do some reformatting of data by supplying control cards via SYSIN. Read More
How do you send the output of a COBOL program to a member of a PDS?
Added on Tue, Dec 8, 2009
Code the DSN as pds(member) with a DISP of SHR. The disp applies to the pds and not to a specific member. Read More
main() { int i; printf("%d",scanf("%d",&i)); // value 10 is given as input here }
Added on Tue, Dec 8, 2009
Explanation: Scanf returns number of items successfully read and not 1/0. Here 10 is given as input which should have been scanned successfully. So number of items read is 1. Read More
How do you run a COBOL batch program from a JCL? How do you run a COBOL/DB2 program?
Added on Fri, Dec 11, 2009
To run a non DB2 program, //STEP001 EXEC PGM=MYPROG To run a DB2 program, //STEP001 EXEC PGM=IKJEFT01 //SYSTSIN DD * DSN SYSTEM(....) RUN PROGRAM(MYPROG) PLAN(.....) LIB(....) PARMS(...) /* Read More
What is STEPLIB, JOBLIB? What is it used for?
Added on Fri, Dec 11, 2009
Specifies that the private library (or libraries) specified should be searched before the default system libraries in order to locate a program to be executed. STEPLIB applies only to the particular step, JOBLIB to all steps in the job. Read More
What happens if both JOBLIB & STEPLIB is specified ?
Added on Fri, Dec 11, 2009
JOBLIB is ignored. Read More
Why we use export-import over repro?
Added on Fri, Dec 11, 2009
There is much faster way to do the same: - 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) - XMIT dataset to hwre is has to go - Use FAVER utility to... Read More
When you specify mutiple datasets in a JOBLIB or STEPLIB, what factor determines the order?
Added on Fri, Dec 11, 2009
The library with the largest block size should be the first one. Read More
The disp in the JCL is MOD and the program opens the file in OUTPUT mode. What happens ?
Added on Fri, Dec 11, 2009
The disp in the JCL is SHR and the pgm opens the file in EXTEND mode. What happens ? Records will be written to end of file (append) when a WRITE is done in both cases. Read More
Describe the JOB statement, its meaning, syntax and significant keywords?
Added on Fri, Dec 11, 2009
The JOB statement is the first in a JCL stream. Its format is // jobname, keyword JOB, accounting information in brackets and keywords, MSGCLASS, MSGLEVEL, NOTIFY, CLASS, etc. job statement is mainly used to identify job, and... Read More
what will be the position of the file marker? a: fseek(ptr,0,SEEK_SET); b: fseek(ptr,0,SEEK_CUR);
Added on Fri, Dec 11, 2009
a: The SEEK_SET sets the file position marker to the starting of the file. b: The SEEK_CUR sets the file position marker to the current position of the file. Read More
main() { char name[10],s[12]; scanf(" "%[^"]"",s); } How scanf will execute?
Added on Fri, Dec 11, 2009
First it checks for the leading white space and discards it.Then it matches with a quotation mark and then it reads all character upto another quotation mark. Read More
Describe the DD statement, its meaning, syntax and keywords ?
Added on Fri, Dec 11, 2009
Its the Data Definition (DD) statement It should not exceed 8 characters It is normally the identifier name which we give in the cobol program to identify the that the trailing DSN is for the particular DD name for eg: COMMLY DD ... Read More
What is the problem with the following code segment? while ((fgets(receiving array,50,file_ptr)) != EOF)
Added on Fri, Dec 11, 2009
Answer & Explanation: fgets returns a pointer. So the correct end of file check is checking for != NULL. Read More
What is MOD and when would you use it?
Added on Fri, Dec 11, 2009
DISP=MOD is used when the dataset can be extended, ie, you can add records at the end of an existing dataset. Read More
What is the meaning of the EXEC statement keyword, COND? What is its syntax?
Added on Fri, Dec 11, 2009
COND specifies the conditions for executing the subsequent job step. The value after the COND= is compared to the return codes of the preceding steps and if the comparison is true, the step is bypassed. (If this answer confuses you, welcome to the... Read More
What is the purpose of the PARM keyword in the EXEC statement?
Added on Fri, Dec 11, 2009
Parm is used in exec statement to pass the value to the application program. it is a length of 100 char and it can be it can be acccepted in linkage section.//stepname dd pgm=prog1, parm= hello Read More
What is the purpose and meaning of the TIME keyword and what JCL statement is it associated with?
Added on Fri, Dec 11, 2009
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. Read More
#include<stdio.h> main() { int a[2][2][2] = { {10,2,3,4}, {5,6,7,8} }; int *p,*q; p=&a[2][2][2]; *q=***a; printf("%d..%d",*p,*q); }
Added on Fri, Dec 11, 2009
garbagevalue..1 Explanation: p=&a[2][2][2] you declare only two 2D arrays. but you are trying to access the third 2D(which you are not declared) it will print garbage values. *q=***a starting address of a is assigned integer pointer. now q is... Read More
main() { int i=5,j=6,z; printf("%d",i+++j); }
Added on Fri, Dec 11, 2009
11 Explanation: the expression i+++j is treated as (i++ + j) Read More
main() { char *p; p="%d "; p++; p++; printf(p-2,300); }
Added on Fri, Dec 11, 2009
300 Explanation: The pointer points to % since it is incremented twice and again decremented by 2, it points to '%d ' and 300 is printed. Read More
What does a disposition of (MOD,DELETE,DELETE) mean ?
Added on Tue, Dec 15, 2009
The MOD will cause the dataset to be created (if it does not exist), and then the two DELETEs will cause the dataset to be deleted whether the step abends or not. This disposition is used to clear out a dataset at the beginning of a job. Read More
How do you designate a comment in JCL?
Added on Tue, Dec 8, 2009
we can use //* for writing the comments and also we can write any where after code give one space and write the comments ... Read More
Describe the EXEC statement, its meaning, syntax and keywords?
Added on Tue, Dec 8, 2009
The EXEC statement is given when we want to execute a particular program The EXEC statement should be followed by the program name eg : EXEC program1 Here, program1 is the name of the program EXEC statement is used to... Read More
#include<conio.h> main() { int x,y=2,z,a; if(x=y%2) z=2; a=2; printf("%d %d ",z,x); }
Added on Tue, Dec 8, 2009
Garbage-value 0 Explanation: The value of y%2 is 0. This value is assigned to x. The condition reduces to if (x) or in other words if(0) and so z goes uninitialized. Thumb Rule: Check all control paths to write bug free code. Read More
What is the difference between DISP=OLD,DISP=MOD & DISP=NEW?
Added on Tue, Dec 8, 2009
DISP=OLD denotes exclusive control of the dataset; DISP=MOD is used when the dataset can be extended, ie, you can add records at the end of an existing dataset. Read More
int i=10; main() { extern int i; { int i=20; { const volatile unsigned i=30; printf("%d",i); } printf("%d",i); } printf("%d",i); }
Added on Tue, Dec 8, 2009
30,20,10 Explanation: ’{’ introduces new block and thus new scope. In the innermost block i is declared as, const volatile unsigned which is a valid declaration. i is assumed of type int. So printf prints 30. In the next block, i has... Read More
How many jobs can we write in a single file ?
Added on Tue, Dec 8, 2009
How can be determined if date contained in the header of a file is date current date?
Added on Tue, Dec 8, 2009
Use date parameter Read More
main() { float me = 1.1; double you = 1.1; if(me==you) printf("I love U"); else printf("I hate U"); }
Added on Tue, Dec 8, 2009
I hate U Explanation: For floating point numbers (float, double, long double) the values cannot be predicted exactly. Depending on the number of bytes, the precession with of the value represented varies. Float takes 4 bytes and longdouble takes 10... Read More
main() { static int var = 5; printf("%d ",var--); if(var) main(); }
Added on Tue, Dec 8, 2009
5 4 3 2 1 Explanation: When static storage class is given, it is initialized once. The change in the value of a static variable is retained even between the function calls. Main is also treated like any other ordinary function, which can be... Read More
What does a disposition of (NEW,CATLG,KEEP) mean?
Added on Tue, Dec 8, 2009
That this is a new dataset and needs to be allocated, to CATLG the dataset if the step is successful and to KEEP but not CATLG the dataset if the step abends. Thus if the step abends, the dataset would not be catalogued and we would need to supply... Read More
main() { int c=- -2; printf("c=%d",c); }
Added on Tue, Dec 8, 2009
c=2; Explanation: Here unary minus (or negation) operator is used twice. Same maths rules applies, ie. minus * minus= plus. Note: However you cannot give like --2. Because -- operator can only be applied to variables as a decrement... Read More
How do you create a temporary dataset? Where will you use them?
Added on Tue, Dec 8, 2009
Temporary datasets can be created either by not specifying any DSNAME or by specifying the temporary file indicator as in DSN=&&TEMP. We use them to carry the output of one step to another step in the same job. The dataset will not be... Read More
#include<stdio.h> main() { char s[]={’a’,’b’,’c’,’ ’,’c’,’
Added on Tue, Dec 8, 2009
77 Explanation: p is pointing to character ’ ’. str1 is pointing to character ’a’ ++*p. "p is pointing to ’ ’ and that is incremented by one." the ASCII value of ’ ’ is 10, which is then incremented to... Read More
How do you skip a particular step in a proc/JOB?
Added on Tue, Dec 8, 2009
Can use either condition codes or use the jcl control statement IF (only in ESA JCL) Read More
#define square(x) x*x main() { int i; i = 64/square(4); printf("%d",i); }
Added on Tue, Dec 8, 2009
64 Explanation: the macro call square(4) will substituted by 4*4 so the expression becomes i = 64/4*4 . Since / and * has equal priority the expression will be evaluated as (64/4)*4 i.e. 16*4 = 64 Read More
main() { printf("%p",main); }
Added on Tue, Dec 8, 2009
Some address will be printed. Explanation: Function names are just addresses (just like array names are addresses). main() is also a function. So the address of function main will be printed. %p in printf specifies that the argument is an address.... Read More
main() { clrscr(); } clrscr();
Added on Tue, Dec 8, 2009
No output/error Explanation: The first clrscr() occurs inside a function. So it becomes a function call. In the second clrscr(); is a function declaration (because it is not inside any function). Read More
How to Execute from the second step in the PROC that is used in the JCL?
Added on Tue, Dec 8, 2009
On jobcard using RESTART option specify PROCName.StepName you want to restart at. Read More
main() { int i=1; while (i<=5) { printf("%d",i); if (i>2) goto here; i++; } } fun() { here: printf("PP"); }
Added on Tue, Dec 8, 2009
Compiler error: Undefined label ’here’ in function main Explanation: Labels have functions scope, in other words The scope of the labels is limited to functions . The label ’here’ is available in function fun() Hence it is not... Read More
What PERFORM parameter in EXEC statement is meant for?
Added on Tue, Dec 8, 2009
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... Read More
void main() { int i=5; printf("%d",i+++++i); }
Added on Tue, Dec 8, 2009
Compiler Error Explanation: The expression i+++++i is parsed as i ++ ++ + i which is an illegal combination of operators. Read More
What are the difference between in-stream procedure and inline procedure in jcl ?
Added on Tue, Dec 8, 2009
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. for the in-line perform... Read More
How do you overcome this limitation ?
Added on Tue, Dec 8, 2009
One way is to code SYSIN DD DUMMY in the PROC, and then override this from the JCL with instream data Read More
1.how many jobs(maximum) can we give in one member to submit?
Added on Fri, Dec 11, 2009
Never heard anything regarding any limit on number of jobs submitted. Read More
#include<stdio.h> main() { struct xx { int x=3; char name[]="hello"; }; struct xx *s=malloc(sizeof(struct xx)); printf("%d",s->x); printf("%s",s->name); }
Added on Fri, Dec 11, 2009
Compiler Error Explanation: Initialization should not be done for structure members inside the structure declaration Read More
main() { extern int i; i=20; printf("%d",sizeof(i)); }
Added on Fri, Dec 11, 2009
Linker error: undefined symbol '_i'. Explanation: extern declaration specifies that the variable i is defined somewhere else. The compiler passes the external variable to be resolved by the linker. So compiler doesn't find an error.... Read More
main() { printf("%d", out); } int out=100;
Added on Fri, Dec 11, 2009
Compiler error: undefined symbol out in function main. Explanation: The rule is that a variable is available for use from the point of declaration. Even though a is a global variable, it is not available formain. Hence an error. Read More
main() { extern out; printf("%d", out); } int out=100;
Added on Fri, Dec 11, 2009
100 Explanation: This is the correct way of writing the previous program. Read More
main() { show(); } void show() { printf("I'm the greatest"); }
Added on Fri, Dec 11, 2009
Compier error: Type mismatch in redeclaration of show. Explanation: When the compiler sees the function show it doesn't know anything about it. So the default return type (ie, int) is assumed. But when compiler sees the actual definition ofshow... Read More
main() { char *str1="abcd"; char str2[]="abcd"; printf("%d %d %d",sizeof(str1),sizeof(str2),sizeof("abcd")); }
Added on Fri, Dec 11, 2009
2 5 5 Explanation: In first sizeof, str1 is a character pointer so it gives you the size of the pointer variable. In second sizeof the name str2 indicates the name of the array whose size is 5 (including the ' Read More
main() { char not; not=!2; printf("%d",not); }
Added on Fri, Dec 11, 2009
0 Explanation: ! is a logical operator. In C the value 0 is considered to be the boolean value FALSE, and any non-zero value is considered to be the boolean value TRUE. Here 2 is a non-zero value so TRUE. !TRUE is FALSE (0) so it prints 0. Read More
main() { int k=1; printf("%d==1 is ""%s",k,k==1?"TRUE":"FALSE"); }
Added on Fri, Dec 11, 2009
1==1 is TRUE Explanation: When two strings are placed together (or separated by white-space) they are concatenated (this is called as "stringization" operation). So the string is as if it is given as "%d==1 is %s". The conditional operator( ?: )... Read More
#define max 5 #define int arr1[max] main() { typedef char arr2[max]; arr1 list={0,1,2,3,4}; arr2 name="name"; printf("%d %s",list[0],name); }
Added on Fri, Dec 11, 2009
Compiler error (in the line arr1 list = {0,1,2,3,4}) Explanation: arr2 is declared of type array of size 5 of characters. So it can be used to declare the variable name of the type arr2. But it is not the case of arr1. Hence an error. Rule of Thumb: ... Read More
#include<stdio.h> main() { register i=5; char j[]= "hello"; printf("%s %d",j,i); }
Added on Fri, Dec 11, 2009
hello 5 Explanation: if you declare i as register compiler will treat it as ordinary integer and it will take integer value. i value may be stored either in register or in memory. Read More
main(int argc, char **argv) { printf("enter the character"); getchar(); sum(argv[1],argv[2]); } sum(num1,num2) int num1,num2; { return num1+num2; }
Added on Fri, Dec 11, 2009
Compiler error. Explanation: argv[1] & argv[2] are strings. They are passed to the function sum without converting it to integer values. Read More
# include <stdio.h> int one_d[]={1,2,3}; main() { int *ptr; ptr=one_d; ptr+=3; printf("%d",*ptr); }
Added on Fri, Dec 11, 2009
garbage value Explanation: ptr pointer is pointing to out of the array range of one_d. Read More
# include<stdio.h> aaa() { printf("hi"); } bbb(){ printf("hello"); } ccc(){ printf("bye"); } main() { int (*ptr[3])(); ptr[0]=aaa; ptr[1]=bbb; ptr[2]=ccc; ptr[2](); }
Added on Fri, Dec 11, 2009
bye Explanation: ptr is array of pointers to functions of return type int.ptr[0] is assigned to address of the function aaa. Similarly ptr[1] and ptr[2] for bbb and ccc respectively. ptr[2]() is in effect of writing ccc(), since ptr[2] points to... Read More
int i; main(){ int t; for ( t=4;scanf("%d",&i)-t;printf("%d ",i)) printf("%d--",t--); } // If the inputs are 0,1,2,3 find the o/p
Added on Fri, Dec 11, 2009
4--0 3--1 2--2 Explanation: Let us assume some x= scanf("%d",&i)-t the values during execution will be, t i x 4 0 -4 3 1 -2 2 2 0 Read More
main(){ unsigned int i; for(i=1;i>-2;i--) printf("c aptitude"); }
Added on Fri, Dec 11, 2009
Explanation: i is an unsigned integer. It is compared with a signed value. Since the both types doesn't match, signed is promoted to unsigned value. The unsigned equivalent of -2 is a huge value so condition becomes false and control comes... Read More
void main() { int k=ret(sizeof(float)); printf(" here value is %d",++k); } int ret(int ret) { ret += 2.5; return(ret); }
Added on Fri, Dec 11, 2009
Here value is 7 Explanation: The int ret(int ret), ie., the function name and the argument name can be the same. Firstly, the function ret() is called in which the sizeof(float) ie., 4 is passed, after the first expression the value in ret will be... Read More
void main() { char a[]="12345
Added on Fri, Dec 11, 2009
here in 3 6 Explanation: The char array 'a' will hold the initialized string, whose length will be counted from 0 till the null character. Hence the 'I' will hold the value equal to 5, after the pre-increment in the printf... Read More
What does a disposition of (NEW,CATLG,DELETE) mean?
Added on Tue, Dec 15, 2009
That this is a new dataset and needs to be allocated, to CATLG the dataset if the step is successful and to delete the dataset if the step abends. Read More
How to invoke a jcl(with all control cards, like job crad and all) from another jcl?
Added on Tue, Dec 8, 2009
You can use the Internal reader to do so. //* //STEP050 EXEC PGM=IEBGENER //SYSPRINT DD SYSOUT=* //SYSUT1 DD DSN=SYSPDA.JCLLIB(JCL2),DISP=SHR //SYSUT2 DD SYSOUT=(A,INTRDR) //SYSIN DD DUMMY Read More
How do you restart a proc from a particular step?
Added on Tue, Dec 8, 2009
In job card, specify RESTART=procstep.stepname where procstep = name of the jcl step that invoked the proc and stepname = name of the proc step where you want execution to start Read More
How is the keyword DUMMY used in JCL?
Added on Tue, Dec 8, 2009
For an output file DUMMY specifies that the output is to be discarded. For input it specifies that the file is empty. Basically Dummy is used for testing purpose and lasts upto the job execution. Dummy is Used with " &&... Read More
What is the difference between primary and secondary allocations for a data set?
Added on Tue, Dec 8, 2009
Secondary allocation is done when more space is required than what has already been allocated. Read More
main() { int i=10; i=!i>14; Printf ("i=%d",i); }
Added on Tue, Dec 8, 2009
Answer: i=0 Explanation: In the expression !i>14 , NOT (!) operator has more precedence than ? >? symbol. ! is a unary logical operator. !i (!10) is 0 (not of true is false). 0>14 is false (zero). Read More
What is ’S0C7’ abend?
Added on Tue, Dec 8, 2009
Caused by invalid data in a numeric field. Read More
What is a S0C4 error ?
Added on Tue, Dec 8, 2009
Storage violation error - can be due to various reasons. e.g.: READING a file that is not open, invalid address referenced due to subscript error. Read More
how many steps(maximum) can we give in one job?
Added on Fri, Dec 11, 2009
Number of steps in 1 job - no more than 255. Read More
how many steps (maximum) can we give in one memeber to execute after submitting?
Added on Fri, Dec 11, 2009
Member - i guess you mean PDS member - actually it doesn't matter from where job is submitted. How many will run - depends on the number of available initiators for Job clasess and job names for the same classes - some jobs may have to wait. Read More
How to change default proclib ?
Added on Fri, Dec 11, 2009
//ABCD JCLLIB ORDER=(ME.MYPROCLIB,SYS1.PROCLIB) Read More
main( ) { void *vp; char ch = ?g?, *cp = ?goofy?; int j = 20; vp = &ch; printf(?%c?, *(char *)vp); vp = &j; printf(?%d?,*(int *)vp); vp = cp; printf(?%s?,(char *)vp + 3); }
Added on Fri, Dec 11, 2009
g20fy Explanation: Since a void pointer is used it can be type casted to any other type pointer. vp = &ch stores address of char ch and the next statement prints the value stored in vp after type casting it to the proper data type pointer. the... Read More
main() { int i, n; char *x = ?girl?; n = strlen(x); *x = x[n]; for(i=0; i<n; ++i) { printf(?%s ?,x); x++; } }
Added on Fri, Dec 11, 2009
(blank space) irl rl l Read More
What are the kinds of job control statements?
Added on Fri, Dec 11, 2009
Control Statements 1) JOB - to identify the Job 2) EXEC - to identify which program has to Execute 3) DD - to supply the input/output files required for program execution There are two ways to control job processing in... Read More
void main() { void *v; int integer=2; int *i=&integer; v=i; printf("%d",(int*)*v); }
Added on Fri, Dec 11, 2009
Compiler Error. We cannot apply indirection on type void*. Explanation: Void pointer is a generic pointer type. No pointer arithmetic can be done on it. Void pointers are normally used for, 1. Passing generic pointers to functions and returning... Read More





©2007, 1000projects.com, Only For Educational Purpose, Non Commercial use!