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 

View and modify JCL and submit the job through rexx
Goto page 1, 2  Next
 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
vijay_pampana
Beginner


Joined: 11 Nov 2008
Posts: 9
Topics: 2

PostPosted: Wed Nov 12, 2008 5:02 am    Post subject: View and modify JCL and submit the job through rexx Reply with quote

Hi,

I am written a REXX tool which will open a PS file in view mode containing a JCL. The user can make all the changes in the JCL and submits the Job.

Code:
ADDRESS ISPEXEC "VIEW DATASET('"FILE1"')"


Where FIle1 contains the dataset that the user want to view.

When I make any changes to the JCL which is opened in the view mode, I could able to come out of the PS file as it is giving a error message. After submitting the code when I press CANCEL and ENTER it is giving the following error message.
INVALID COMMAND

When I used the EDIT mode it is working for me but I want to make sure there are no changes to the JCL's

Thanks
--Vijay
Back to top
View user's profile Send private message
dbzTHEdinosauer
Supermod


Joined: 20 Oct 2006
Posts: 1411
Topics: 26
Location: germany

PostPosted: Wed Nov 12, 2008 5:14 am    Post subject: Reply with quote

what commands in your REXX tool follow the 'VIEW' command in your post?
_________________
Dick Brenholtz
American living in Varel, Germany
Back to top
View user's profile Send private message
vijay_pampana
Beginner


Joined: 11 Nov 2008
Posts: 9
Topics: 2

PostPosted: Wed Nov 12, 2008 5:32 am    Post subject: Reply with quote

Please find the code below.
If the option entered by the user V it comes this IF condition

Code:
ELSE IF RESETSWITCH = 'V' THEN DO                                 
    FILE10 = FILE1'('JOBNAME')'                                   
    ADDRESS ISPEXEC "VIEW DATASET('"FILE10"')"                   
    SAY "PLEASE PROVIDE THE JOB DETAILS OF THE SUBMITTED JOB"     
    PULL DETAILS                                                 
    PARSE VAR DETAILS JOBNAM1 "(" JOBID ")" .                     


Thanks
--Vijay
Back to top
View user's profile Send private message
vijay_pampana
Beginner


Joined: 11 Nov 2008
Posts: 9
Topics: 2

PostPosted: Wed Nov 12, 2008 5:34 am    Post subject: Reply with quote

As the job is submitted by the user you need to provide the jobname and jobid details to the rexx program so that it will place them in the PS file for debugging later.
Back to top
View user's profile Send private message
Dibakar
Advanced


Joined: 02 Dec 2002
Posts: 700
Topics: 63
Location: USA

PostPosted: Wed Nov 12, 2008 4:43 pm    Post subject: Reply with quote

Quote:

INVALID COMMAND


What is the complete error message. Press PF1 and find the complete error.
Back to top
View user's profile Send private message Send e-mail
Santlou
Beginner


Joined: 18 Apr 2007
Posts: 21
Topics: 4
Location: sw florida

PostPosted: Wed Nov 12, 2008 6:18 pm    Post subject: Reply with quote

As an alternative, why don't you use a skeleton file and use ISPF File Tailoring to edit the JCL. This way, you can keep the JCL in the skeleton library and substitute the required Jobcard info dynamically.
Back to top
View user's profile Send private message
vijay_pampana
Beginner


Joined: 11 Nov 2008
Posts: 9
Topics: 2

PostPosted: Wed Nov 12, 2008 10:54 pm    Post subject: Reply with quote

The complete error message which displayed when I entered the PF1 key is:


Only ISPF system commands may be entered on this panel.

I know the alternative of using skels for this, but I want to know why it is not working in view.
Back to top
View user's profile Send private message
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Thu Nov 13, 2008 3:25 pm    Post subject: Reply with quote

When you say 'press CANCEL and ENTER' do you mean tyoe CANCEL and press ENTER? If not then it is probably objecting to the CANCEL key - unless that is an FKey that has CANCEL assigned to it. But you would not need the ENTER key if it was an Fkey.
_________________
Utility and Program control cards are NOT, repeat NOT, JCL.
Back to top
View user's profile Send private message
vijay_pampana
Beginner


Joined: 11 Nov 2008
Posts: 9
Topics: 2

PostPosted: Thu Nov 13, 2008 8:23 pm    Post subject: Reply with quote

I am facing the same issue when I am using PF3 and Enter also.
Back to top
View user's profile Send private message
vijay_pampana
Beginner


Joined: 11 Nov 2008
Posts: 9
Topics: 2

PostPosted: Mon Nov 17, 2008 5:36 am    Post subject: Reply with quote

When I type RETP I found only the valid command entered, But I am not sure why this error is coming to me.
Back to top
View user's profile Send private message
warp5
Intermediate


Joined: 02 Dec 2002
Posts: 429
Topics: 18
Location: Germany

PostPosted: Tue Nov 18, 2008 2:00 am    Post subject: Reply with quote

Why don't you just put a "trace r" statement before the view and then a "trace o" after the parse and observe where the problem is occuring?
Back to top
View user's profile Send private message Visit poster's website
vijay_pampana
Beginner


Joined: 11 Nov 2008
Posts: 9
Topics: 2

PostPosted: Tue Nov 18, 2008 5:41 am    Post subject: Reply with quote

Hi Warp5,

I need to first come out of view mode to see what is problem is with rexx. I even tried with all the traces but they are only useful when you come back from view mode back to the rexx program. The problem here is, I am not able to come back to rexx program from jcl opened in the view mode.

Thanks
--Vijay
Back to top
View user's profile Send private message
warp5
Intermediate


Joined: 02 Dec 2002
Posts: 429
Topics: 18
Location: Germany

PostPosted: Wed Nov 19, 2008 1:55 am    Post subject: Reply with quote

When you are in view mode and make any changes to the job being viewed you can only leave after entering cancel and then PF3 or PF3 and then Enter. This is the way view works.
Back to top
View user's profile Send private message Visit poster's website
Dibakar
Advanced


Joined: 02 Dec 2002
Posts: 700
Topics: 63
Location: USA

PostPosted: Wed Nov 19, 2008 8:09 am    Post subject: Reply with quote

warp5,

I think Vijay knows that he has to cancel it, it seems he is getting problem with cancel command.

Diba
Back to top
View user's profile Send private message Send e-mail
jim haire
Beginner


Joined: 30 Dec 2002
Posts: 140
Topics: 40

PostPosted: Wed Nov 19, 2008 1:24 pm    Post subject: Reply with quote

When I am in view mode within a file and make a change, I could then submit a job.

However, View is not like Edit where you need to enter "cancel" so the changes don't take place. I believe you could code an ADDRESS ISREDIT followed by an "END" command (essentially a PF3) after you have left the dataset you are viewing.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Goto page 1, 2  Next
Page 1 of 2

 
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