Query on INTRDR



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

Query on INTRDR

Postby Sivapradeep » Mon Mar 26, 2012 5:18 pm

Hi,

I have a JCL with INTRDR in SYSOUT parameter and this JCL is executing a COBOL program that has few JCL statements and few other normal display messages.

when i submit the main JCL, because of INTRDR the JCL statements present in cobol program are submitted to JES and getting the output for the corresponding 2nd JCL. But, here i'm missing the normal display messages of first COBOL program. They are not present on SPOOL. SYSOUT of first COBOL program is itself not coming on to SPOOL.

What can I do for both the operations i.e. displaying the normal messages on to spool and submitting the second JCL?
Sivapradeep
 
Posts: 35
Joined: Mon Mar 26, 2012 2:09 pm
Has thanked: 1 time
Been thanked: 1 time

Re: Query on INTRDR

Postby Robert Sample » Mon Mar 26, 2012 5:20 pm

Change the program to use a different DD name for the internal reader.
Robert Sample
Global moderator
 
Posts: 3720
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: Query on INTRDR

Postby Sivapradeep » Mon Mar 26, 2012 5:28 pm

I have changed the DD name of the statement containing SYSOUT=(*,INTRDR). this one is displaying all the messages (even JCL) that were present in my 1st COBOL program.
But, those JCL statements present in 1st COBOL were not submitted to JES so my 2nd COBOL program isn't executed. INTRDR is not working!!!
Sivapradeep
 
Posts: 35
Joined: Mon Mar 26, 2012 2:09 pm
Has thanked: 1 time
Been thanked: 1 time

Re: Query on INTRDR

Postby BillyBoyo » Mon Mar 26, 2012 5:48 pm

Talk to your site support. You might not be specifying its use correctly for your site.

You have changed the program as Robert suggested? Not just the JCL?

The INTRDR works, has done for years. However, if you don't do it properly, what you are trying to do won't work.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Query on INTRDR

Postby Robert Sample » Mon Mar 26, 2012 5:53 pm

What COBOL commands are you using for the INTRDR data set -- you'll need the usual COBOL OPEN, WRITE, and CLOSE statements? As Billy suggested, have you confirmed that SYSOUT=(*,INTRDR) is correct for your site? Most sites require a specific message class for internal reader (A or B is common); the * means to use whatever your MSGCLASS= on your job statement has -- which may or may not be correct for your site. Do you have /*EOF as the last statement in your job stream that is being copied to the internal reader? If not, you might want to add it.
Robert Sample
Global moderator
 
Posts: 3720
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: Query on INTRDR

Postby Sivapradeep » Mon Mar 26, 2012 6:25 pm

Hi Robert,

i dint use any file operation verbs. wrote very simple code.
Actually i'm experimenting on INTRDR.

Here is my 1st COBOL program.
 IDENTIFICATION DIVISION.                                           
 PROGRAM-ID. T904CB01.                                             
 PROCEDURE DIVISION.                                               
 A000-MAIN-PARA.                                                   
     DISPLAY 'HELLO WORLD, SHIVA 1ST PROGRAM'.                     
     DISPLAY "//E183904J JOB ,,NOTIFY=&SYSUID,CLASS=D,MSGLEVEL=(1, 
-            "1),MSGCLASS=X"                                       
     DISPLAY "//JOBLIB DD DSN='OPERN.COBOL.LOADLIB',DISP=SHR"       
     DISPLAY "//STEP1 EXEC PGM=T904CB02"                           
     DISPLAY "//SYSOUT DD SYSOUT=*"                                 
     STOP RUN.                                                                         

to execute thE above COBOL i wrote below JCL.
//E183904J JOB ,,NOTIFY=&SYSUID,CLASS=D,MSGLEVEL=(1,1),MSGCLASS=X
//JOBLIB DD DSN='OPERN.COBOL.LOADLIB',DISP=SHR                   
//STEP1 EXEC PGM=T904CB01                                         
//SYSOUT DD SYSOUT=(*,INTRDR)                                     

after submit this JCL im getting the following datasets created in the SPOOL.

For the first JCL :
SDSF JOB DATA SET DISPLAY - JOB E183904J (JOB02382)   
NP   DDNAME   StepName ProcStep DSID Owner    C Dest 
     JESMSGLG JES2                 2 E183904  X LOCAL
     JESJCL   JES2                 3 E183904  X LOCAL
     JESYSMSG JES2                 4 E183904  X LOCAL

and the execution of 2nd COBOL program resulted in
 -------------------------------------------------------------------
 SDSF JOB DATA SET DISPLAY - JOB E183904J (JOB02383)    LINE 1-4 (4)
 NP   DDNAME   StepName ProcStep DSID Owner    C Dest               
      JESMSGLG JES2                 2 E183904  X LOCAL             
      JESJCL   JES2                 3 E183904  X LOCAL             
      JESYSMSG JES2                 4 E183904  X LOCAL             
      SYSOUT   STEP1              101 E183904  X LOCAL             

So here SYSOUT is present only for 2nd COBOL program. But, for the first COBOL program i'm not able to see "HELLO WORLD, SHIVA 1ST PROGRAM" message in SPOOL's Dataset since SPOOL itself not created. 2nd COBOL program showing the output perfectly fine.

It might be a lengthy description but Pls help me out from this problem.
Sivapradeep
 
Posts: 35
Joined: Mon Mar 26, 2012 2:09 pm
Has thanked: 1 time
Been thanked: 1 time

Re: Query on INTRDR

Postby BillyBoyo » Mon Mar 26, 2012 6:56 pm

If you are sending DISPLAY output that you want to see to the INTRDR, you won't see it, will you?

Change the stuff you are sending to the INTRDR to use a file in your program with the usual sort of IO. Change you //SYSOUT DD back to what it was. The new file to the INTRDR. And talk to your support.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Query on INTRDR

Postby Robert Sample » Mon Mar 26, 2012 7:08 pm

But, for the first COBOL program i'm not able to see "HELLO WORLD, SHIVA 1ST PROGRAM" message in SPOOL's Dataset
As coded, you would not ever -- UNDER ANY CIRCUMSTANCES -- be able to see that message. If you want to display a message, then display the message to SYSOUT=*. If you want to submit a job, then submit the job to SYSOUT=(*,INTRDR). Do not mix the two since your HELLO WORLD message is treated as a job by the internal reader and since the job card is invalid (your message does not have the word "JOB" in the first 16 bytes), the message would not ever appear on the spool.
Robert Sample
Global moderator
 
Posts: 3720
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: Query on INTRDR

Postby steve-myers » Mon Mar 26, 2012 7:36 pm

The purpose of an "internal reader" is to provide a mechanism for a program to send JCL to directly to JESx. The idea first appeared in the 1960s with HASP, though the JCL used to specify an "internal reader" was different than what is used now. The JCL used to specify an internal reader was standardized with the very first release of what is now called MVS, and MVS added a very limited mechanism for a properly written program to determine the job ID of the submitted job. The SUBMIT command in TSO just allocates an "internal reader", copies the dataset you specify to this dataset, and uses the feedback mechanism I just mentioned to retrieve the job ID of the submitted job and display it at your workstation. The mechanism to retrieve the job ID is not available to a Cobol program.

As Mr. Sample just alluded, what your program writes to an "internal reader" must be JCL. Something like "HELLO WORLD" is not JCL and JESx will ignore it.
steve-myers
Global moderator
 
Posts: 2105
Joined: Thu Jun 03, 2010 6:21 pm
Has thanked: 4 times
Been thanked: 243 times

Re: Query on INTRDR

Postby Sivapradeep » Tue Mar 27, 2012 10:59 am

Now i have changed my program according to what Robert has suggested. i used open , write, close and copied the JCL statements from my first cobol program into the ddname file that was specified with SYSOUT=(*,INTRDR) in main JCL. i'm able to see all the display messages in both the programs. understood my earlier mistake :)
Sivapradeep
 
Posts: 35
Joined: Mon Mar 26, 2012 2:09 pm
Has thanked: 1 time
Been thanked: 1 time


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post