View previous topic :: View next topic
|
Author |
Message |
pradyutonnet Currently Banned New User
Joined: 13 Nov 2005 Posts: 29 Location: pune,mumbai
|
|
|
|
superk wrote: |
That's a valid COBOL statement.
What specifically do you mean by "this is not working."?
I did a quick test with this program:
Code: |
CBL ARITH(EXTEND)
CBL NOADV,NODYN,NONAME,NONUMBER,QUOTE,SEQ,XREF,VBREF,DUMP,LIST
CBL TRUNC(OPT)
IDENTIFICATION DIVISION.
PROGRAM-ID. XXXXXXXX.
ENVIRONMENT DIVISION.
INPUT-OUTPUT SECTION.
DATA DIVISION.
FILE SECTION.
WORKING-STORAGE SECTION.
01 CONSOLE-DATA PIC X(80).
PROCEDURE DIVISION.
ACCEPT CONSOLE-DATA FROM CONSOLE.
DISPLAY CONSOLE-DATA.
MOVE 0 TO RETURN-CODE.
STOP RUN.
|
runtime output:
Code: |
08.12.31 JOB22654 ---- WEDNESDAY, 30 MAY 2007 ----
08.12.31 JOB22654 IRR010I USERID SUPERK IS ASSIGNED TO THIS JOB.
08.12.32 JOB22654 ICH70001I SUPERK LAST ACCESS AT 08:08:02 ON WEDNESDAY, MAY
08.12.32 JOB22654 $HASP373 SUPERK# STARTED - INIT 68 - CLASS T - SYS SYSB
08.12.32 JOB22654 IEF403I SUPERK# - STARTED - TIME=08.12.32
08.12.32 JOB22654 @12 IGZ0000I AWAITING REPLY
08.12.55 JOB22654 R 12,TEST
08.12.55 JOB22654 IEF404I SUPERK# - ENDED - TIME=08.12.55
08.12.55 JOB22654 $HASP395 SUPERK# ENDED
|
SYSOUT Output:
|
i have also coded the program in same way, but can any one tell me how to give input data to my program,no we need to add something in our jcl to pass TEST data to CONSOLE-DATA field in above cobol program,
from above example it is not clear from whr we are passing data "TEST". |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
pradyutonnet: first, any particular reason you're replying to a thread almost 2 years old instead of starting a new one?
Second, the input must be supplied by a system console command. If you don't have access to the console commands, your program will not be able to accept data from you -- only from the system operators. As suggested above, this is not considered standard programming practice at most shops since programmers are not allowed to request console interaction. |
|
Back to top |
|
|
pradyutonnet Currently Banned New User
Joined: 13 Nov 2005 Posts: 29 Location: pune,mumbai
|
|
|
|
Thanks Robert for your fast response:), actually in my client want us to use console command to accept data, can you tell me in detail what is system console command, how can i knw whether i have access to the console commands, In my company i checked we are using console logic in lots of program ,but m not aware from whr we are passing input to our field in Cobol. Also tell me if i do not have access to execute my program then do we have any alternate method to test my program(having console command) as i have coded the program as per the client requirement. |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
Back to top |
|
|
|