View previous topic :: View next topic
|
Author |
Message |
bhoja
New User
Joined: 31 Jan 2006 Posts: 49
|
|
|
|
Hi,
Could anyone help me how to write the easytrieve logic for this requirement
There is a file fileA, in that there is a field stud no and depart name.
I have to extract the data of, stud no =1123 and depart name=c2345
and stud no=4567 and depart name=g7890.
If anybody send the piece of code in easytrieve it will be more usefull. Only main process is enough
Raj |
|
Back to top |
|
|
Devzee
Active Member
Joined: 20 Jan 2007 Posts: 684 Location: Hollywood
|
|
|
|
This can be done using SORT.
If you dont know Easytrieve then any reason to code in Easytrieve? |
|
Back to top |
|
|
priyamnavada
New User
Joined: 24 Dec 2005 Posts: 52 Location: hyderabad
|
|
|
|
FILE INFILE
I-STUD-NO 01 04 A
I-DEP 05 04 A
FILE OUTFILE
O-STUD-NO 01 04 A
O-DEP 05 04 A
JOB INPUT INFILE
IF (I-STUD-NO = 1123 AND I-DEP = c2345) +
OR (I-STUD-NO = 4567 AND I-DEP =g7890)
O-STUD-NO = I-STUD-NO
O-DEP = I-DEP
PUT OUTFILE
END-IF |
|
Back to top |
|
|
bhoja
New User
Joined: 31 Jan 2006 Posts: 49
|
|
|
|
Thanks a lot priya.
Raj |
|
Back to top |
|
|
priyamnavada
New User
Joined: 24 Dec 2005 Posts: 52 Location: hyderabad
|
|
|
|
got the result..... |
|
Back to top |
|
|
|