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 

Submitting a JCL thru Cobol
Goto page 1, 2  Next
 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
avid_lrner
Beginner


Joined: 15 Apr 2005
Posts: 21
Topics: 9

PostPosted: Thu Jun 09, 2005 6:01 am    Post subject: Submitting a JCL thru Cobol Reply with quote

Hi,

Have to submit a JCL thru a Cobol program.

Following is the RUNJCL:

Code:
//RUNCOB  JOB (DFWFD,TST),'COPY',CLASS=S,                     
//        MSGCLASS=T,NOTIFY=&SYSUID                           
//JOBLIB  DD DSN=SYS2.LE370Z.PGMLIB,DISP=SHR                 
//        DD DSN=HFCP.LINKLIB,DISP=SHR                       
//************************************************************
//*  RUNS THE JCL IN THE COBOL PROGRAM COBJCL                 
//************************************************************
//COB    EXEC PGM=TESTPGM0                                   
//STEPLIB  DD  DSN=PICM.CP000000.FWF1.#000890.BLM,DISP=SHR   
//SYSPRINT DD  SYSOUT=*                                       
//DDMYJOB DD SYSOUT=(*,INTRDR)                               
//*                                                           


When I scan the JCL for errors, it says,
"PROGRAM "TESTPGM0" NOT FOUND"

Any ideas how to correct this???

Thanks for your time!

regards,
avid_lrner.
Back to top
View user's profile Send private message
avid_lrner
Beginner


Joined: 15 Apr 2005
Posts: 21
Topics: 9

PostPosted: Thu Jun 09, 2005 6:03 am    Post subject: Submitting a JCL thru Cobol Reply with quote

Sorry....in a hurry, i posted the query in the wrong Index.
Back to top
View user's profile Send private message
Dibakar
Advanced


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

PostPosted: Thu Jun 09, 2005 7:36 am    Post subject: Reply with quote

why do you have steplib and joblib when there is only one step. move your steplib library into joblib.
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


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

PostPosted: Thu Jun 09, 2005 8:20 am    Post subject: Reply with quote

Quote:

When I scan the JCL for errors, it says, "PROGRAM "TESTPGM0" NOT FOUND"


Avid_learner,

The message is self explanatory, the program TESTPGM0 is not found in the library "PICM.CP000000.FWF1.#000890.BLM". so specify the right loadlib library in the steplib. Also a dibakar mentioned , you can remove the joblib.

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
avid_lrner
Beginner


Joined: 15 Apr 2005
Posts: 21
Topics: 9

PostPosted: Fri Jun 10, 2005 6:08 am    Post subject: Submitting a JCL thru Cobol Reply with quote

Hi,

Thanks for correcting the error.

But, after rectifiying the mistake, i tried to run the program....

The jcl code is not being executed...

suggestions please!!!

regards,
avid_lrner.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Fri Jun 10, 2005 8:01 am    Post subject: Reply with quote

Quote:

The jcl code is not being executed... suggestions please!!!


avid_lrner,

How do you expect us to help you without any error/abend messages ? All we have is one liner that the code is not exceuted. We cannot see your pgm code or error messages. Remember that we aren't Psychics. So post the error messages.

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
avid_lrner
Beginner


Joined: 15 Apr 2005
Posts: 21
Topics: 9

PostPosted: Wed Jun 15, 2005 2:12 am    Post subject: Submitting a JCL thru Cobol Reply with quote

Sorry for the delayed response.

Here's the Code:

Code:

DATA DIVISION.                                           
WORKING-STORAGE SECTION.                                 
01 WS-VAR                           PIC 9(02) VALUE 10. 
*********************************************************
PROCEDURE DIVISION.                                     
*********************************************************
THIS PARAGRAPH CONTROLS THE PROGRAM'S MAIN PROCESSING   *
*********************************************************
A1000-MAIN-PARA.                                         
----------------                                         
     IF WS-VAR = 10                                     
         PERFORM C1000-PROCESS-PARA                     
            THRU C1000-EXIT                             
     ELSE                                               
         DISPLAY 'IF DID NOT SATISFY'                   
     END-IF.                                             
                                                         
     STOP RUN.                                           
***********************************************************   
*THIS PARAGRAPH SUBMITS A JCL                                 
***********************************************************   
 C1000-PROCESS-PARA.                                           
                                                               
       DISPLAY '//SUBJCL  JOB (aaaa,bbb),"TEST JOB",'.       
       DISPLAY '//         CLASS=k,MSGCLASS=p,MSGLEVEL=(1,1)'.
       DISPLAY '//STEP010  EXEC PGM=IEFBR14'.                 
       DISPLAY '//DELFILE  DD DSN=ppp.qqq.rrr,'.
       DISPLAY '//         DISP=(MOD,DELETE,DELETE),'.         
       DISPLAY '//         SPACE=(TRK,(0,0),RLSE)'.           
                                                               
 C1000-EXIT.                                                   
       EXIT.


When i ran the jcl to submit the Cobol pgm, the following was the SYSOUT :

//SUBJCL JOB (aaaa,bbb),"TEST JOB",
// CLASS=k,MSGCLASS=p,MSGLEVEL=(1,1)
//STEP010 EXEC PGM=IEFBR14
//DELFILE DD DSN=ppp.qqq.rrr,
// DISP=(MOD,DELETE,DELETE),
// SPACE=(TRK,(0,0),RLSE)


need suggestions to get that file deleted.

regards,
avid_lrner.
Back to top
View user's profile Send private message
Mervyn
Moderator


Joined: 02 Dec 2002
Posts: 415
Topics: 6
Location: Hove, England

PostPosted: Wed Jun 15, 2005 2:34 am    Post subject: Reply with quote

In your run JCL, change "//DDMYJOB" to "//SYSOUT".
_________________
The day you stop learning the dinosaur becomes extinct
Back to top
View user's profile Send private message
avid_lrner
Beginner


Joined: 15 Apr 2005
Posts: 21
Topics: 9

PostPosted: Wed Jun 15, 2005 5:57 am    Post subject: Submitting a JCL thru Cobol Reply with quote

Changed "//DDMYJOB" to "//SYSOUT"

But still, the file (as per the JCL code in the COBOL program)
-> ppp.qqq.rrr didn't get deleted.

any insights???
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Wed Jun 15, 2005 6:02 am    Post subject: Reply with quote

avid_lrner,

what is the error messages from SUBJCL ? check the sdsf for a jobnamed SUBJCL

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
avid_lrner
Beginner


Joined: 15 Apr 2005
Posts: 21
Topics: 9

PostPosted: Wed Jun 15, 2005 6:05 am    Post subject: Submitting a JCL thru Cobol Reply with quote

sorry...

here are the error messages:

IEFC620I UNIDENTIFIABLE CHARACTER " ON THE JOB STATEMENT
IEFC605I UNIDENTIFIED OPERATION FIELD

I guess, it's not taking the " in the Job card in the cobol program.

Code:

 ***********************************************************   
*THIS PARAGRAPH SUBMITS A JCL                                 
***********************************************************   
 C1000-PROCESS-PARA.                                           
                                                               
       DISPLAY '//SUBJCL  JOB (aaaa,bbb),"TEST JOB",'.       
       DISPLAY '//         CLASS=k,MSGCLASS=p,MSGLEVEL=(1,1)'.
       DISPLAY '//STEP010  EXEC PGM=IEFBR14'.                 
       DISPLAY '//DELFILE  DD DSN=ppp.qqq.rrr,'.
       DISPLAY '//         DISP=(MOD,DELETE,DELETE),'.         
       DISPLAY '//         SPACE=(TRK,(0,0),RLSE)'.           
                                                               
 C1000-EXIT.                                                   
       EXIT.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Wed Jun 15, 2005 6:16 am    Post subject: Reply with quote

avid_lrner,

Quote:

IEFC620I UNIDENTIFIABLE CHARACTER " ON THE JOB STATEMENT


The message is self explanatory. try to decipher the error and try to solve it instead of trying to get help from others. This will make you a better programmer.

Look at the error message carefully
Quote:

IEFC620I UNIDENTIFIABLE CHARACTER " ON THE JOB STATEMENT


Note the double quotes in bold. You cannot have double quotes on your job statement so change them to single quotes.

Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
avid_lrner
Beginner


Joined: 15 Apr 2005
Posts: 21
Topics: 9

PostPosted: Wed Jun 15, 2005 6:33 am    Post subject: Submitting a JCL thru Cobol Reply with quote

Hi,

Initially, I did code the accounting information in Single quotes.

Code:

DISPLAY '//SUBJCL  JOB (aaaa,bbb),'TEST JOB','.


But the program wouldn't compile...it treats the ' of 'TEST JOB' as the delimiter for the DISPLAY statement.

I tried inserting the DISPLAY statements in the COBOL pgm with double quotes....but, that gives a compile error as well.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Wed Jun 15, 2005 6:49 am    Post subject: Reply with quote

avid_lrner,

*sigh* You need to enclose the single quote as shown below. I used '-' at col 7 as a continuation.

Code:

---+----1----+----2----+----3----+----4----+----5----+----6----+--
           DISPLAY '//SUBJCL  JOB (AAAA,BBB),' '''' 'TEST JOB'   
     -                '''' ','.                                   
           DISPLAY '//         CLASS=K,MSGCLASS=P,MSGLEVEL=(1,1)'.
           DISPLAY '//STEP010  EXEC PGM=IEFBR14'.                 
           DISPLAY '//DELFILE  DD DSN=PPP.QQQ.RRR,'.               
           DISPLAY '//         DISP=(MOD,DELETE,DELETE),'.         
           DISPLAY '//         SPACE=(TRK,(0,0),RLSE)'.           



Hope this helps...

Cheers

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
avid_lrner
Beginner


Joined: 15 Apr 2005
Posts: 21
Topics: 9

PostPosted: Wed Jun 15, 2005 11:58 pm    Post subject: Submitting a JCL thru Cobol Reply with quote

Kolusu,

Sorry Sir... won't get onto your nerves again!!!

Thanks for those prompt solutions.

It works fine now!!!

regards,
avid_lrner.
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 -> Application Programming 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