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

I want a job to get input from user in run time.


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

New User


Joined: 21 May 2007
Posts: 7
Location: Chennai

PostPosted: Wed May 30, 2007 11:10 am
Reply with quote

Hi..,
Anyone of you Could you please send me one Run JCL to get the input data from the user during time instead passing the input values through SYSIN from the run JCL..

I am using IBM390 MVS z/os. icon_smile.gif
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed May 30, 2007 11:23 am
Reply with quote

Nope, can not be done
Back to top
View user's profile Send private message
priyadutta1984

New User


Joined: 02 Apr 2007
Posts: 11
Location: chennai

PostPosted: Wed May 30, 2007 12:36 pm
Reply with quote

i dont think so its possible.make it ur query little bit clear.
u can pass the input thru parm and sysin card to the program.
cheers
priya
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Wed May 30, 2007 3:06 pm
Reply with quote

Chandrasekhar,

Quote:
Anyone of you Could you please send me one Run JCL to get the input data from the user during time instead passing the input values through SYSIN from the run JCL..


Does this mean, your program accepts the value from the terminal?
Back to top
View user's profile Send private message
MChandrasekar

New User


Joined: 21 May 2007
Posts: 7
Location: Chennai

PostPosted: Wed May 30, 2007 3:19 pm
Reply with quote

yes..,
My program has to ACCEPT the input value from the user in mainframe terminal.
Back to top
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Wed May 30, 2007 3:56 pm
Reply with quote

Chandrasekar,

Use ACCEPT var-name FROM CONSOLE in COBOL. Theortically it waits for user input from console. But I have not tried this before. Try and let us know the result.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Wed May 30, 2007 4:01 pm
Reply with quote

It works, but there is a 99.99 % chance that the operator will cancel the job
regards

P.S.

console input is not considered a good interface/programming standard
Back to top
View user's profile Send private message
MChandrasekar

New User


Joined: 21 May 2007
Posts: 7
Location: Chennai

PostPosted: Wed May 30, 2007 5:33 pm
Reply with quote

Use ACCEPT var-name FROM CONSOLE in COBOL.

this is not working.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Wed May 30, 2007 5:45 pm
Reply with quote

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     
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed May 30, 2007 6:21 pm
Reply with quote

Isn't this accepting input from the master console rather than the users terminal.

If so, doesn't this mean that the operations people will need to supply the response rather than the user ?

Unless of course it is carte blanche for all users to reply to system messages on the system ............................. icon_evil.gif
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Wed May 30, 2007 6:26 pm
Reply with quote

expat wrote:
Isn't this accepting input from the master console rather than the users terminal.


Yes, of course.

expat wrote:
If so, doesn't this mean that the operations people will need to supply the response rather than the user?


Not necessarily.

expat wrote:
Unless of course it is carte blanche for all users to reply to system messages on the system


It's allowed in our shop.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Wed May 30, 2007 7:21 pm
Reply with quote

Hello,

For this
Quote:
Anyone of you Could you please send me one Run JCL to get the input data from the user during time instead passing the input values through SYSIN from the run JCL..
i'd suggest providing the user(s) with a CICS transaction that would read the value from the terminal, edit it as appropriate, and then submit JCL that included the user-supplied input through the internal reader.

Somewhere between many and most data center operations do not allow console interaction with application code.
Quote:
Use ACCEPT var-name FROM CONSOLE in COBOL.

this is not working.
what does "not working" mean? Even if it works, how is the interface between the user who is running the job and the console operator to be handled? I do not recall any site that allows business users to reply to operator console messages - system support folks yes, but business users, no icon_confused.gif Seems like that would be extremely dangerous.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Wed May 30, 2007 7:31 pm
Reply with quote

Quote:
It's allowed in our shop.

What, absolutely anyone can respond to console messages icon_eek.gif icon_eek.gif icon_eek.gif

It only takes one inquisitive person to reply to the wrong message, and maybe the production system drops. Once had a programmer do a $P command to see what it does ...................... needless to say he found out, just before being hoofed out.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Wed May 30, 2007 7:35 pm
Reply with quote

Reply to a WTOR, yes. Issue an MVS or JES command, limited and to only certain commands based on roles.
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 Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts To get the the current time DFSORT/ICETOOL 13
No new posts RC query -Time column CA Products 3
No new posts PuTTY - "User is not a surrogate... IBM Tools 5
No new posts C Compile time time stamps Java & MQSeries 10
Search our Forums:

Back to Top