Subject: | |
From: | |
Reply To: | |
Date: | Tue, 31 Dec 1996 15:40:41 GMT |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Don,
we call quiz, quick, etc for various reasons from inside our cobol by just
issuing a file equation that points to the Quiz source (and the quiz source
must have a GO and EXIT), then run Quiz.whatever and when the Quiz is done,
reset the file equation that pointed tot he Quiz source.
here is a sample program:
(i included the copylibs source)
identification division.
program-id. smalprog.
data division.
working-storage section.
* copy CICMDVS.
*********************************************************
**
** COPYLIB ENTRY: CICMDVS **
** AUTHOR: ERIC KUNDL **
** Constants and Variables used when calling **
** HP Command Intrinsic. **
** used with copylib CICMDS **
*********************************************************
01 CiCommandLine.
05 CiCommand pic x(200) value spaces.
05 pic x(01) value %15.
01 CiParm pic s9(04) comp.
01 CiPrintAllMsgs pic s9(04) comp value +0.
01 CiPrintWarnMsgs pic s9(04) comp value +1.
01 CiPrintNoMsgs pic s9(04) comp value +2.
01 CiError pic s9(04) comp.
procedure division.
begin.
move "FILE QUIZUSE=QSOURCE.PUB" TO CiCommand
compute CiError = 0
compute CiParm = 0
perform CallCommand-AllMsgs
move "RUN QUIZ.CURRENT.COGNOS;info='NOLIST'" to CiCommand
compute CiError = 0
compute CiParm = 0
perform CallCommand-AllMsgs
move "RESET QUIZUSE" TO CiCommand
compute CiError = 0
compute CiParm = 0
perform CallCommand-AllMsgs
stop run.
* copy CICMDS.
*********************************************************
**
** COPYLIB ENTRY: CICMDS **
** AUTHOR: ERIC KUNDL **
** Paragraphs to call HPCICOMMAND. **
** Use with the copylib: CICMDVS **
*********************************************************
CallCommand-AllMsgs.
call intrinsic "HPCICOMMAND" using CiCommandLine
CiError
CiParm
CiPrintAllMsgs
end-call.
CallCommand.
call intrinsic "HPCICOMMAND" using CiCommandLine
CiError
CiParm
CiPrintNoMsgs
end-call.
/
hope this helped.
--
eric kundl
[log in to unmask]
Don Paterwic <[log in to unmask]> wrote in article
<[log in to unmask]>...
> can this be done? I have a cobol program that need to get a
> unique identifier, one that is already generated on the system
> by a quiz program (if I can use it I don't need to worry about
> logic to replicate number). Is it posssible to call this quiz
> program (executable) from a cobol program and use quizes output
> result to a file? Thanks
>
|
|
|