IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to write the easytrieve logic for this requirement


IBM Mainframe Forums -> CA Products
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
bhoja

New User


Joined: 31 Jan 2006
Posts: 49

PostPosted: Mon Jun 18, 2007 7:05 pm
Reply with quote

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
View user's profile Send private message
Devzee

Active Member


Joined: 20 Jan 2007
Posts: 684
Location: Hollywood

PostPosted: Tue Jun 19, 2007 9:20 am
Reply with quote

This can be done using SORT.
If you dont know Easytrieve then any reason to code in Easytrieve?
Back to top
View user's profile Send private message
priyamnavada

New User


Joined: 24 Dec 2005
Posts: 52
Location: hyderabad

PostPosted: Tue Jun 19, 2007 8:13 pm
Reply with quote

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
View user's profile Send private message
bhoja

New User


Joined: 31 Jan 2006
Posts: 49

PostPosted: Wed Jun 20, 2007 11:39 am
Reply with quote

Thanks a lot priya.

Raj
Back to top
View user's profile Send private message
priyamnavada

New User


Joined: 24 Dec 2005
Posts: 52
Location: hyderabad

PostPosted: Wed Jun 20, 2007 7:45 pm
Reply with quote

got the result.....
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CA Products

 


Similar Topics
Topic Forum Replies
No new posts Write line by line from two files DFSORT/ICETOOL 7
This topic is locked: you cannot edit posts or make replies. How To Write, Compile and Execute Cob... COBOL Programming 5
No new posts Compare two files with a key and writ... SYNCSORT 3
No new posts Finding faulty logic Subscript out of... COBOL Programming 5
No new posts Count the number of characters in a f... CA Products 1
Search our Forums:

Back to Top