Page 2 of 3

Re: cobol program

PostPosted: Fri Jan 06, 2012 6:59 pm
by jvinoth
Robert Sample wrote:
i asked sample code as well if can please post ..
Should we discuss arrangements for you to PAY for this code? If you are not willing to pay for the code, then do not ask for code. If you're willing to pay for the code, I'll even give you a flat rate discount -- $1000 (U.S.) for the program.

:lol:

Re: cobol program

PostPosted: Fri Jan 06, 2012 7:02 pm
by jvinoth
i didn't ask u particularly k....so do your work......no need to post mine...other persons who can help me they ll do got it....

Re: cobol program

PostPosted: Fri Jan 06, 2012 7:16 pm
by Ed Goodman
Guys...this is so obviously a troll, stop talking to them. I'm guessing end of the week, a bunch of folks gathered around a screen after one of them says, "Hey, lets go poke the bears over at the mainframe forum!" They probably had a great time coming up with the dumbest question they could think of, then went into spastic giggles when someone suggested adding "Send sample code."

Re: cobol program

PostPosted: Fri Jan 06, 2012 8:02 pm
by enrico-sorichetti
while it is ok to ask for hints on the logic
it is plain wrong to ask for code
the people You bashed with Your stupid comments usually post guaranteed code
it means code tested and working...

so asking people to post code is asking them to do the work for which You are paid for

also how much the hint must be detailed depends on Your understanding and programming skills
if You cannot understand/devise how to read all the records of a dataset <compare> one byte and write an output record for a match
then You must go back for some basic training ...

why not start writing a simple program to copy a file and keep expanding it with a bit more logic at each step ?

for well documented cobol snippets see here
http://www.simotime.com
http://www.simotime.com/indextwo.htm
http://www.simotime.com/indexcbl.htm

Re: cobol program

PostPosted: Fri Jan 06, 2012 8:10 pm
by BillyBoyo
Here is some code. It's not Cobol, but it'll give an idea of the simplicity of the task you are undertaking with such poor results.

  OPTION COPY
  INCLUDE COND=(nn,1,CH,EQ,'S')


All you have to do is change nn to the start position of the name on your file, and find out what program will understand this code.

It is quite like 2 + 2. If you can't crack that, you need to do a lot of very basic work before tackling basic maths.

If you have someone to give you the code, why didn't you ask them first? And if they give it to you, they are doing you no favours as you will learn zero, rather than learning only-slightly-more-than-zero by following all the suggestions given to you.

When you find examples of the above code, you'll usually be lucky and even see sample JCL, which conquers your next challenge.

Re: cobol program

PostPosted: Fri Jan 06, 2012 11:55 pm
by dick scherrer
Hello jvinoth,

i asked sample code as well if can please post ..
i didn't ask u particularly k....so do your work......no need to post mine...other persons who can help me they ll do got it....
"Particularly " does not matter - you asked "us" to post the code. . . :( Which is completely inappropriate. If the code IS posted, it will be deleted as soon as possible.

If you intend to be a programmer, you need to program, not grab whatever you can from unknown sources. There are many people here who would help if you get stuck.

Suggest you write a bit of pseudo-code to understand the process flow and if you get stuck, post your pseudo-code here. Expect that not everyone will agree. . . . Once the code looks like it will work, convert this to real code, compile, and begin testing.

Re: cobol program

PostPosted: Mon Jan 09, 2012 12:03 pm
by jvinoth
hi,
I know how to read a record from a file but i dont know how to get a byte of character from a record and compare.
...thank you dick

Re: cobol program

PostPosted: Mon Jan 09, 2012 1:01 pm
by enrico-sorichetti
if You know how to read a file, You should also know how to write a WS/FD definition of the record layout, along the lines of ...
xx filler the number of chars/bytes before YOUR byte
xx YOURBYTE the proper picture for a one char/byte field
xx filler the number of chars/bytes to fill up the record size
if You cannot do that, my previou advice about going back for below basic training stands more than ever :mrgreen:

Re: cobol program

PostPosted: Mon Jan 09, 2012 1:21 pm
by jvinoth
hello enrico i know to read and write a records.....guys i dont need answer so please dont post anything for this request....

Re: cobol program

PostPosted: Mon Jan 09, 2012 5:40 pm
by Robert Sample
how to get a byte of character from a record and compare.
Research in the COBOL Language Reference manual:
1. Reference modification
2. the IF statement