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

Tell me the logic for the below given information


IBM Mainframe Forums -> Mainframe Interview Questions
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
saru

New User


Joined: 17 Feb 2005
Posts: 4

PostPosted: Thu Feb 17, 2005 12:21 pm
Reply with quote

can any body send/tell me the logic for the below given information.
requirement is as follows:
--------------------------------
need to create a program which will read the FILE 1.
the program will read each record and check the FILE 1 - field1.if the last 5 bytes of this field is 'indic' then select this record.after selecting this record, move all of the information from this file1 record to the corresponding fields in the output record. if no input records are selected/unmatched then write an empty file.

i would be thankful to u all, if u send me the solution of it.

its urgent

with thanks
saru
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sun Feb 20, 2005 1:47 am
Reply with quote

Hi Saru,

Your problem looks very close to the one in the VSAM&DFSORT Forum. Take a look at the VSAM to GDG Topic.
Back to top
View user's profile Send private message
saru

New User


Joined: 17 Feb 2005
Posts: 4

PostPosted: Mon Feb 21, 2005 11:08 am
Reply with quote

can any body send/tell me the COBOL LOGIC for the below given information.

requirement is as follows:
--------------------------------
i have a PS file 'FILE1', with 10000 records, each having some fields, one of the field is 'FIELD1' of size 10 bytes.

and now i want to read that ps-file records and search for 'indic' string . (this 'indic' is located in last 5 bytes of the 'FIELD1' variable.)

so if u find that in any record then write that record in to other o/p file(gdg), else write in to empty file.


i would be thankful to u all, if u send me the solution of it.

note: already i received the logic based on DFSORT, but i need the cobol logic.

its urgent

with thanks
saru
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sun Feb 27, 2005 6:08 am
Reply with quote

Saru,

I took the time to help you with your problem and you didn't even have the courtesy to reply, not to mention thank me for taking the time.

Have you taken the time to ATTEMPT a solution yourself? If so, why don't you share it with us? Maybe it will convince someone that you're worthy of their help.
Back to top
View user's profile Send private message
saru

New User


Joined: 17 Feb 2005
Posts: 4

PostPosted: Mon Feb 28, 2005 6:07 pm
Reply with quote

can any body send/tell me the COBOL LOGIC for the below given information.

requirement is as follows:
--------------------------------
i have a PS file 'FILE1', with 10000 records, each having some fields, one of the field is 'FIELD1' of size 10 bytes.

and now i want to read that ps-file records and search for 'indic' string . (this 'indic' is located in last 5 bytes of the 'FIELD1' variable.)

so if u find that in any record then write that record in to other o/p file(gdg), else write in to empty file.


i would be thankful to u all, if u send me the solution of it.

note: already i received the logic based on DFSORT, but i need the cobol logic.

its urgent

with thanks
saru
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Sun Mar 06, 2005 12:19 am
Reply with quote

Hi Saru,

Have you given any thought to trying to do this yourself? It might be rewarding and demonstrate that you're worthy of help.
Back to top
View user's profile Send private message
punith007
Warnings : 1

New User


Joined: 16 May 2006
Posts: 11
Location: INDIA

PostPosted: Wed Jul 19, 2006 7:21 pm
Reply with quote

You are right mmwife.

But Saru, you can try reference modification of the filed-1 for which you are trying to check the last 5 bytes

as like this: field-1(5:5)='indic' , then you can direct the record to the output file.. else..read next record..

first 5 = starting position which you would like to check
second 5 = length which you would like to check

under assumption that field-1 is 10 byte long


I hope this works.......

But Saru you must take some time for answering "mmwife"
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 -> Mainframe Interview Questions

 


Similar Topics
Topic Forum Replies
No new posts Capturing Job Execution Information All Other Mainframe Topics 3
No new posts Finding faulty logic Subscript out of... COBOL Programming 5
This topic is locked: you cannot edit posts or make replies. Need assistance in job scheduling logic. Mainframe Interview Questions 2
No new posts Extract all the TWS scheduler informa... IBM Tools 1
No new posts Table Information - DB2 DB2 1
Search our Forums:

Back to Top