IBM MAINFRAME HELP & SUPPORT FORUMS
Technical Forums for IBM Mainframe Applications like COBOL, JCL, CICS, DB2, FileAid, DFSORT, Endevor, Xpediter, CoolGen, CA-7&11, AbendAid, IMS, IDMS, PL/I, MqSeries, SyncSort, Assembler, ChangeMan, Easytrieve, InterTest, REXX, CLIST etc...
 

Tell me the logic for the below given information

THIS IS AN ARCHIVE FORUM: CLICK HERE TO GO TO THE ORIGINAL TOPIC

 
       IBMMAINFRAMES.com - IBM Mainframe Support Forums Index -> Interview Questions
View previous topic :: View next topic  
Author Message
saru



Joined: 17 Feb 2005
Posts: 4

Posted: Thu Feb 17, 2005 12:21 pm    Post subject: Tell me the logic for the below given information  

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  
mmwife



Joined: 30 May 2003
Posts: 1508

Posted: Sun Feb 20, 2005 1:47 am    Post subject:  

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  
saru



Joined: 17 Feb 2005
Posts: 4

Posted: Mon Feb 21, 2005 11:08 am    Post subject: cobol logic  

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  
mmwife



Joined: 30 May 2003
Posts: 1508

Posted: Sun Feb 27, 2005 6:08 am    Post subject:  

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  
saru



Joined: 17 Feb 2005
Posts: 4

Posted: Mon Feb 28, 2005 6:07 pm    Post subject: cobol  

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  
mmwife



Joined: 30 May 2003
Posts: 1508

Posted: Sun Mar 06, 2005 12:19 am    Post subject:  

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  
punith007



Joined: 16 May 2006
Posts: 11

Posted: Wed Jul 19, 2006 7:21 pm    Post subject: Re: Tell me the logic for the below given information  

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  
 
       IBMMAINFRAMES.com - IBM Mainframe Support Forums Index -> Interview Questions
Page 1 of 1
THIS IS AN ARCIVE FORUM IN READ ONLY MODE. IF YOU WANT TO ASK YOUR DOUBTS USE THE ACTUAL FORUM