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

How to accept logon id from batch file in to mf-cobol program

Status
Not open for further replies.

gongura

Programmer
Oct 28, 2002
7
US
Hi All,

Please let me know, how to accept logon id from batch file in to the mf-cobol program.

Thanks in advance,
Gongura.
 
Micro Focus COBOL uses a combination of DISPLAY and ACCEPT statements to retrieve environment variables (wherein you will find the login name). Look in your documentation for ENVIRONMENT-NAME and ENVIRONMENT-VALUE. Tom Morrison
 
Actually I don't think you can do an accept from a file. Choices would be to open, read and close the file OR to pass the login name as a command line parameter when invoking the program.

eg. MYPROG.exe MYPARM and then the program could accept the value from the command line. Syntax is ACCEPT data-name FROM COMMAND-LINE. the data-name would need to be defined in working storage. Clive
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top