View previous topic :: View next topic
|
Author |
Message |
mox512
New User
Joined: 04 Feb 2024 Posts: 21 Location: united arab emirates
|
|
|
|
I want to execute rexx with jcl. but its not working. this code extract sdsf panel but jcl with this pgms ( IKJEFT1A, IKJEFT01, IKJEFT1B) is not able to execute this rexx code. Do you have any solution so that i can run this code as job.
It seems that to view the panel sdsf it is not possible to extract information from the sdsf panel with this jcl code as job.
/* REXX */
S_RC = RXSUBCOM('ADD','DSNREXX','DSNREXX')
ADDRESS DSNREXX
'CONNECT' 'Database name'
RC = ISFCALLS('ON')
ADDRESS SDSF "ISFLOG READ TYPE(SYSLOG)"
DO I = 1 TO ISFLINE.0
IF POS('IEF125I',ISFLINE.I) \= 0 THEN DO
PARSED_DATA = SUBSTR(ISFLINE.I,POS('IEF125I',ISFLINE.I)+8,40)
SAY PARSED_DATA
END
END
jcl:
//LOGUSR JOB CLASS=A
//EREPMTN EXEC PGM=IKJEFT01,REGION=0K,PARM='LOGREAD'
//SYSEXEC DD DSN=USER.REXX,DISP=SHR
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD DUMMY,BLKSIZE=80
//INDD DD * |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2593 Location: Silicon Valley
|
|
|
|
re: not able to execute
You need to provide error messages or other symptoms. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2593 Location: Silicon Valley
|
|
|
|
These are probably not required to use SDSF:
Code: |
ADDRESS DSNREXX
'CONNECT' 'Database name' |
|
|
Back to top |
|
|
mox512
New User
Joined: 04 Feb 2024 Posts: 21 Location: united arab emirates
|
|
|
|
It doesn't give an error and it runs with cc0000 but it seems that it can't read the panel with this pgm.
ADDRESS DSNREXX
'CONNECT' 'Database name'
this section is connect to database for next step i need to insert in table. i think rexx code is run correctly but idont know how it run as job. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2593 Location: Silicon Valley
|
|
|
|
Show us the trace. |
|
Back to top |
|
|
don.leahy
Active Member
Joined: 06 Jul 2010 Posts: 765 Location: Whitby, ON, Canada
|
|
|
|
mox512 wrote: |
It doesn't give an error and it runs with cc0000 but it seems that it can't read the panel with this pgm.
ADDRESS DSNREXX
'CONNECT' 'Database name'
this section is connect to database for next step i need to insert in table. i think rexx code is run correctly but idont know how it run as job. |
I don’t see any Db2 load libraries in your job step. Typically, to run a DSNREXX program you need the DB2 load libraries in your STEPLIB. |
|
Back to top |
|
|
don.leahy
Active Member
Joined: 06 Jul 2010 Posts: 765 Location: Whitby, ON, Canada
|
|
|
|
mox512 wrote: |
It doesn't give an error and it runs with cc0000 but it seems that it can't read the panel with this pgm.
ADDRESS DSNREXX
'CONNECT' 'Database name'
this section is connect to database for next step i need to insert in table. i think rexx code is run correctly but idont know how it run as job. |
I don’t see any Db2 load libraries in your job step. Typically, to run a DSNREXX program you need the DB2 load libraries in your STEPLIB. |
|
Back to top |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 730 Location: Denmark
|
|
|
|
As to how to run a REXX as a job, take look at the RXINSTRX pgm at harders-jensen.com.
But I expect that at least part of your problem could be the statement 'CONNECT' 'Database name'
which I guess tries to connect to a database called DATABASE NAME. Check your quotes. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2593 Location: Silicon Valley
|
|
|
|
re: "this section is connect to database for next step"
I agree with Willy that this is a problem. You should remove the DB2 code until you have the SDSF code working. That is, you should develop the project in incremental steps and get one to work before moving to the next so that you do not have to debug too much at once. |
|
Back to top |
|
|
mox512
New User
Joined: 04 Feb 2024 Posts: 21 Location: united arab emirates
|
|
|
|
I remove database connection but i cant compile my code with jcl. But it seems that this pgm or this jcl cant Execute sdsf information. if I execute this code with tso exec 'datasetname' rexx code run correctly and this information at log insert in table. But this code cant work with jcl. It seems that I can't read the sdsf panel, I am so confused.
/* REXX */
RC = ISFCALLS('ON')
ADDRESS SDSF "ISFLOG READ TYPE(SYSLOG)"
DO I = 1 TO ISFLINE.0
IF POS('IEF125I',ISFLINE.I) \= 0 THEN DO
PARSED_DATA = SUBSTR(ISFLINE.I,POS('IEF125I',ISFLINE.I)+8,40)
SAY PARSED_DATA
END
END |
|
Back to top |
|
|
mox512
New User
Joined: 04 Feb 2024 Posts: 21 Location: united arab emirates
|
|
|
|
I remove database connection but i cant compile my code with jcl. But it seems that this pgm or this jcl cant Execute sdsf information. if I execute this code with tso exec 'datasetname' rexx code run correctly and this information at log insert in table. But this code cant work with jcl. It seems that I can't read the sdsf panel, I am so confused.
/* REXX */
RC = ISFCALLS('ON')
ADDRESS SDSF "ISFLOG READ TYPE(SYSLOG)"
DO I = 1 TO ISFLINE.0
IF POS('IEF125I',ISFLINE.I) \= 0 THEN DO
PARSED_DATA = SUBSTR(ISFLINE.I,POS('IEF125I',ISFLINE.I)+8,40)
SAY PARSED_DATA
END
END |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2131 Location: USA
|
|
|
|
mox512 wrote: |
i cant compile my code with jcl |
1. First of all, please learn how to use the Code button to present your information to others.
2. There is no need to "compile any REXX code with JCL". This phrase is just bullshit, pardon my French. Please, find out for yourself: what are you actually doing?
3. If you want to get any useful response from the Forum, you MUST present here all detailed information, with copies of logs, and/or error messages, and/or correct/incorrect output data, etc. etc. etc. |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2593 Location: Silicon Valley
|
|
|
|
I would make sure you get a response:
Code: |
If isfline.0 > 0 Then
DO I = 1 TO ISFLINE.0
. . .
END
Else
Say 'no response'
|
|
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2593 Location: Silicon Valley
|
|
|
|
re: "i think rexx code is run correctly"
Can you run your rexx code from your TSO id? I suggest you try that, assuming that you can use SDSF from there, to show that SDSF is setup correctly.
If it works in TSO, check your DD allocations for some ISF files... they also need to be allocated in your batch job. |
|
Back to top |
|
|
Pedro
Global Moderator
Joined: 01 Sep 2006 Posts: 2593 Location: Silicon Valley
|
|
Back to top |
|
|
|