cobol program



Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

Re: cobol program

Postby jvinoth » Fri Jan 06, 2012 6:59 pm

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:
jvinoth
 
Posts: 132
Joined: Fri Nov 18, 2011 3:13 pm
Has thanked: 0 time
Been thanked: 1 time

Re: cobol program

Postby jvinoth » Fri Jan 06, 2012 7:02 pm

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....
jvinoth
 
Posts: 132
Joined: Fri Nov 18, 2011 3:13 pm
Has thanked: 0 time
Been thanked: 1 time

Re: cobol program

Postby Ed Goodman » Fri Jan 06, 2012 7:16 pm

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."
Ed Goodman
 
Posts: 341
Joined: Thu Feb 24, 2011 12:05 am
Has thanked: 3 times
Been thanked: 17 times

Re: cobol program

Postby enrico-sorichetti » Fri Jan 06, 2012 8:02 pm

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
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: cobol program

Postby BillyBoyo » Fri Jan 06, 2012 8:10 pm

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.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: cobol program

Postby dick scherrer » Fri Jan 06, 2012 11:55 pm

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.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: cobol program

Postby jvinoth » Mon Jan 09, 2012 12:03 pm

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
jvinoth
 
Posts: 132
Joined: Fri Nov 18, 2011 3:13 pm
Has thanked: 0 time
Been thanked: 1 time

Re: cobol program

Postby enrico-sorichetti » Mon Jan 09, 2012 1:01 pm

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:
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2994
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 164 times

Re: cobol program

Postby jvinoth » Mon Jan 09, 2012 1:21 pm

hello enrico i know to read and write a records.....guys i dont need answer so please dont post anything for this request....
jvinoth
 
Posts: 132
Joined: Fri Nov 18, 2011 3:13 pm
Has thanked: 0 time
Been thanked: 1 time

Re: cobol program

Postby Robert Sample » Mon Jan 09, 2012 5:40 pm

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
Robert Sample
Global moderator
 
Posts: 3719
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

PreviousNext

Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post