abhijit saha


{ City } pune
< Country > india
* Profession *
User No # 31931
Total Questions Posted # 0
Total Answers Posted # 2

Total Answers Posted for My Questions # 0
Total Views for My Questions # 0

Users Marked my Answers as Correct # 5
Users Marked my Answers as Wrong # 2
Questions / { abhijit saha }
Questions Answers Category Views Company eMail




Answers / { abhijit saha }

Question { Cap Gemini, 10767 }

In a file(PS), we dont know how many records are there.
requirement is divide half n half the records n insert into
2 another files(PS).


Answer

OUTFIL FNAMES(OUT1,OUT2) SPLIT

Is This Answer Correct ?    4 Yes 0 No

Question { iNautix, 12442 }

sample code for read a 2nd record from last in flatfile how
can do?


Answer

Suppose file has 100 Record

1,2,3.........................100

a) Read the file and Count the number of records into a variable
Suppose CNT_VAR = 100

b) Suppose you want to read 2nd record from Last

So Set N = 2

c) Now to find the search variable compute the below

SRC_VAR = CNT_VAR - N i.e (100 - 2)

SRC_VAR = 98

d) Now Read the file to pick 98th record from top

Is This Answer Correct ?    1 Yes 2 No