But is there any general way to proceed?
Yes -- talk to someone (teacher, fellow student, support person) using the mainframe you are using. As you were told, there are NO general procedures in place for compiling programs -- each site uses its own standards. This is because each site may use various products (or none) for source code management, debugging, analysis, and so forth. Each product imposes its own requirements on the compile process, so what is in place at one site will not be usable for another site that does not use that particular product. Even things like data set names for system files vary among sites -- some sites will place the COBOL compiler in IGY.V4R2M0.SIGYCOMP, some will use IGY.R420.SIGYCOMP, some will use IGY.SIGYCOMP, and there are plenty of other variations out there. Only someone using your site can possibly tell you about the variations in use there.
Um, is there any site from which i can get sample basic level(hello,addition,etc.) programs for COBOL?
There is a link to IBM Manuals at the top of this page. This forum will point you to the manuals, but it is expected that you will read (and understand as much as possible) yourself; we don't read manuals for you. Enterprise COBOL has the
Language Reference manual which gives you the syntax for the various COBOL statements, how data is stored by COBOL on the computer, and so forth. The
Programming Guide manual provides environmental information and includes sample program code.