October 2012

IITM - General Model Questions

1. 6*12*15 is the volume of some material. How many cubes can be inserted into that?

2.Two pipes can fill a tank in 10 1nd 12 hours while third pipe will make the tank
empty in 20 hours.If all three pipes operate simultaneously,in how many hours the
tank will be filled ?

3.Diameter of a beaker is 7cm. Mambler(some instrument)dia is 1.4cm.How many mamblers
has to be put to increase the water level by 5.6cm.

4.Cost of an item is x. It's value increases by p% and decreases by p%Now the new value
is 1 rupee, what is the actual value.

5.A right circular cylinder and a cone are there.Base radius of cone is equal to radius
of cylinder.What is the ratio of height to slant side.

6.Distance between two poles is 50 meters.A train goes by 48 kmph in one minute.How many
poles will be crossed by the train.

7.A pole seen from a certain distance at an angle of 15 degrees and 100 meters ahead by
30 degrees. What is th height of pole.

8.15 people--each has to pay Rs.20.. 20 people--each has to pay Rs.18.. for 40 people--how
much has to pay ?

9.if p=2q then q=r*r,if p-odd then q is even,whether we decide r is even or odd ?

a)first condition is sufficient
b)second condition is sufficient
c)both are sufficient
d)both are not sufficient

10.What is the value of m given that

i) m is devided by 2
ii) m is devided by 5

Continue Read

IITM - General Knowledge Questions

11. If he sells 40 magoes, he will get the selling price of 4 mangoes extra, What is his % increse in profit ?

12.100 glasses are there. A servant has to supply glasses to a person If he supplies the glasses without any damage he will et 3 paise otherwise he will loose 3 paise. At the end of supplying 100 glasses if he gets 270 paise, how many glasses were supplied safely.

13. for all X(roar(X)=>lion(X))
a)all lions roar
b)some lions roar

14. My neighbour has seven children.Every brother has equal no. of brothers and siters ,but each sister has twice as many brothers as sisters?

15. There are 11 more animals than birds in a pet shop.If there areas many birds as animals and if there are as many animals as birds the no. of legs is 4/5 of the original.Howmany birds and animals are there?

16. one soap can be made out of the scraps obtained while preparing 11 soaps.How many soaps can be prepared out of the scrap obtained out of 251 soaps.(Take all possibilities)

17. Find out the five digit number whose first digit is three times that of it's fifth digit,the fourth digit is four more than the
second digit,the third digit is three less than the second digit, and there are 3 pairs of digits such that each sum is 11?

18. There are 5 burglars and once went to a bakery to rob it obviously The first guy ate 1/2 of the total bread and 1/2 of the bread. The second guy ate 1/2 of the remaining and 1/2 of the bread. The third guy ,fourth guy and fifth guy did the same.After fifth guy there is no bread left out.How many bread are there?

19. The main line train starts at 5.00AM and the harbour line train starts at 5.02AM.Each train has the frequency of 10 minutes.If a guy goes in the morning at a random time what is the probability of he getting main line train?

20. There is 66x33m rectangular area .Ram is 11/8 times faster than Krishna.Both of them started walking at opposite ends and they met at some point then,Ram said "See you in the other end"Then they continued walking.After some time Ram thought he will have tea so he turned back walked back 15 meters then he changed his mind again and continued walking .How much Krishna has travelled by the time they meet?

Continue Reading

IITM General Knowledge Questions

21. A farmer has C chickens.A sack of feed comes for 9 days.As the feed cost is increasing the farmer sells some chickens and retains 12 chicken.If he reduces the feed quantity by 10% .Then he observes that the feed comes for 30 days.What is C?

22. A person walking takes 26 steps to come down on a escalator and it takes 30 seconds for him for walking.The same person while running takes 18 second and 34 steps.How many steps are there in the escalator?

23. There are nine cards arranged in three rows and three columns. Each row contains atleast one green card.There are three yellow corners.Red is either in the first row or second row.There are 2 greens in the 3rd column and 2 blues in the second row.What is the arrange ment of the cards

24. There are eight cards. Each card has colour on both sides. There are 2 blue 2 red 2 green 2 yellow.

25. There are WIFE and HUSBAND at one side of river. They have one child, They want to cross the river. The child can't be lonly. The boat boy won't permit morethan one to cross the river, what is the correct way to cross the river?

26. There are 7 targets, A B and C has to shoot them. All should be shooted consecutively.

1. The no. of chances for A and B are not less thn 2,
2. for C there is only one chance.
3. A can't shot 3 times consicutively.
4. B is permited to shoot in even chances only.

27. There are 1800 coins .one soin is defective in that .in how many minimum times you can find that the coin is defective.

a)11
b)9
c)7
d)2

28. There are two kind of professonal in a company software & personal.if the personal are 15% of the total .a party is going .in a party if 50% of the total professonal left and all are s/w then what is the ratio of the software professonal left to total software professonal.

29. what is the probability of the taking out two card one king and one queen of black in a card packet.

30. Find the next number 1 1 2 3 5 ... 13

Continue Reading

How to declare group data by using easytrive

//XXXXIN DD DISP=SHR,DSN=XXXXXXX.XXXX.XXXXX.XXX
//XXXXOUT DD DSN=XXXXXXX.XXXX.XXXXXXXX.XXXXXXXX.XXXX,
// DISP=(NEW,CATLG,DELETE),SPACE=(CYL,(XXX,XXX),RLSE),
// DCB=(LRECL=XXX,RECFM=XX,BLKSIZE=0),UNIT=XXXXX
//SYSIN DD *

FILE XXXXIN
IN-XXX-XXXXXX 03 4 P 00
XXXXXXXX-XXXXX-XXDE 0012 0003 A
XXXXXXXX-XXX-XXXX-OCCUR 0032 0002 P 00
XXX-XXXA 0034 0038 A OCCURS 0100
XXXXXXXX-XXX-XXH XXX-XXXA 05 A
XXXXXXXX-XXXX-XXT XXX-XXXA +5 05 P 02
XXXXXXXX-XXXXX-XXXXXX-XMT XXX-XXXA +10 05 P 02
XXXXXXXX-XXXX-XXX-XD XXX-XXXA +15 05 P 02
XXXXXXXX-XX-XXX-XXX-XXED XXX-XXXA +20 05 P 02
XXXXXXXX-REM XXX-XXXA +25 13 A

//*Here the group data is XXX-XXXA and group data start position is 34 / record length is //*38 / occurrence of 100 times

*
FILE XXXXOUT
XXX-REC 01 XXX A
XXT-XXXXXM 1 7 N
XXT-XXX-XXT 10 11 N 2

WS-COUNT W 09 N
WS-XXX-XXT W 11 N 2
I W 03 N 0

JOB INPUT FILEIN FINISH DISPLAY-PARA.
IF XXXXXXXX-XXXXX-XXDE = 'XXY'
WS-XXX-XXT = 0
XXX-REC = ' '
XXX-XXXXXM = IN-XXX-XXXXXX
XXX-XXX-XXT = WS-XXX-XXT
PUT XXXXOUT
WS-COUNT = WS-COUNT + 1
END-IF

*
DISPLAY-PARA. PROC
DISPLAY 'COUNT : ' WS-COUNT
END-PROC

How to WRITE group data in output file by using easytrive

//XXXXIN DD DISP=SHR,DSN=XXXXXXX.XXXX.XXXXX.XXX
//XXXXOUT DD DSN=XXXXXXX.XXXX.XXXXXXXX.XXXXXXXX.XXXX,
// DISP=(NEW,CATLG,DELETE),SPACE=(CYL,(XXX,XXX),RLSE),
// DCB=(LRECL=XXX,RECFM=XX,BLKSIZE=0),UNIT=XXXXX
//SYSIN DD *

FILE XXXXIN
IN-XXX-XXXXXX 03 4 P 00
XXXXXXXX-XXXXX-XXDE 0012 0003 A
XXXXXXXX-XXX-XXXX-XCCUR 0032 0002 P 00
XXX-XXXA 0034 0038 A OCCURS 0100
XXXXXXXX-XXX-XXH XXX-XXXA 05 A
XXXXXXXX-XXXX-XMT XXX-XXXA +5 05 P 02
XXXXXXXX-XXXXX-XXXXXE XXX-XXXA +10 05 P 02
XXXXXXXX-XXXX-XXX-XD XXX-XXXA +15 05 P 02
XXXXXXXX-XX-XXX-XXX-XXED XXX-XXXA +20 05 P 02
XXXXXXXX-XXXXXX-XXX-XXYD XXX-XXXA +25 05 P 02
XXXXXXXX-XXXX-XXXUE XXX-XXXA +30 05 P 06
XXXXXXXX-XXXXX-XXXXXXSED XXX-XXXA +37 07 P 06
XXXXXXXX-XXXXXXXX-XXDE XXX-XXXA +38 01 A

//*Here the group data is XXX-XXXA and group data start position is 34 / record length is //*38 / occurrence of 100 times

*
FILE XXXXOUT
XXX-XXC 01 XXX A
XXT-XXXXXM 1 7 N
XXT-XXX-XXT 10 11 N 2
XXX-XXX-XXXX-OCCUR 23 02 P 00
XXX-XXX-XXTA 26 10 A OCCURS 0100
XXX-XXXX-XXX-YXH XXX-XXX-XXTA 05 A
XXX-XXXG-XXXXX-XXXXXX-XXT XXX-XXX-XXTA +5 05 P 02

//*Here the group data is XXX-XXTA and group data start position is 26 / record length is //*10 / occurrence of 100 times

WS-COUNT W 09 N
WS-XXX-XXT W 11 N 2
I W 03 N 0

JOB INPUT FILEIN FINISH DISPLAY-PARA.
IF XXXXXXXX-XXXXX-XXDE = 'AAA'
WS-XXX-XXT = 0
A = 1
XXX-XXC = ' '
DO WHILE A LE XXXXXXXX-XXX-XXXX-OCCUR
XXXXXXXX-XXXXX-XXXXXX-XMT (A) = +
XXXXXXXX-XXXXX-XXXXXX-XMT (A) * -1
WS-XXX-XXT = WS-XXX-XXT + XXXXXXXX-XXXXX-XXXXXX-XMT (A)
XXX-XXXX-XXX-XXH (I) = XXXXXXXX-XXX-XXH (A)
XXX-XXXX-XXXXX-XXXXXX-XMT (A) = +
XXXXXXXX-XXXXX-XXXXXX-XMT (A)
A = A + 1
END-DO
//*The output file variable will be loaded based on input file group data. The working //*storage field WS-XXX-XMT will be added for each record and it will be written in //*output file.
XXT-XXXXXM = IN-XXX-XXXXXM
OUT-XXX-XXT = WS-XXX-XXT
XXX-XXX-XXXX-OCCUR = XXXXXXXX-XXX-XXXX-XCCUR
PUT XXXXOUT
WS-COUNT = WS-COUNT + 1
END-IF

*

//*Once end of the file reached this para will perform and display how many records were //*written into output file.

DISPLAY-PARA. PROC
DISPLAY 'FIND : ' WS-CNT1
END-PROC
//*

How to use subscript in easytrive

//XXXXIN DD DISP=SHR,DSN=XXXXXXX.XXXX.XXXX.XXX.XXXX
//XXXXXUT DD DSN=XXXXXXX.XXXX.XXXX.XXX.XXXXXXX,
// DISP=(NEW,CATLG,DELETE),SPACE=(CYL,(XXX,XX),RLSE),
// DCB=(LRECL=XX,RECFM=FB,BLKSIZE=0),UNIT=XXXXX
//SYSIN DD *

FILE XXXXIN
IN-XXT 21 4 P 00
ABC-XXXX 0050 0030 A OCCURS 050
XXXXXXXX-FIL ABC-XXXX 04 A
XXXXXXXX-ACV-DEF ABC-XXXX +4 05 A
XXXXXXXX-XXXX-XXA ABC-XXXX +9 05 P 02
*
FILE XXXXXUT
XXX-XXC 01 80 A
OXX-XXX 1 7 N
OXX-XXXX-XXX-ABC 9 5 A
OXX-XXX-DEF 15 11 N 2

WS-XXXC W 01 A
WS-XXE-HXT W 11 N 2 VALUE 0
H W 03 N 0

JOB INPUT FILEIN
H = 1
WS-XXXC = 'N'
XXX-REC = ' '
DO WHILE WS-XXXC = 'N'
IF XXXXXXXX-ACV-DEF (H) = 'ABCDE'
OXX-XXX = IN-XXT
OXX-XXXX-XXX-ABC = XXXXXXXX-ACV-DEF (H)
OUT-XXX-DEF = XXXXXXXX-XXXX-XXA (H)
PUT XXXXXUT
GO TO JOB
END-IF
H = H + 1
IF XXXXXXXX-ACV-DEF (H) = ' '
GO TO JOB
END-IF
END-DO
//*

Is it possible to have is numeric check in easytrive? How it can be used?

FILE INXXXX FB (XXX XXXXX)
IN-XXXXXX-RE 1 12 A
IN-CXXE 14 02 A
AN-COUNT 17 07 N
AA-DD 35 02 N
AA-MMM 38 03 A
AA-YYYY 42 04 N

FILE OUTXXXX FB (XXX XXXXX)
XXT-DATE 1 11 A
XXT-XXXXXX-RE 1 12 A
XXT-XXDE 14 02 A
AUT-COUNT 17 07 N

WS-I W 2 N
WS-AAAA W 11 A
WS-DD WS-AAAA 02 N
WS-FL WS-AAAA +02 01 A VALUE '-'
WS-MMM WS-AAAA +03 03 A
WS-FL1 WS-AAAA +06 01 A VALUE '-'
WS-YYYY WS-AAAA +07 04 N
WS-CNT W 2 N
WS-COUNT W 1 A
WS-RECORD-RE W 12 A VALUE 'XXXS-XXXXTEN'
WS-XXXX-TABLE W 21 A OCCURS 20
WS-RECORD-RE1 WS-XXXX-TABLE 12 A
WS-XXXXA WS-XXXX-TABLE +12 02 A
WS-AAAAAA WS-XXXX-TABLE +17 07 N

***********************************************************
JOB INPUT INXXXX
IF AA-DD NUMERIC AND AA-YYYY NUMERIC
WS-DD = AA-DD
WS-MMM = AA-MMM
WS-YYYY = AA-YYYY
AAT-AADE = WS-AAAA
PUT OUTXXXX
END-IF
IF AA-DD NUMERIC AND AA-YYYY NUMERIC AND +
AA-DD NE WS-DD AND AA-YYYY NE WS-YYYY AND WS-MMM NE AA-MMM
WS-COUNT = 'N'
END-IF
IF AN-XXXXXX-RE = 'XXXS-XXXXTEN'
WS-CNT = WS-CNT + 1
IF WS-CNT > 10
WS-COUNT = 'Y'
END-IF
IF WS-COUNT = 'Y'
AUT-XXXXXX-XE = AN-XXXXXX-RE
AAT-XXXE = XX-XXDE
AAT-COUNT = AN-COUNT
PUT OUTXXXX
WS-CNT = 0
END-IF
END-IF
//*

//*VALUE CLAUSE CAN BE USED IN EASYTRIEVE WHILE DECLARING VARIABLES

IITM General Question Paper

31. Find next number 1,7,17,31,--,71

32. Out of 1800 coins one is lighter than others and in howmany attempts you can find that odd one?

33. out of 52 cards two are drawn consecutively. what is the probablility to get black king & black queen ?

34. Find next number 1,2,3,5,8, ..?

35. out of 100 students in the class 60 take hindi ,55 social, 65 english. Howmany students passed in atleast 2 subjects?

36. given word: h i n d. Find the odd man out ?

37. BIRD:HIPK::EMCR: ?

38. if a boat is moving in upstream with v1 km/hr and in the down stream it is moving with v2 km/hr then what is the speed of the stream.

39. 0.75 * 0.75 * 0.75 - 0.001
--------------------------------
0.75*0.75-0.075+0.01

40. A can work done in 8 days. B can work three timesfaster than the A. C can work five times faster asthe A;

USING INPUT FILE READ MULTIPLE DATABASE THROUGH EASYTRIEVE

//FILEIN DD DSN=T54V01H.VSRJ.FB003.SSN,
// DISP=SHR
//FILEOUT DD DSN=T54V01H.VSRJ.WITHZE.MIX,
// DISP=(,CATLG,CATLG),
// DCB=(LRECL=100,RECFM=FB,BLKSIZE=0),
// UNIT=SYSPD,SPACE=(CYL,(100,10),RLSE)
//SYSOUT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
* ----------------------------------------------*
* DATA DIVISION SECTION *
* ----------------------------------------------*
FILE HV01BPAA DLI(HV01BPAA 1)
PCB-DBD-NAME 1 8 A
PCB-SEGMENT-LEVEL 9 2 A
PCB-STATUS-CODE 11 2 A
PCB-PROC-OPTION 13 4 A
PCB-RESERVE-DLI 17 4 B
PCB-SEGMENT-NAME 21 8 A
PCB-LENGTH-KEY-FB 29 4 B
PCB-NUM-SENS-SEGMENT 33 4 B
PCB-KEY-FB-AREA 37 24 A
%HV010IA1
%HV010IA3
%HV010IAI
%HV010IA4

*-----------------------------------------------*
* SSA-QUAL *
*-----------------------------------------------*
SSA-HV01SPA1 W 35 A VALUE 'HV01SPA1'
SSA-HV01SPA1-IND SSA-HV01SPA1 +08 1 A VALUE '*'
SSA-HV01SPA1-CC1 SSA-HV01SPA1 +09 1 A VALUE '-'
SSA-HV01SPA1-CC2 SSA-HV01SPA1 +10 1 A VALUE '-'
SSA-HV01SPA1-CC3 SSA-HV01SPA1 +11 1 A VALUE '-'
SSA-HV01SPA1-CC4 SSA-HV01SPA1 +12 1 A VALUE '-'
SSA-HV01SPA1-CC5 SSA-HV01SPA1 +13 1 A VALUE '-'
SSA-HV01SPA1-CC6 SSA-HV01SPA1 +14 1 A VALUE '-'
SSA-HV01SPA1-CC7 SSA-HV01SPA1 +15 1 A VALUE '-'
SSA-HV01SPA1-CC8 SSA-HV01SPA1 +16 1 A VALUE '-'
SSA-HV01SPA1-LPA SSA-HV01SPA1 +17 1 A VALUE '('
SSA-HV01SPA1-NME SSA-HV01SPA1 +18 8 A VALUE 'KV01SPA1'
SSA-HV01SPA1-OPR SSA-HV01SPA1 +26 2 A VALUE '= '
SSA-HV01SPA1-KEY SSA-HV01SPA1 +28 6 A
SSA-HV01SPA1-RPA SSA-HV01SPA1 +34 1 A VALUE ')'

SSA-HV01SPA3 W 34 A VALUE 'HV01SPA3'
SSA-HV01SPA3-IND SSA-HV01SPA3 +08 1 A VALUE '*'
SSA-HV01SPA3-CC1 SSA-HV01SPA3 +09 1 A VALUE '-'
SSA-HV01SPA3-CC2 SSA-HV01SPA3 +10 1 A VALUE '-'
SSA-HV01SPA3-CC3 SSA-HV01SPA3 +11 1 A VALUE '-'
SSA-HV01SPA3-CC4 SSA-HV01SPA3 +12 1 A VALUE '-'
SSA-HV01SPA3-CC5 SSA-HV01SPA3 +13 1 A VALUE '-'
SSA-HV01SPA3-CC6 SSA-HV01SPA3 +14 1 A VALUE '-'
SSA-HV01SPA3-CC7 SSA-HV01SPA3 +15 1 A VALUE '-'
SSA-HV01SPA3-CC8 SSA-HV01SPA3 +16 1 A VALUE '-'
SSA-HV01SPA3-LPA SSA-HV01SPA3 +17 1 A VALUE '('
SSA-HV01SPA3-NME SSA-HV01SPA3 +18 8 A VALUE 'KV01SPA3'
SSA-HV01SPA3-OPR SSA-HV01SPA3 +26 2 A VALUE '= '
SSA-HV01SPA3-KEY SSA-HV01SPA3 +28 5 A
SSA-HV01SPA3-RPA SSA-HV01SPA3 +33 1 A VALUE ')'

SSA-HV01SPA4 W 33 A VALUE 'HV01SPA4'
SSA-HV01SPA4-IND SSA-HV01SPA4 +08 1 A VALUE '*'
SSA-HV01SPA4-CC1 SSA-HV01SPA4 +09 1 A VALUE '-'
SSA-HV01SPA4-CC2 SSA-HV01SPA4 +10 1 A VALUE '-'
SSA-HV01SPA4-CC3 SSA-HV01SPA4 +11 1 A VALUE '-'
SSA-HV01SPA4-CC4 SSA-HV01SPA4 +12 1 A VALUE '-'
SSA-HV01SPA4-CC5 SSA-HV01SPA4 +13 1 A VALUE '-'
SSA-HV01SPA4-CC6 SSA-HV01SPA4 +14 1 A VALUE '-'
SSA-HV01SPA4-CC7 SSA-HV01SPA4 +15 1 A VALUE '-'
SSA-HV01SPA4-CC8 SSA-HV01SPA4 +16 1 A VALUE '-'
SSA-HV01SPA4-LPA SSA-HV01SPA4 +17 1 A VALUE ' '
SSA-HV01SPA4-NME SSA-HV01SPA4 +18 8 A VALUE 'KV01SPA4'
SSA-HV01SPA4-OPR SSA-HV01SPA4 +26 2 A VALUE '= '
SSA-HV01SPA4-KEY SSA-HV01SPA4 +28 4 A
SSA-HV01SPA4-RPA SSA-HV01SPA4 +32 1 A VALUE ')'

SPA1-STATUS-CODE W 2 A VALUE ' '
SPA3-STATUS-CODE W 2 A VALUE ' '
SPAI-STATUS-CODE W 2 A VALUE ' '
SPA4-STATUS-CODE W 2 A VALUE ' '
SPA1-REPLACE-CODE W 2 A VALUE ' '
SPA3-REPLACE-CODE W 2 A VALUE ' '
SPAI-REPLACE-CODE W 2 A VALUE ' '
SPA4-REPL-CODE W 2 A VALUE ' '

SSA-HV01SPA3-UNQUAL W 09 A VALUE 'HV01SPA3 '

MIX-EFFDT W 7 N
PYMNT-STR W 2 A
MIX-ALLOC W 5 N 2

SSA-COUNT W 4 B VALUE 1
CTR W 6 N
FUNCTION W 4 A
COUNTER W 4 N
OUTPUT-WRITTEN W 1 A

FILE FILEIN
IN-REC 01 134 A
I1-ACCT 01 07 N
I1-VEH 13 05 A
I1-MIX-FB003 27 05 N 2
I1-MIX-FB001 66 05 N 2
I1-PART-SSN 84 09 N
FILE FILEOUT
O1-OUT-REC 01 80 A
O1-ACCT 01 07 N
O1-SSN 09 09 N
O1-PRO-DATE 19 07 N
O1-PRO-TIME 27 10 N
O1-EFF-DATE 38 07 N
O1-VEH-CODE 46 05 A
O1-NEW-PCT 52 05 N 2
O1-OPR-ID 58 07 A

CTR1 W 8 N 0
DTR1 W 8 N 0
ETR1 W 8 N 0
FTR1 W 8 N 0
*-----------------------------------------------*
* WORKIN STORAGE SECTION *
*-----------------------------------------------*
WS-PRO-DATE W 07 N VALUE 2110511
WS-PRO-TIME W 10 N VALUE 0000131737
WS-EFF-DATE W 07 N VALUE 2110511
WS-OPR-ID W 07 A VALUE 'FNDSUBY'
WS-SPA1-KEY W 6 A
W-PROC-COMP WS-SPA1-KEY 2 N VALUE 54
W-PART-ACCT-NO WS-SPA1-KEY +2 4 P 00

WS-SPA3-KEY W 5 A
WS-INV-VEH W 5 A
WS-INV-C W 5 A

WS-VEHICLE W 5 A
WS-VEH-PART1 WS-VEHICLE 1 A
WS-VEH-PART2 WS-VEHICLE +1 4 A
*-----------------------------------------------*
* PROCEDURE DIVISION SECTION *
*-----------------------------------------------*
JOB INPUT (FILEIN)

W-PART-ACCT-NO = I1-ACCT
SSA-HV01SPA1-KEY = WS-SPA1-KEY

SSA-COUNT = 1
FUNCTION = 'GU '

SPA1-STATUS-CODE = ' '
SPA4-STATUS-CODE = ' '

DLI HV01BPAA HV01SPA1 FUNCTION +
SSANO SSA-COUNT +
SSA (SSA-HV01SPA1)

SPA1-STATUS-CODE = PCB-STATUS-CODE
IF SPA1-STATUS-CODE = ' '
SPA3-STATUS-CODE = ' '
DO WHILE SPA3-STATUS-CODE = ' '
PERFORM GETNEXT-SPA3
END-DO
ELSE
DISPLAY 'A1 GET FAILED:' SPA1-STATUS-CODE
END-IF

*-----------------------------------------------*
GETNEXT-SPA3. PROC
*-----------------------------------------------*

SSA-COUNT = 2
FUNCTION = 'GNP'

DLI HV01BPAA HV01SPA3 FUNCTION +
SSANO SSA-COUNT +
SSA (SSA-HV01SPA1 +
SSA-HV01SPA3-UNQUAL)

SPA3-STATUS-CODE = PCB-STATUS-CODE
IF SPA3-STATUS-CODE = ' '
WS-INV-VEH = CINVSVHC-INV-VEH
PERFORM READ-SPA4
IF SPA4-STATUS-CODE = ' '
O1-ACCT = I1-ACCT
O1-SSN = I1-PART-SSN
O1-PRO-DATE = WS-PRO-DATE
O1-PRO-TIME = WS-PRO-TIME
O1-EFF-DATE = WS-EFF-DATE
O1-VEH-CODE = WS-INV-VEH
O1-NEW-PCT = MIX-ALLOC
O1-OPR-ID = WS-OPR-ID
PUT FILEOUT
MIX-ALLOC = 0
ELSE
IF SPA4-STATUS-CODE = 'GE'
DISPLAY 'FB001 NOT FOUND ' I1-ACCT
END-IF
END-IF
ELSE
DISPLAY 'A3 GET FAILED:' SPA3-STATUS-CODE
END-IF
END-PROC.
*-----------------------------------------------*
READ-SPA4. PROC
*-----------------------------------------------*
OUTPUT-WRITTEN = 'N'
FUNCTION = 'GNP '
SSA-HV01SPA3-KEY = WS-INV-VEH
SSA-COUNT = 3
SSA-HV01SPA4-IND = ' '
DLI HV01BPAA HV01SPA4 FUNCTION +
SSANO SSA-COUNT +
SSA (SSA-HV01SPA1 +
SSA-HV01SPA3 +
SSA-HV01SPA4)
SPA4-STATUS-CODE = PCB-STATUS-CODE

IF SPA4-STATUS-CODE = ' '
IF WS-INV-VEH = 'FB001'
MIX-ALLOC = (PCTMXPCT-CTMX-PCT + I1-MIX-FB003)
ELSE
IF WS-INV-VEH = 'FB003'
MIX-ALLOC = 0
ELSE
IF PCTMXPCT-CTMX-PCT > 0
MIX-ALLOC = PCTMXPCT-CTMX-PCT
DISPLAY 'OTHERVH' PCTMXPCT-CTMX-PCT
END-IF
END-IF
END-IF
END-IF

END-PROC.

READ MORE THAN DATABASE THROUGH EASYTRIEVE

//FILEOUT DD DSN=T54V01H.VS1Z.SPA5.REPT,
// DISP=(,CATLG,CATLG),
// DCB=(LRECL=80,RECFM=FB,BLKSIZE=27920),
// UNIT=SYSPD,SPACE=(CYL,(50,5),RLSE)
//SYSOUT DD SYSOUT=*
//SYSIN DD *
*-----------------------------------------------*
* DATA DIVISION SECTION *
*-----------------------------------------------*
FILE HV01BPAA DLI(HV01BPAA 1)
PCB-DBD-NAME 1 8 A
PCB-SEGMENT-LEVEL 9 2 A
PCB-STATUS-CODE 11 2 A
PCB-PROC-OPTION 13 4 A
PCB-RESERVE-DLI 17 4 B
PCB-SEGMENT-NAME 21 8 A
PCB-LENGTH-KEY-FB 29 4 B
PCB-NUM-SENS-SEGMENT 33 4 B
PCB-KEY-FB-AREA 37 24 A

*-----------------------------------------------*
* I/O AREAS *
*-----------------------------------------------*
%HV010IA1
%HV010IA3
%HV010IA5

*-----------------------------------------------*
* SSA-SPA1 *
*-----------------------------------------------*
SSA-HV01SPA1 W 35 A VALUE 'HV01SPA1'
SSA-HV01SPA1-IND SSA-HV01SPA1 +08 1 A VALUE '*'
SSA-HV01SPA1-CC1 SSA-HV01SPA1 +09 1 A VALUE '-'
SSA-HV01SPA1-CC2 SSA-HV01SPA1 +10 1 A VALUE '-'
SSA-HV01SPA1-CC3 SSA-HV01SPA1 +11 1 A VALUE '-'
SSA-HV01SPA1-CC4 SSA-HV01SPA1 +12 1 A VALUE '-'
SSA-HV01SPA1-CC5 SSA-HV01SPA1 +13 1 A VALUE '-'
SSA-HV01SPA1-CC6 SSA-HV01SPA1 +14 1 A VALUE '-'
SSA-HV01SPA1-CC7 SSA-HV01SPA1 +15 1 A VALUE '-'
SSA-HV01SPA1-CC8 SSA-HV01SPA1 +16 1 A VALUE '-'
SSA-HV01SPA1-LPA SSA-HV01SPA1 +17 1 A VALUE '('
SSA-HV01SPA1-NME SSA-HV01SPA1 +18 8 A VALUE 'KV01SPA1'
SSA-HV01SPA1-OPR SSA-HV01SPA1 +26 2 A VALUE '= '
SSA-HV01SPA1-KEY SSA-HV01SPA1 +28 6 A
SSA-HV01SPA1-RPA SSA-HV01SPA1 +34 1 A VALUE ')'
*-----------------------------------------------*
SSA-HV01SPA3-UNQUAL W 09 A VALUE 'HV01SPA3 '
*-----------------------------------------------*
SSA-HV01SPA5-UNQUAL W 11 A VALUE 'HV01SPA5*D '
*-----------------------------------------------*
* INPUT/OUTPUT FILES *
*-----------------------------------------------*
FILE FILEOUT
OUT-REC 01 080 A
OUT-ACCT 01 07 N
OUT-VEH 09 05 A
OUT-BAND-CNT 15 03 N
*-----------------------------------------------*
* WORKING STORAGE SECTION *
*-----------------------------------------------*
FUNCTION W 4 A
SSA-COUNT W 4 B VALUE 1
STATUS-SPA3 W 2 A VALUE ' '
STATUS-SPA5 W 2 A VALUE ' '
WS-INV-VEH W 2 A VALUE ' '
WS-BAND-CNT W 2 N VALUE 0
WS-CNT W 3 N VALUE 0
*-----------------------------------------------*
* PROCEDURE DIVISION SECTION *
*-----------------------------------------------*
JOB INPUT (HV01BPAA)
RETRIEVE HV01BPAA +
SELECT (HV01SPA1 ID 'A1')
IF PATH-ID = 'A1'
WS-CNT = WS-CNT + 1
STATUS-SPA3 = ' '
DO UNTIL STATUS-SPA3 = 'GE'
PERFORM READ-SPA3
END-DO
END-IF
*-----------------------------------------------*
READ-SPA3. PROC
*-----------------------------------------------*
FUNCTION = 'GNP '
SSA-COUNT = 2
SSA-HV01SPA1-KEY = KV01SPA1
DLI HV01BPAA HV01SPA3 FUNCTION +
SSANO SSA-COUNT +
SSA (SSA-HV01SPA1 +
SSA-HV01SPA3-UNQUAL)
STATUS-SPA3 = PCB-STATUS-CODE
IF STATUS-SPA3 = ' '
WS-INV-VEH = CINVSVHC-INV-VEH
IF WS-INV-VEH = 'FB'
WS-BAND-CNT = 0
DO UNTIL STATUS-SPA5 = 'GE'
PERFORM READ-SPA5
END-DO
ELSE
GO TO JOB
END-IF
END-IF
END-PROC.
*-----------------------------------------------*
READ-SPA5. PROC
*-----------------------------------------------*
FUNCTION = 'GNP '
SSA-COUNT = 3
SSA-HV01SPA1-KEY = KV01SPA1
DLI HV01BPAA HV01SPA5 FUNCTION +
SSANO SSA-COUNT +
SSA (SSA-HV01SPA1 +
SSA-HV01SPA3-UNQUAL +
SSA-HV01SPA5-UNQUAL)
STATUS-SPA5 = PCB-STATUS-CODE
IF STATUS-SPA5 = ' '
WS-BAND-CNT = WS-BAND-CNT + 1
END-IF
IF WS-BAND-CNT > 50
OUT-ACCT = ZPRTPACT-PART-ACCT-NO
OUT-VEH = CINVSVHC-INV-VEH
OUT-BAND-CNT = WS-BAND-CNT
PUT FILEOUT
END-IF
END-PROC.
/*

IITM General Question Paper

41. x + 4y
--------- relation between x and y is x/2y = 3/2 ie x = 3y find the ratio
x-2y

42. On an item a company gave 25% discount then they get 25% profit if it gives 10% discount then what is the profit?

43. A person buys 1 liter milk for 12 Rs and to it he adds 1/3 of water and sells the milk at the rate of 15 Rs per liter then what is the % of profit

44. if a boat travels 148 kms in 8 hrs in down stream and 150 Kms in 20 hrs then what is the speed of the stream.

45. A can do a piece of work in 3 days, B can do thrice work in 8 days and c can do 5 times work in 15 days then in how
many days all three together can complete the work.

46. In 1978, a kg of paper was sold at Rs25/-. I f the paper rate increases at 1.5% more than inflation rate which is of 6.5% a year , then what wilbe the cost of a kg of paper after 2 years?

47. In A,B,C are having some marbles with each of them. A has given B and C the same number of marbles they already have to each of them. then, B gave C and A the same no. of marbles they have, then C gave A and B the same no. of marbles they have. At the end A,B,and C have equal no. of marbles.
(i) If x,y,z are the marbles initially with A,B,C respectively. then the no of marbles B have at the end
(a) 2(x-y-z) (b) 4(x-y-z) etc.

(ii)If the total no. of marbles are 72, then the no. of marbles with A at the starting
a. 20 b. 30 c. 32

48. If a car starts from A towards B with some velocity due to some problem in the engine after travelling 30km.If the car goes with 4/5 th of its actuval velocity the car reaches B 45min later to the actual time. If the car engine fails ofter travelling 45km, the car reaches the destination B 36min late to the actual time , what is the initial velocity of car and
what is the distance between A and B in km

49. A person has Rs 100/- in his pocket, he can as 25 pencils or 15 books. He kept 15% of the money for travelling expenses and purchased 5 pencils. So how many books he can purchase with the remaining money.

50. In a class , except 18 all are above 50 years. 15 are below 50 years of age. how many people are there

Continue Reading

IITM General Question Paper

51. In a square , all the mid points are joined. the inner square is shaded. If the area of the square is A, what is the shaded area?

52. A man went to market with some money.With that money he can buy 15 pencils or 25 pens.He kept 15% of that money for bus fare and with rest of the money he purchased 5 pencils,and 'x' pens.How many pens he purchased?

53. A man climbing a wall.For every 4 steps go up he will slipdown 2 steps.If he takes 12 min to 3 steps.how much time it takes to climb 48 meters and one step=2 meters.

54. 33 1/3 of 101 + 296 is

55. One ship goes along the stream direction 28 km and in opposite direction 13 km in 5 hrs for each direction.What is the velocity of stream?

56. Cubic root of 3375=?

57. 2020201-565656=?

58. One clock ringes 7 O'clock in 7 sec.In how many seconds it will ring 10 O'clock.

59. One watch is showing 30 past 3 .What is the angle between minutes hours hand?

60. The average of 4 consecutive even numbers is 27. What is the largest number?

Continue Reading

IITM APTITUDE TEST

61. The average of 4 consecutive even numbers is 27. What is the largest number?

62. One ball was dropped from 8 ft height and every time it goes half of the height. How much distance it will travell before coming to rest.

63. How many liters of water must be added to 30 liters of alcohol to make a solution that is 25%

64. How much is 3/7 larger than 20 percent of 2

65. xyz=120, then which of the following can not be a value of y

66. xsqrt(0.09)=3 , then x equals

67. Perimeter of rectangle is s and the other sideis x, then the other side

68. y-z=0,x+8y=4,3x+4y=7z then find x, y and z

69. f(x,y) =x**2 -y**2 then the value of f(4,(f(1,2) is

70. If the radius of the circle is incresed by 6% then its area incresed by

By using input file how to read database through easytrive

//XXXXIN DD DSN=XXXXXXX.XXXX.XXXX.XXXXXXXX.XXXXXXXX,DISP=SHR
//XXXXOUT DD DSN=XXXXXXX.XXXX.XXXX.XXXXXXXX.XXXXXXX,
// DCB=(LRECL=XX,RECFM=FB,BLKSIZE=0),
// UNIT=XXXXX,DISP=(NEW,CATLG,DELETE),
// SPACE=(CYL,(XXX,XXX),RLSE)
//SYSIN DD *
* ----------------------------------------------*
* DATA DIVISION SECTION *
* ----------------------------------------------*
FILE ABCDEFGH DLI(ABCDEFGH 1)
PCB-DBD-NAME 1 8 A
PCB-SEGMENT-LEVEL 9 2 A
PCB-STATUS-CODE 11 2 A
PCB-PROC-OPTION 13 4 A
PCB-RESERVE-DLI 17 4 B
PCB-SEGMENT-NAME 21 8 A
PCB-LENGTH-KEY-FB 29 4 B
PCB-NUM-SENS-SEGMENT 33 4 B
PCB-KEY-FB-AREA 37 24 A
*-----------------------------------------------*
* WORKING STORAGE SECTION *
*-----------------------------------------------*
WS-AAA W 2 A
SSA-COUNT W 4 B VALUE 1
FUNCTION W 4 A VALUE 'GN '

%XXXXXXXX

* ----------------------------------------------*
* SSA *
* ----------------------------------------------*
SSA-XXXXXXXX-QUAL W 28 A VALUE 'XXXXXXXX'
SSA-XXXXXXXX-LPA SSA-XXXXXXXX-QUAL +08 1 A VALUE '('
SSA-XXXXXXXX-NME SSA-XXXXXXXX-QUAL +09 8 A VALUE 'XXXXXXXX'
SSA-XXXXXXXX-OPR SSA-XXXXXXXX-QUAL +17 2 A VALUE '= '
SSA-XXXXXXXX-KEY SSA-XXXXXXXX-QUAL +19 8 A
SSA-XXXXXXXX-RPA SSA-XXXXXXXX-QUAL +27 1 A VALUE ')'

FILE FILEIN
OXX-XXT 1 7 N
OXX-ABC 9 5 N
OXX-DEF 14 6 N

FILE FILEOUT
OX1-XXT 1 7 N
OX1-ABC 9 5 A
OX1-DEF 14 6 N

WS-XXX-KEY W 8 A
WS-HH WS-XX-KEY 4 N VALUE 1234
WS-AFEG-AA WS-XXX-KEY +04 4 P 00

XXXX-XXXXX-XXX W 10 A
TEMP-ABT XXXX-XXXXX-XXX 7 N
TEMP-ADI XXXX-XXXXX-XXX +07 1 A VALUE '.'
TEMP-DEC XXXX-XXXXX-XXX +08 2 N

WRX-XXXXX-XXX W 9 A
WRK-ADC WXX-XXXXX-XXX 7 N
WRK-DEC WXX-XXXXX-XXX +07 2 N

WS-XXXXX-ONE W 303 A
ADCD-DEFC WS-XXXXX-ONE +04 2 N
ABCF-AA WS-XXXXX-ONE +04 4 P 00
AAA-ADEF WS-XXXXX-ONE +08 4 P 00

XXXX-STATUS-CODE W 2 A

*-----------------------------------------------*
* PROCEDURE DIVISION SECTION *
*-----------------------------------------------*
JOB INPUT (XXXXIN)

WS-AFEG-AA = OXX-XXT
PERFORM GU-XXXXX-READ

*************************************************
GU-XXXXX-READ. PROC
*************************************************
XXXX-STATUS-CODE = ' '
FUNCTION = 'GU'
SSA-XXXXXXXX-KEY = WS-XXX-KEY
SSA-COUNT = 1
DLI ABCDEFGH AAAAAAAA FUNCTION +
SSANO SSA-COUNT +
SSA (SSA-AAAAAAAA-QUAL)

XXXX-STATUS-CODE = DATABASE-STATUS-CODE

//*The get unique call has been passed to read the database. This will be qualified call //*and upon read the record in database the status code (return code) will be in PCB //*status code. For read success the status code will be ‘spaces’ and no record found //*then ‘GE’.

IF XXXX-STATUS-CODE = ' '
OX1-XXX = OXX-XXT
OX1-ABC = OXX-XXX
OX1-DEF = XXXXXXXX:XXXXXXXX-ADC-IND
//* XXXXXXXX – Database name and XXXXXXXX-ADC-IND – Database field.
PUT XXXXOUT
ELSE
DISPLAY 'END---1:' OXX-XXT
END-IF
END-PROC
//*

//*
//*Read input file and load the data into table through easytrive

//XXXXIN DD DSN=XXXXXXX.XXXX.XXXXX.XXXXX.XXX,
// DISP=SHR
//SYSIN DD *
*
FILE FILEIN
IN-XXX 1 80 A
IN-AAA 1 05 N
IN-BBB 7 08 N
IN-CCC 16 10 N
IN-DDD 28 05 A
IN-EEE 35 02 A

TBL-CNT W 7 N VALUE 0
MAX-CNT W 7 N VALUE 0
*

AA-XXXX-TABLE W 30 A OCCURS 5000
AA-AAA AA-XXXX-TABLE 05 N
AA-BBB AA-XXXX-TABLE +05 08 N
AA-AAA AA-XXXX-TABLE +13 10 N
AA-BBB AA-XXXX-TABLE +23 05 A
AA-AAA AA-XXXX-TABLE +28 02 A

JOB INPUT NULL

//*Input null means when start of job it will not read any input file.

TBL-CNT = 0
DO UNTIL EOF XXXXIN
GET XXXXIN
IF EOF XXXXIN
DISPLAY '!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! '
DISPLAY ' END OF XXXXIN '
MAX-CNT = TBL-CNT
DISPLAY 'NUM OF LOADED ENTRIES = ' MAX-CNT
DISPLAY '!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! '
ELSE
TBL-CNT = TBL-CNT + 1
//* Table count increased one by one and the field values from input file will get loaded //*into table.
AA-AAA(TBL-CNT) = IN-AAA
AA-BBB(TBL-CNT) = IN-BBB
AA-CCC(TBL-CNT) = IN-CCC
AA-DDD(TBL-CNT) = IN-DDD
AA-EEE(TBL-CNT) = IN-EEE
END-IF
END-DO
/*
//*

//*Load the input file into table and read another file then match with input file. When //*there is a match found written into one output file and there is no match found //*written into another output file.

//XXXXIN DD DSN=XXXXXXX.XXXX.XXXXX.XXXXX.XXX,
// DISP=SHR
//AAAAA DD DSN=XXXXXXX.XXXX.XXXX.XXXX.XXXXXXX.XXX,
// DISP=SHR
//XXXXXUT DD DSN=XXXXXXX.XXXXXX.XXXXXX.XXXXXXXX.ALL,
// DISP=(NEW,CATLG,DELETE),
// UNIT=XXXXX,SPACE=(CYL,(X,X),RLSE),
// DCB=(RECFM=FB,LRECL=XX,BLKSIZE=0)
//XXXXXU1 DD DSN=XXXXXXX.XXXXXX.XXXXXX.XXXXXXXX.NOT,
// DISP=(NEW,CATLG,DELETE),
// UNIT=XXXXX,SPACE=(CYL,(X,X),RLSE),
// DCB=(RECFM=FB,LRECL=XX,BLKSIZE=0)
//SYSIN DD *
*
FILE XXXXXUT
XX-REC 1 XX A
*
FILE XXXXXU1
XX-REC 1 XX A
*

FILE AAAAA
HH-AAA 1 80 A
HH-BBB 1 07 N
HH-CCC 80 07 N

FILE XXXXIN
IN-XXX 1 80 A
IN-AAA 1 05 N
IN-BBB 7 08 N
IN-CCC 16 10 N
IN-DDD 28 05 A
IN-EEE 35 02 A

TBL-CNT W 7 N VALUE 0
MAX-CNT W 7 N VALUE 0
TOL-CNT W 7 N VALUE 0
AAA-CNT W 11 N VALUE 0
AAA-FLG W 7 A VALUE 'N'
AAA-CNT W 9 N VALUE 0
AAAA-WK W 2 N VALUE 0
AAAV-WK W 2 N VALUE 0
AAP-CNT W 5 N VALUE 0
AAAAX1 W 5 N VALUE 0
AAAAX2 W 5 N VALUE 0
AAA-DEAL W 11 A
*

AA-XXXX-TABLE W 30 A OCCURS 5000
AA-AAA AA-XXXX-TABLE 05 N
AA-BBB AA-XXXX-TABLE +05 08 N
AA-AAA AA-XXXX-TABLE +13 10 N
AA-BBB AA-XXXX-TABLE +23 05 A
AA-AAA AA-XXXX-TABLE +28 02 A

JOB INPUT NULL

//*Input null means when start of job it will not read any input file.

TBL-CNT = 0
DO UNTIL EOF XXXXIN
GET XXXXIN
IF EOF XXXXIN
DISPLAY '!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! '
DISPLAY ' END OF XXXXIN '
MAX-CNT = TBL-CNT
DISPLAY 'NUM OF LOADED ENTRIES = ' MAX-CNT
DISPLAY '!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! '
PERFORM MACTH-AAA-BBB
ELSE
TBL-CNT = TBL-CNT + 1
//* Table count increased one by one and the field values from input file will get loaded //*into table.
AA-AAA(TBL-CNT) = IN-AAA
AA-BBB(TBL-CNT) = IN-BBB
AA-CCC(TBL-CNT) = IN-CCC
AA-DDD(TBL-CNT) = IN-DDD
AA-EEE(TBL-CNT) = IN-EEE
END-IF
END-DO
//*
*******************************************
MACTH-AAA-BBB. PROC
*******************************************
DO UNTIL EOF AAAAA
AAA-CNT = AAA-CNT + 1
AAP-CNT = AAP-CNT + 1
IF AAP-CNT >= 5000
DISPLAY ' PROGRESS >> ' AAA-CNT
AAP-CNT = 0
END-IF
GET AAAAA
IF EOF AAAAA
DISPLAY '!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! '
DISPLAY ' END OF AAAAA '
DISPLAY ' TOTAL AAAAA PROCESSED ' AAA-CNT
DISPLAY '!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! '
STOP
ELSE
PERFORM COMPARE-TABLE
END-IF
END-DO
END-PROC.

*******************************************
COMPARE-TABLE. PROC
*******************************************

AAAAX1 = 1
DO WHILE AAAAX1 <= MAX-CNT
IF AA-AAA = AA-AAA(AAAAX1) AND +
AA-BBB = AA-BBB(AAAAX1)
AA-AAA = AA-AAA
PUT XXXXXUT
//* Each record from AAAAA the file that will be matched against the table which loaded //*based on input file (XXXXIN) and write the output file when there is match found //*(XXXXXUT).
ELSE
A1-AAA = AA-AAA
PUT XXXXXU1
//* Each record from AAAAA the file that will be matched against the table which loaded //*based on input file (XXXXIN) and write the output file when there is not match found //*(XXXXXU1).
END-IF

XXXXX1 = XXXXX1 + 1
END-DO
END-PROC.