Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to pass TEST data to CONSOLE-DATA

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics
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    Post subject: How to pass TEST data to CONSOLE-DATA
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: 7932
Location: Bellevue, IA

PostPosted: Wed Feb 25, 2009 9:25 pm    Post subject:
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    Post subject:
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: 2150
Location: At my coffee table

PostPosted: Wed Feb 25, 2009 11:56 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> All Other Mainframe Topics All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Storing huge volume of data, compare ... Pradeep K M All Other Mainframe Topics 3 Mon Jan 16, 2017 5:08 pm
No new posts how to recover an uncataloged VSAM da... archanamuthukrishnan All Other Mainframe Topics 3 Wed Jan 11, 2017 6:18 pm
No new posts HALDB data refresh/copy from producti... vineetanand2007 IMS DB/DC 1 Mon Jan 02, 2017 11:16 am
No new posts JES2 JEC: Use UNIX Pipes to Pass Data... Virendra Shambharkar JCL & VSAM 21 Tue Dec 20, 2016 6:55 pm
No new posts Is the 'prompt' data for the DSLIST p... Willy Jensen TSO/ISPF 2 Tue Dec 06, 2016 4:38 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us