# Blogs

## 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

//*

## 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 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

## 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

## 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?

## 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