MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Pass console commands through a COBOL program !!

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
amit4u79
Beginner


Joined: 24 Oct 2005
Posts: 109
Topics: 36
Location: India

PostPosted: Tue Nov 01, 2005 10:48 pm    Post subject: Pass console commands through a COBOL program !! Reply with quote

How do I pass console commands for e.g. D A,L thru a Batch COBOL program ?? Is it possible ??
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Wed Nov 02, 2005 1:01 am    Post subject: Reply with quote

What task exactly are you trying to accomplish? Are you writing operations automation software or do you just want to see what is running? If you are writing automation software, then COBOL is definitely not your best choice of languages since you probably need authorization and the ability to issue SVCs directly. But if all you are wanting is to find out what is running in the system, you can just chase control blokcks (CVT -> ASVT -> ASCBs etc). The control blocks are documented in the Data Areas books for MVS and there are probably several COBOL examples here and elsewhere that you can use. I know there are several Rexx execs around that run these control blocks. I just modified one of them last week for someone to find the racf id associated with each job/address space/user.

If you run your job under TSO (IKJEFTxx) and have console authority, you can use the CONSOLE command to issue commands. Trapping the output is tricky and I suspect it can only be done in assembler, but that may not be true. Output trapping is trivial in Rexx for most commands. I never tried to trap CONSOLE commands.
Back to top
View user's profile Send private message Visit poster's website
amit4u79
Beginner


Joined: 24 Oct 2005
Posts: 109
Topics: 36
Location: India

PostPosted: Wed Nov 02, 2005 1:26 am    Post subject: Reply with quote

Hey semigeezer, I am presently working on Automation for console and the query I have posted is not related to Automation software(AF/Operator) I am working on. Actually I just wanted to issue any operator command say (D A,L) or (D NET,ID=) or say any OPER Command on the console. I just went thru ASVT CVT and ASCB Data Areas book and found no good example or any idea about how to use it in a COBOL Code. Presently we use REXX for our Automation needs and I was just trying to explore the SVC Calls from COBOL to achieve the OPER functionality.
Would be of help if you could let me know some examples.

Thanks,
- Amit Joshi.
_________________
I did not fail; I have found 10,000 ways that would not work - Albert Einstein.
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12378
Topics: 75
Location: San Jose

PostPosted: Wed Nov 02, 2005 5:33 am    Post subject: Reply with quote

amit4u79,

Why not create a JCL with the console commands in your cobol pgm and submit via intrdr?

check this link for examples

http://www.mvsforums.com/helpboards/viewtopic.php?t=444&highlight=intrdr

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group