View previous topic :: View next topic
|
Author |
Message |
saru
New User
Joined: 17 Feb 2005 Posts: 4
|
|
|
|
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
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
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
New User
Joined: 17 Feb 2005 Posts: 4
|
|
|
|
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
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
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
New User
Joined: 17 Feb 2005 Posts: 4
|
|
|
|
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
Super Moderator
Joined: 30 May 2003 Posts: 1592
|
|
|
|
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 Warnings : 1 New User
Joined: 16 May 2006 Posts: 11 Location: INDIA
|
|
|
|
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 |
|
|
|