Gods Of COBOL
-
anybody here know COBOL ? what does this do?
01 MEMORY-AREA-ONE PIC X(2816). 01 REDEFINES MEMORY-AREA-ONE. 05 K01-1 OCCURS 37 TIMES INDEXED BY K01-1-X PIC 9(04) COMP-5. 05 K02-1 OCCURS 1369 TIMES INDEXED BY K02-1-X PIC 9(04) COMP-5.
i thought i understood what redefine and occurs meant, but i can't figure out what this declaration does. (funny answers are welcome!)
-
anybody here know COBOL ? what does this do?
01 MEMORY-AREA-ONE PIC X(2816). 01 REDEFINES MEMORY-AREA-ONE. 05 K01-1 OCCURS 37 TIMES INDEXED BY K01-1-X PIC 9(04) COMP-5. 05 K02-1 OCCURS 1369 TIMES INDEXED BY K02-1-X PIC 9(04) COMP-5.
i thought i understood what redefine and occurs meant, but i can't figure out what this declaration does. (funny answers are welcome!)
You may want to call AARP[^], I am pretty sure 90% of cobol programmers are members. :)
My .NET Business Application Framework My Younger Son & His "PET"
-
anybody here know COBOL ? what does this do?
01 MEMORY-AREA-ONE PIC X(2816). 01 REDEFINES MEMORY-AREA-ONE. 05 K01-1 OCCURS 37 TIMES INDEXED BY K01-1-X PIC 9(04) COMP-5. 05 K02-1 OCCURS 1369 TIMES INDEXED BY K02-1-X PIC 9(04) COMP-5.
i thought i understood what redefine and occurs meant, but i can't figure out what this declaration does. (funny answers are welcome!)
That's a program fragment? It looks like the results a program run as opposed to actual syntax. Bizarre. Glad I never had to deal with COBOL. Makes FORTRAN look absolutely svelte in comparison!
¡El diablo está en mis pantalones! ¡Mire, mire! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF! Personal 3D projects Just Say No to Web 2 Point Blow
-
You may want to call AARP[^], I am pretty sure 90% of cobol programmers are members. :)
My .NET Business Application Framework My Younger Son & His "PET"
-
anybody here know COBOL ? what does this do?
01 MEMORY-AREA-ONE PIC X(2816). 01 REDEFINES MEMORY-AREA-ONE. 05 K01-1 OCCURS 37 TIMES INDEXED BY K01-1-X PIC 9(04) COMP-5. 05 K02-1 OCCURS 1369 TIMES INDEXED BY K02-1-X PIC 9(04) COMP-5.
i thought i understood what redefine and occurs meant, but i can't figure out what this declaration does. (funny answers are welcome!)
I'm guessing that is a buffer for a transfer protocol or a binary file format. I had to deal with such things ages ago when I had to interface with a tandem mainframe. (1369+37)*2 = 2812 so I think it is a bunch of 2 byte integers with 4 bytes left over.
I can imagine the sinking feeling one would have after ordering my book, only to find a laughably ridiculous theory with demented logic once the book arrives - Mark McCutcheon
-
anybody here know COBOL ? what does this do?
01 MEMORY-AREA-ONE PIC X(2816). 01 REDEFINES MEMORY-AREA-ONE. 05 K01-1 OCCURS 37 TIMES INDEXED BY K01-1-X PIC 9(04) COMP-5. 05 K02-1 OCCURS 1369 TIMES INDEXED BY K02-1-X PIC 9(04) COMP-5.
i thought i understood what redefine and occurs meant, but i can't figure out what this declaration does. (funny answers are welcome!)
Chris Losinger wrote:
MEMORY-AREA-ONE
Nah, I forgot. :-D
-
That's a program fragment? It looks like the results a program run as opposed to actual syntax. Bizarre. Glad I never had to deal with COBOL. Makes FORTRAN look absolutely svelte in comparison!
¡El diablo está en mis pantalones! ¡Mire, mire! SELECT * FROM User WHERE Clue > 0 0 rows returned Save an Orange - Use the VCF! Personal 3D projects Just Say No to Web 2 Point Blow
yeah, it's amazingly verbose. i have to translate a bunch into C/C++ and i'm learning as i go. but this bit makes no sense to me.
-
anybody here know COBOL ? what does this do?
01 MEMORY-AREA-ONE PIC X(2816). 01 REDEFINES MEMORY-AREA-ONE. 05 K01-1 OCCURS 37 TIMES INDEXED BY K01-1-X PIC 9(04) COMP-5. 05 K02-1 OCCURS 1369 TIMES INDEXED BY K02-1-X PIC 9(04) COMP-5.
i thought i understood what redefine and occurs meant, but i can't figure out what this declaration does. (funny answers are welcome!)
Chris Losinger wrote:
anybody here know COBOL ?
I'd learn it, but... well... Some things just aren't meant to be done without large amounts of illegal drugs, and I'm not into that.
Proud to have finally moved to the A-Ark. Which one are you in?
Author of the Guardians Saga (Sci-Fi/Fantasy novels) -
I'm guessing that is a buffer for a transfer protocol or a binary file format. I had to deal with such things ages ago when I had to interface with a tandem mainframe. (1369+37)*2 = 2812 so I think it is a bunch of 2 byte integers with 4 bytes left over.
I can imagine the sinking feeling one would have after ordering my book, only to find a laughably ridiculous theory with demented logic once the book arrives - Mark McCutcheon
Andy Brummer wrote:
a bunch of 2 byte integers with 4 bytes left over
hmm... yeah, i suppose that could be it. the 'leftover bytes' feels stupid and wrong, but maybe i should just get over that... i'll give it a try!
image processing toolkits | batch image processing
modified on Friday, April 9, 2010 4:38 PM
-
anybody here know COBOL ? what does this do?
01 MEMORY-AREA-ONE PIC X(2816). 01 REDEFINES MEMORY-AREA-ONE. 05 K01-1 OCCURS 37 TIMES INDEXED BY K01-1-X PIC 9(04) COMP-5. 05 K02-1 OCCURS 1369 TIMES INDEXED BY K02-1-X PIC 9(04) COMP-5.
i thought i understood what redefine and occurs meant, but i can't figure out what this declaration does. (funny answers are welcome!)
My eyes keep glazing over while trying to read this. I tried sending it through Babel Fish, but it didn't do any good. I'll just guess that it means:
int main()
{
puts("Hello World");
} -
yeah, it's amazingly verbose. i have to translate a bunch into C/C++ and i'm learning as i go. but this bit makes no sense to me.
Chris Losinger wrote:
yeah, it's amazingly verbose.
Invented by a woman, don't you know? I'm just saying, that's all.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith
As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
-
anybody here know COBOL ? what does this do?
01 MEMORY-AREA-ONE PIC X(2816). 01 REDEFINES MEMORY-AREA-ONE. 05 K01-1 OCCURS 37 TIMES INDEXED BY K01-1-X PIC 9(04) COMP-5. 05 K02-1 OCCURS 1369 TIMES INDEXED BY K02-1-X PIC 9(04) COMP-5.
i thought i understood what redefine and occurs meant, but i can't figure out what this declaration does. (funny answers are welcome!)
As far as I can tell, it means that the chances of you using COBOL to stop the nuclear countdown in 24 is going to be slim. Jack Bauer: "Dammit Chloe. I need aerial surveilance now." Chloe: "I'm trying Jack. I'm still only halfway through the declaration section."
"WPF has many lovers. It's a veritable porn star!" - Josh Smith
As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
-
anybody here know COBOL ? what does this do?
01 MEMORY-AREA-ONE PIC X(2816). 01 REDEFINES MEMORY-AREA-ONE. 05 K01-1 OCCURS 37 TIMES INDEXED BY K01-1-X PIC 9(04) COMP-5. 05 K02-1 OCCURS 1369 TIMES INDEXED BY K02-1-X PIC 9(04) COMP-5.
i thought i understood what redefine and occurs meant, but i can't figure out what this declaration does. (funny answers are welcome!)
Might be worthwhile running it through a COBOL to C translator. Then maybe you can make sense of the C code.
Jeremy Falcon
-
anybody here know COBOL ? what does this do?
01 MEMORY-AREA-ONE PIC X(2816). 01 REDEFINES MEMORY-AREA-ONE. 05 K01-1 OCCURS 37 TIMES INDEXED BY K01-1-X PIC 9(04) COMP-5. 05 K02-1 OCCURS 1369 TIMES INDEXED BY K02-1-X PIC 9(04) COMP-5.
i thought i understood what redefine and occurs meant, but i can't figure out what this declaration does. (funny answers are welcome!)
This is nothing more than a string (alphanumeric) 2816 characters
Chris Losinger wrote:
01 MEMORY-AREA-ONE PIC X(2816).
that second section
Chris Losinger wrote:
01 REDEFINES MEMORY-AREA-ONE. 05 K01-1 OCCURS 37 TIMES INDEXED BY K01-1-X PIC 9(04) COMP-5. 05 K02-1 OCCURS 1369 TIMES INDEXED BY K02-1-X PIC 9(04) COMP-5.
Pic 9(04) COMP-5 is a 4 byte numeric stored in machine independent format Essentially, those two lines redefine the space originally defined by MEMORY-AREA-ONE into two blocks of unsigned 16-bit integers. I cannot recall what the INDEXED allows you to do anymore ... Not sure any of that helps you ... [edit] You might also considering hitting up the COBOL User Groups[^] for help with this, and/or other COBOL related issues you might have. Just a thought.
:..::. Douglas H. Troy ::..
Bad Astronomy |VCF|wxWidgets|WTLmodified on Friday, April 9, 2010 5:51 PM
-
anybody here know COBOL ? what does this do?
01 MEMORY-AREA-ONE PIC X(2816). 01 REDEFINES MEMORY-AREA-ONE. 05 K01-1 OCCURS 37 TIMES INDEXED BY K01-1-X PIC 9(04) COMP-5. 05 K02-1 OCCURS 1369 TIMES INDEXED BY K02-1-X PIC 9(04) COMP-5.
i thought i understood what redefine and occurs meant, but i can't figure out what this declaration does. (funny answers are welcome!)
Hi Chris, you are aware there are a couple of .NET COBOL compilers around? you might be lucky and have a look at the IL your source generates; and reflector might be willing to show you equivalent C# or VB.NET code. And maybe you don't need to translate it after all, just run it... :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
-
anybody here know COBOL ? what does this do?
01 MEMORY-AREA-ONE PIC X(2816). 01 REDEFINES MEMORY-AREA-ONE. 05 K01-1 OCCURS 37 TIMES INDEXED BY K01-1-X PIC 9(04) COMP-5. 05 K02-1 OCCURS 1369 TIMES INDEXED BY K02-1-X PIC 9(04) COMP-5.
i thought i understood what redefine and occurs meant, but i can't figure out what this declaration does. (funny answers are welcome!)
No cookie for you: COBOL is the only computer language invented by the Etrurians. :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles] -
Hi Chris, you are aware there are a couple of .NET COBOL compilers around? you might be lucky and have a look at the IL your source generates; and reflector might be willing to show you equivalent C# or VB.NET code. And maybe you don't need to translate it after all, just run it... :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]
Luc Pattyn wrote:
you are aware there are a couple of .NET COBOL compilers around?
Their authors should be flamed, immediately. :rolleyes:
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles] -
anybody here know COBOL ? what does this do?
01 MEMORY-AREA-ONE PIC X(2816). 01 REDEFINES MEMORY-AREA-ONE. 05 K01-1 OCCURS 37 TIMES INDEXED BY K01-1-X PIC 9(04) COMP-5. 05 K02-1 OCCURS 1369 TIMES INDEXED BY K02-1-X PIC 9(04) COMP-5.
i thought i understood what redefine and occurs meant, but i can't figure out what this declaration does. (funny answers are welcome!)
Isn't that part of the start up code for Cylons...oh wait, that's "Lords of Kobol" :laugh:
Steve _________________ I C(++) therefore I am
modified on Friday, April 9, 2010 5:55 PM
-
anybody here know COBOL ? what does this do?
01 MEMORY-AREA-ONE PIC X(2816). 01 REDEFINES MEMORY-AREA-ONE. 05 K01-1 OCCURS 37 TIMES INDEXED BY K01-1-X PIC 9(04) COMP-5. 05 K02-1 OCCURS 1369 TIMES INDEXED BY K02-1-X PIC 9(04) COMP-5.
i thought i understood what redefine and occurs meant, but i can't figure out what this declaration does. (funny answers are welcome!)
01 SORRY-CHRIS PIC YOUR-NAME(LANCELOT). 01 I-DON'T-KNOW. 05 IDK OCCURS 100 TIMES INDEXED BY I-REALLY-DON'T-KNOW PIC A-COLOUR(BLUE). 05 IDK-2 OCCURS 1520 TIMES INDEXED BY WHAT-IS-THE-CAPITAL-OF-ASSYRIA I-DON'T-KNOW-THAT(NONE).
Output is apparently "Arrrrrrrrrrrrrggggggggggghhhhhhhhhhhhhhhhhh!"
-
Andy Brummer wrote:
a bunch of 2 byte integers with 4 bytes left over
hmm... yeah, i suppose that could be it. the 'leftover bytes' feels stupid and wrong, but maybe i should just get over that... i'll give it a try!
image processing toolkits | batch image processing
modified on Friday, April 9, 2010 4:38 PM
4 bytes left over Maybe the 4 extra bytes are for the array index variables (K01-1-X & K02-1-X)
Steve _________________ I C(++) therefore I am