Skip to main content

Problem:

When executing a program from command-line, and you need to pass the program a parameter, use: "accept dataname from command-line" which gathers the parameter following the program name typed at the prompt.

Resolution:

When you execute your program from a command prompt like this:

C:\\MYAPPS\\SYS4044B.EXE DAILY SUMMARY

define this variable in working-storage (the actual name isn't critical):

77  runTimeParameter pic x(255).

and use this statement in your procedure to collect the parameter:

    accept runTimeParameter from COMMAND-LINE

If you were to display runTimeParameter you would see this output:

    DAILY SUMMARY

KB19232 6/30/2004

Old KB# 7007