IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

How to pass TEST data to CONSOLE-DATA


IBM Mainframe Forums -> All Other Mainframe Topics
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
pradyutonnet
Currently Banned

New User


Joined: 13 Nov 2005
Posts: 29
Location: pune,mumbai

PostPosted: Wed Feb 25, 2009 9:15 pm
Reply with quote

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:

Code:

TEST     




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
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Wed Feb 25, 2009 9:25 pm
Reply with quote

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
View user's profile Send private message
pradyutonnet
Currently Banned

New User


Joined: 13 Nov 2005
Posts: 29
Location: pune,mumbai

PostPosted: Wed Feb 25, 2009 11:49 pm
Reply with quote

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
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Wed Feb 25, 2009 11:56 pm
Reply with quote

Have you looked at Table 5. Meanings of environment names in the SPECIAL-NAMES paragraph?
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> All Other Mainframe Topics

 


Similar Topics
Topic Forum Replies
No new posts How to save SYSLOG as text data via P... All Other Mainframe Topics 2
No new posts Store the data for fixed length COBOL Programming 1
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts SCOPE PENDING option -check data DB2 2
No new posts Check data with Exception Table DB2 0
Search our Forums:

Back to Top