Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Tell me the logic for the below given information

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions
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    Post subject: Tell me the logic for the below given information
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    Post subject:
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    Post subject: cobol logic
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    Post subject:
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    Post subject: cobol
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    Post subject:
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    Post subject: Re: Tell me the logic for the below given information
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    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Need help in building a logic Benchwarmer All Other Mainframe Topics 4 Wed Feb 22, 2017 2:49 am
No new posts Obtaining file information pahiker COBOL Programming 25 Tue Sep 27, 2016 7:25 pm
No new posts Wildcard logic in COBOL dudenithy COBOL Programming 13 Thu Sep 01, 2016 7:36 pm
No new posts Need information on COBOL MOVE CORRES... subratarec COBOL Programming 10 Tue Jun 28, 2016 10:38 pm
No new posts Passing information through JCL as in... Pia Baruah JCL & VSAM 5 Wed May 25, 2016 2:22 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us