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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SELECT-CLAUSE PROBLEM 1

Status
Not open for further replies.

srkss

Programmer
May 24, 2001
10
0
0
IN
hi all,
i am new to cobol programming and assigned project in cobol on as/400 platform...i studied that for every file handled in a cobol program you have to first assign it to a dummy file name and then use those file name variables in the program..one day our manager asked this question: is it possible to use a file without defining any temporary variables (i.e dummy file names)....i am not sure about this.. can someone clear me on this????
Thank you
 
srkss,

dummy names ?!! I think you refer to the following FILE-CONTROL clause:

SELECT SPECS ASSIGN TO BS154O01.

This is a mainframe example, so your AS/400 naming conventions might differ, but anyway.
SPECS is the internal name for this file (rather than a "dummy" name).
It is indeed a standard COBOL construct for handling files, and i don't know of another way to do it, neither can i think of any reason why you would want to do so.
Tell your manager to stick to managing and leave the programming to the pro's ... ;-)
 
Naming conventions in Cobol/400 are pretty much the same as in Mainframe cobol.

You still need an internal name reference for your file, it does not really matter what you call the thing as long as you associate the internal name with the actual file name with your select assign statement.

Don't forget, the select assign statement is also used to specify the type of access you require of the file, so it cannot be ignored.

Speaking as an AS400 programmer though, why don't you forget Cobol and give RPG a bash. It is a much more powerful language for the AS400 (although slightly more difficult to learn).
 
hi ronald and pipk,
thanx for answering my question....actually ronald...that was just to know our cobol knowledge he asked..


and pipk: of course RPG is there and i feel RPG is more easier than this dumb COBOL..but what to do our project asks for 75% of Cobol only....we have no other go...

Regards,
srkss
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top