View previous topic :: View next topic
|
Author |
Message |
Sagar_mainframe
New User
Joined: 07 Jun 2008 Posts: 34 Location: Harrisburg, Pennsylvania
|
|
|
|
Hi,
Please provide the code to run CLIST or REXX program using JCL?
Thanks, |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
is it so difficult to look at the manuals or search the forums ?
for example with TSO BATCH JCL or REXX BATCH JCL |
|
Back to top |
|
|
Sagar_mainframe
New User
Joined: 07 Jun 2008 Posts: 34 Location: Harrisburg, Pennsylvania
|
|
|
|
Sorry, but I didn't get it after search, that's why I posted here. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
What did you use for the forum search keywords?
Try using JCL SUBMIT REXX as the keywords. Click the "Search for all terms". |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
Or use the freely available manuals from the official IBM website |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
Back to top |
|
|
Sagar_mainframe
New User
Joined: 07 Jun 2008 Posts: 34 Location: Harrisburg, Pennsylvania
|
|
|
|
I have to run the CLIST program (present in PRGSD1.CLIST.ACQFIXDT) , which creates the DB2 query, using the JCL
I used the following JCL:
Code: |
//PRGSD1A JOB 'RUN CLIST PROGRAM','PRGSD1',
// CLASS=U,MSGCLASS=X,MSGLEVEL=(1,1)
//*
//TMP EXEC PGM=IKJEFT01,DYNAMNBR=30,REGION=4096K
//SYSEXEC DD DSN=PRGSD1.CLIST.ACQFIXDT,DISP=SHR
//SYSTSPRT DD DSN=PRGSD1.REQUEST.ACQFIX.SQL,DISP=SHR
//SYSTSIN DD *
%TOESF
/*
// |
I got the RC=12 and in output dataset I got the following message:
Code: |
READY
%TOESF
Exec member name must not be specified when exec load DD refers to a sequential
data set.
READY
END |
Please help me on this!!! |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
which output dataset? |
|
Back to top |
|
|
Sagar_mainframe
New User
Joined: 07 Jun 2008 Posts: 34 Location: Harrisburg, Pennsylvania
|
|
|
|
I'm using 'PRGSD1.REQUEST.ACQFIX.SQL' as output dataset |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
I'm pretty sure that a CLIST must reside in a PDS or PDS/E allocated to the SYSPROC DD statement. |
|
Back to top |
|
|
Sagar_mainframe
New User
Joined: 07 Jun 2008 Posts: 34 Location: Harrisburg, Pennsylvania
|
|
|
|
I changed the above code as follows:
Code: |
//PRGSD1A JOB 'RUN CLIST PROGRAM','PRGSD1',
// CLASS=U,MSGCLASS=X,MSGLEVEL=(1,1)
//*
//TMP EXEC PGM=IKJEFT01,DYNAMNBR=30,REGION=4096K
//SYSEXEC DD DSN=PRGSD1.CLIST.LIB(ACQFIXDT),DISP=SHR
//SYSTSPRT DD DSN=PRGSD1.REQUEST.ACQFIX.SQL,DISP=SHR
//SYSTSIN DD *
%TOESF
/*
// |
TOESF is PFX (prefix) in my CLIST program
Now it shows following in output dataset 'PRGSD1.REQUEST.ACQFIX.SQL':
Code: |
READY
%TOESF
COMMAND TOESF NOT FOUND
READY
END |
Please let me know parameters (contents) for the SYSTSIN DD statement (inline control card) in JCL. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
Did you try using SYSPROC as Kevin suggested?
What happens? |
|
Back to top |
|
|
Sagar_mainframe
New User
Joined: 07 Jun 2008 Posts: 34 Location: Harrisburg, Pennsylvania
|
|
|
|
OH SORRY for the mistake, I used SYSPROC instead of SYSEXEC only in the above JCL,
it is giving me the same message in output dataset as 'PRGSD1.REQUEST.ACQFIX.SQL':
Code: |
READY
%TOESF
COMMAND TOESF NOT FOUND
READY
END |
|
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2593 Location: Silicon Valley
|
|
|
|
The JCL is more or less correct. As Dick suggests, you may want to change SYSEXEC to SYSPROC.
But based on the message you are getting, I think it is a problem with your exec and not the JCL. I suggest that you provide a trace of your rexx exec.
Also, add PROFILE MSGID to your SYSTSIN file before your %TOESF invocation.
note: CLIST is a different language than REXX. Please be accurate in your questions if you want good answers. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2593 Location: Silicon Valley
|
|
|
|
Sorry, I missed some of the later posts while I was writing my answer.
You should remove the member name from the SYSPROC statement. |
|
Back to top |
|
|
Sagar_mainframe
New User
Joined: 07 Jun 2008 Posts: 34 Location: Harrisburg, Pennsylvania
|
|
|
|
My CLIST program is as follows:
Code: |
PROC 0 TEST DEBUG COMMIT(Y) NBR(1) PFX(TOESF) SYNC(10) +
INDSN( PRGSD1.REQUEST.ACQFIX.JOIN ) +
OUTDSN( PRGSD1.REQUEST.ACQFIX.SQL )
/*****************************************************************
/* CLIST : ACQFIXDT *
/* DESCRIP : CREATE SPUFI TO FIX ACQ. RFIL DATE PROBLEM. *
/* DESCRIP : XIT TO RUN *
/* *
/*****************************************************************
IF &DEBUG = &STR() THEN +
CONTROL NOMSG NOLIST MAIN NOSYMLIST
ELSE +
CONTROL MSG LIST MAIN SYMLIST CONLIST
FREE F(INREC)
IF &SYSDSN('&INDSN')¬=OK THEN +
DO
SET ZEDSMSG = &STR(DSN NOT FOUND)
SET ZEDLMSG = &STR(DSN &INDSN. COULD NOT BE FOUND)
ISPEXEC SETMSG MSG(ISRZ001)
GOTO END1
END
ALLOC DA('&INDSN.') FILE(INREC) SHR REU
SET RPARA = &STR())
SET RPARA = &SUBSTR(1:1,&RPARA)
SET LPARA = &STR(()
SET LPARA = &SUBSTR(1:1,&LPARA)
SET COUNTER = 0
SET BLNKREC = &STR+
( )
SET &HOLDTBL = &STR()
SET &RECCNT = 0
SET &BYPASS = &STR(N)
SET LRECL = (80)
SET BLKSIZE = (23440)
SET RECFM = (F B)
SET ADDR = &ADDRNBR
/* */
/* */
OPENFILE INREC
AGAIN: +
WRITE OUTPUT BEING WRITTEN TO '&OUTDSN.'
DEL '&OUTDSN.' SCR PUR
SET &LRECL=(80)
SET &BLKSIZE=(0)
SET &RECFM=(F B)
ALLOC FILE(OUTREC) DA('&OUTDSN.') REUSE NEW +
UCOUNT(1) +
LRECL(&LRECL) BLKSIZE(&BLKSIZE) RECFM(&STR(&RECFM)) +
DSORG(PS) SP(100 50) CYL
OPENFILE OUTREC OUTPUT
READIT: +
SET &DOAGAIN = &STR(N)
ERROR GOTO DONE
GETFILE INREC
IF &LASTCC > 0 THEN GOTO DONE
ERROR OFF
SET &RECCNT = &RECCNT + 1
SET &DOAGAIN = &STR(Y)
SET &BYPASS = &STR(N)
SET LOCN = &SUBSTR(001:005,&STR(&INREC))
SET RXNBR = &SUBSTR(006:012,&STR(&INREC))
SET DOS = &SUBSTR(013:022,&STR(&INREC))
SET STATUS = &SUBSTR(023:023,&STR(&INREC))
SET DTEAUTH = &SUBSTR(024:033,&STR(&INREC))
SET CLCRFIL = &SUBSTR(034:043,&STR(&INREC))
SET OLDRFIL = &SUBSTR(044:053,&STR(&INREC))
SET TBLID = &SUBSTR(054:059,&STR(&INREC))
WRITEIT: +
SET COUNTER = &COUNTER + 1
SET G = &STR()
SET OUTREC = &STR(--STMT OPTION,AFFECTED-ROWS=1,IF-COUNTS-DIFFER=ERROR)
PUTFILE OUTREC
SET OUTREC = &STR( UPDATE &TBLID..PHRFL_REFILL_TBL )
PUTFILE OUTREC
SET OUTREC = &STR( SET PHRFL_RFIL_DTE = '&CLCRFIL' )
PUTFILE OUTREC
SET OUTREC = &STR( ,PHRFL_LST_OPR_ID = 'ISR13903' )
PUTFILE OUTREC
SET OUTREC = &STR( ,PHRFL_LST_MNT_TSMP = CURRENT TIMESTAMP )
PUTFILE OUTREC
SET OUTREC = &STR( WHERE PHRFL_LOCN = ) &LOCN
PUTFILE OUTREC
SET OUTREC = &STR( AND PHRFL_RX_NBR = ) &RXNBR
PUTFILE OUTREC
SET OUTREC = &STR( AND PHRFL_DTE_OF_SRVC = '&DOS' )
PUTFILE OUTREC
SET OUTREC = &STR( AND PHRFL_RFIL_DTE = '&OLDRFIL' )
PUTFILE OUTREC
SET OUTREC = &STR( ; )
PUTFILE OUTREC
GOTO READIT
DONE: +
ERROR OFF
SET &NBR = &NBR + 1
SET &COUNTER = 0
CLOSFILE OUTREC
END1: +
CLOSFILE INREC
FREE F(INREC)
FREE F(OUTREC)
EXIT |
After adding the PROFILE MSGID it is showing in output file:
Code: |
READY
PROFILE MSGID
READY
%TOESF
IKJ56500I COMMAND TOESF NOT FOUND
READY
END |
|
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1787 Location: Bloomington, IL
|
|
|
|
Lose the member name in the JCL. Be sure that there is a member in the library with the same name as the command (TOESF). |
|
Back to top |
|
|
Sagar_mainframe
New User
Joined: 07 Jun 2008 Posts: 34 Location: Harrisburg, Pennsylvania
|
|
|
|
Thanks a lot to all of you!!! It worked.
Now the only problem is that it is throwing a return code of 348 for JCL and showing the following message in output dataset
Code: |
READY
PROFILE MSGID
READY
%ACQFIXDT
OUTPUT BEING WRITTEN TO 'PRGSD1.REQUEST.ACQFIX.SQL'
READY
END |
'OUTPUT BEING WRITTEN TO 'PRGSD1.REQUEST.ACQFIX.SQL' ' is the same message which gets showed when we directly execute the CLIST program using 'XIT' command.
Now my JCL looks as follows:
Code: |
//PRGSD1A JOB 'RUN CLIST PROGRAM','PRGSD1',
// CLASS=U,MSGCLASS=X,MSGLEVEL=(1,1)
//*
//TMP EXEC PGM=IKJEFT01,DYNAMNBR=30,REGION=4096K
//SYSPROC DD DSN=PRGSD1.CLIST.LIB,DISP=SHR
//SYSTSPRT DD DSN=PRGSD1.REQUEST.ACQFIX.SYSOUT,DISP=SHR
//SYSTSIN DD *
PROFILE MSGID
%ACQFIXDT
/* |
Now I want the return code of JCL as 0. |
|
Back to top |
|
|
Sagar_mainframe
New User
Joined: 07 Jun 2008 Posts: 34 Location: Harrisburg, Pennsylvania
|
|
|
|
Sorry again , The return code is 0 now... a big THANK YOU to all of all you |
|
Back to top |
|
|
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
I think your JCL is a little off.
The SYSPROC should be the entire PDS, not a specific member.
Based on the information provided try:
Code: |
//PRGSD1A JOB 'RUN CLIST PROGRAM','PRGSD1',
// CLASS=U,MSGCLASS=X,MSGLEVEL=(1,1)
//*
//TMP EXEC PGM=IKJEFT01,DYNAMNBR=30,REGION=4096K
//SYSPROC DD DSN=PRGSD1.CLIST.LIB,DISP=SHR
//SYSTSPRT DD DSN=PRGSD1.REQUEST.ACQFIX.SQL,DISP=SHR
//SYSTSIN DD *
%ACQFIXDT 'TOESF'
/*
// |
I think you are executing ACQFIXDT in the SYSPROC library, and 'TOESF' is an input argment. |
|
Back to top |
|
|
|