Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple Question from a beginner

Status
Not open for further replies.

jonnyfugitive

Programmer
Feb 8, 2002
2
US
I am a beginner programmer wannabe attepting to work with my father-in-law on his IRS mainframe software. Meanwhile, trying not to ask him too many questions. So I thought i'd try this forum.

Problem: (this is soooooo elementary--- sorry guys)

When I code,

Data Division.
Working-Storage Section.
01 Frm-20S-Table-Item.
05 Frm-20S-Sched-A.
10 CF20S_A_TIN PIC X(10).

It won't compile because of the underscore character, the data item names are provided to me in this manner (w/underscore) and are sent from the main frame in this format. I know there is a simple way to use a "wildcard type" statement. But I can't seem to find it in my SAMs Teach Yourself COBOL Book. Oh, I'm using the CA-Realia II Workbench Ver. 3.0.59 Compiler.

Any help would be greatly appreciated,

Jonnyfuge

 
Replace the underscore characters with hyphen characters and you should be fine.
Tom Morrison
 
If I were to change the underscores to hyphens, would I include some code in the File I-O section to change them back to underscores on the output file. I need to retain the underscore.

Thank You.
 
Hi Jonny,

Say wot? I think you should copy & paste the whole pgm and let us see what you have. Why do you have underscores in the dataname? Are you using DB2? If so, that's a whole different ball of wax/can of worms/shootin' match/barrel of monkeys.

Also, you say:

...and are sent from the main frame in this format.

Sent by what? from where? via what? to what? Answers may give us a clue.

Regards, Jack.
 
The data names in your program are not 'sent' from the mainframe - it's the data that is sent. Your program just needs to map onto this data using a template, which is what the 01 level is. You could call the datanames anything you wanted, CFS01, apples, junk, whatever, because the data that field relates to will always be the same when you program gets it.
If someone has 'given' you a layout with underscores, use hyphens instead. It won't make any difference to the data in the fields they define.
 
Hello
What you will have in your output file is:
MichaelJor PamelaWall ....any thing that your variable is supposed to represent. CF20S_A_TIN represent data it is not the data.
"Y = 2.X" is a linear line equation , it is not the line it self.
 
Hi All,

The crux of the matter is that Jonny, understandably and self-admittedly, doesn't know what he's talking about.

The best thing for him to do is show us what he has, not what he thinks he has. E.g. code, specs, inputs, copybooks, etc. Atything he's using to make those statement he's made.
then, maybe, we can piece together an answer for him.

Regards, Jack.


 
Hi All,

The crux of the matter is that Jonny, understandably and self-admittedly, doesn't know what he's talking about.

The best thing for him to do is show us what he has, not what he thinks he has. E.g. code, specs, inputs, copybooks, etc. Anything he's using to make those statement he's made. Then, maybe, we can piece together an answer for him.

Regards, Jack.


 
Hi Jonny,

Just reread my post. I hope I didn't offend, it was just obvious that you're unfamiliar w/the pgming environment and what you think may be happening isn't. So, the info I mentioned could help.

Hope you'll take my advice and send it.

Regards, Jack.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top