View previous topic :: View next topic
|
Author |
Message |
flyingSnail
New User
Joined: 15 Jun 2005 Posts: 5 Location: China
|
|
|
|
In order to self-study COBOL programming technique, I need to test some COBOL programs on my PC. But I don't know how to build such a environment. I need your help. Thank you |
|
Back to top |
|
|
lucky
New User
Joined: 01 Jun 2005 Posts: 12 Location: Croatia
|
|
|
|
Hi!
I think that the best way would be to get IBM VisualAge for COBOL, or Microfocus Net Express (ww.microfocus.com). They are both compatible with MF COBOL.
There are also some other solutions, like TinyCOBOL but they are compatilble with MF COBOL.
Check Mainframe Downloads
These are the ones I used... |
|
Back to top |
|
|
sudheer648
New User
Joined: 23 May 2005 Posts: 97 Location: Chennai
|
|
|
|
Hi flyingSnail,
I am pretty not sure how they compile in case of pc cobol.
But running is done with a command called RUNCOB i remember. |
|
Back to top |
|
|
flyingSnail
New User
Joined: 15 Jun 2005 Posts: 5 Location: China
|
|
|
|
Hi lucky and sudheer648,
Thanks for your help. Very happy to get your warm help. |
|
Back to top |
|
|
vishal_a
New User
Joined: 24 May 2005 Posts: 45 Location: Noida
|
|
|
|
hi
well it totally depends upon the compiler u have got . Since i have got a compiler which runs as
create a folder in any of your drive c: , d: with name as cobol
then on command prompt type cobol followed by filename saved with .cob extension.
After compiling type runcob followed by filename which has been compiled in previous step.
This will work
Regards
Vishal |
|
Back to top |
|
|
vini_srcna
Active User
Joined: 26 May 2005 Posts: 178 Location: Copenhagen, Denmark
|
|
|
|
hi,
iam having an idea to do it with cobol 85 compiler. but u should get the compiler from downloads. its approximately around 800kb. copy this compiler into any of ur drives(c,d..). after this go to command prompt and enter this compiler directory. type the command edit, u will get an editor where u can type in the cobol pgm after tat save it with a .cob extension. after these steps come back to dosprompt by using the keys Alt+f+x. then type the command cobol3 filename.cob now this shows the pgm along with errors and warnings . if its free of errors type the command crun3 filename (without extension) u will be able to see the output.
regards
vinay |
|
Back to top |
|
|
parikshit123
Active User
Joined: 01 Jul 2005 Posts: 269 Location: India
|
|
|
|
Hi,
I use microfocus cobol compiler for DOS/ windows.
Infact you can find a cobol compiler from
www.ibmmainframes.com/downloads.html
All you need to do is to extracts the zip file into your c: or d: ... drives
and then, open up your command prompt
1. Start--> run --> cmd ( for windows NT, xp, 2K)
and chage to your cobol directory
e.g.
c:\>cobol\
2. Edit your cobol program using your favourite editor , like EDIT, notepad ...etc.
3. To compile your programm,
cobol programname.cbl
it will give you three prompts for naming the obj , list etc files.
You can avoid this by putting semicolon after your command
cobol programname.cbl ;
4. You need to link your program
link programname ;
Note that you shouldn't include .cbl or .obj extension here in link command
5. If everything is okay, you should have programname.exe file generated which is your executible module.
Well, running Microfocus cobol compiler on unix boxes like IBM aix is little different
1. cob programname.cbl
or
cob -u programname.cbl
This compiles and links the program
2. runcob programname
This runs the program
Let me know if you need any further clarification. |
|
Back to top |
|
|
venu.pamulapati
New User
Joined: 23 Oct 2010 Posts: 5 Location: bangalore
|
|
|
|
Hi any body could u please send m th link how to work cobol compler in desktop ? |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Enrico ------------- statistics please |
|
Back to top |
|
|
venu.pamulapati
New User
Joined: 23 Oct 2010 Posts: 5 Location: bangalore
|
|
|
|
tx for sending the link mr.PeterHolland
one mor thing how work on this ?
is there any on line compiler to work cobol programs
? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
sorry for sleeping on the job
Code: |
The topic has been resurrected after
... 5 year(s) - (months difference / 12 )
... 5 year(s) - (difference )
... 64 months
... 1941 days
... 46601 hours
... 2796115 minutes
... 167766900 seconds
|
|
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
for those interested here the REXX script
Code: |
#!/opt/ooRexx/bin/rexx
numeric digits 24
parse arg how
tmsto = "Jul 10, 2005 7:33 pm "
tmstn = "Nov 03, 2010 1:28 pm"
parse var tmsto mnth gday "," year hh ":" mm pm
hh = right( hh // 12 , 2 , 0)
if pm = "pm" then ,
hh = right( hh + 12 , 2 , 0)
dateo = date("s", gday mnth year, "n") || "-" || hh || ":" || mm || ":00"
parse var tmstn mnth gday "," year hh ":" mm pm
hh = right( hh // 12 , 2 , 0)
if pm = "pm" then ,
hh = right( hh + 12 , 2 , 0)
daten = date("s", gday mnth year, "n") || "-" || hh || ":" || mm || ":00"
diff = d2s(daten) - d2s(dateo)
say.0 = 7
say "The topic has been resurrected after"
say.1 = "..." right(diff,10) ,
"seconds"
say.2 = "..." right(diff % ( 60 ),10) ,
"minutes"
say.3 = "..." right(diff % ( 60 * 60 ),10) ,
"hours"
say.4 = "..." right(diff % ( 60 * 60 * 24 ),10) ,
"days"
say.5 = "..." right(( substr(daten,1,4)*12 + substr(daten,5,2) ) - ,
( substr(dateo,1,4)*12 + substr(dateo,5,2) ),10) ,
"months"
say.6 = "..." right(substr(daten,1,4) - substr(dateo,1,4),10) ,
"year(s) - (difference )"
say.7 = "..." right(( ( substr(daten,1,4)*12 + substr(daten,5,2) ) - ,
( substr(dateo,1,4)*12 + substr(dateo,5,2) ) ) % 12,10) ,
"year(s) - (months difference / 12 )"
if how = "" then ,
parse value 1 say.0 "-1" with t f s
else ,
parse value 1 say.0 "1" with f t s
do i = f to t by s
say say.i
end
exit
d2s:procedure
parse arg dt
parse var dt d "-" h ":" m ":" s
return date("b",d,"s")*(24*60*60) + h * 60 * 60 + m * 60 + s
|
|
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
Enrico, where are the milli-seconds? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
I did not post the milliseconds because it was just a row with the seconds multiplied by 1000
no visual change in the rows pattern |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
Enrico,
that i understand. But multyplying by 1000 gives me a head ache. Please take my age in account. |
|
Back to top |
|
|
|