difference between EXEC a rexx pg and submit a rexx pg



IBM's Command List programming language & Restructured Extended Executor

difference between EXEC a rexx pg and submit a rexx pg

Postby david » Tue Aug 10, 2010 8:41 pm

I hava a REXX prog to get return code of a job.
THE name of rexx prog is REXXGETS.
The rexx prog is :
jobname = 'XMITJ'
queue 'set confirm off'
queue 'owner *'
queue 'prefix *'
queue 'h'
queue 'select 'jobname
queue 'afd refresh'
queue 'find 'jobname
queue ''
'execio * diskw isfin (finis'
parm = '/ ++20,500'
address linkpgm 'sdsf parm'
'execio * diskr isfout (stem tmpline. finis'
say tmpline.0
posjobname = 0
posjobid = 0
posmaxrc = 0
do i = 1 to tmpline.0 while posjobname = 0
posjobname = index(tmpline.i, 'JOBNAME')
posjobid = index(tmpline.i, 'JobID')
posmaxrc = index(tmpline.i, 'Max-RC')
if posjobname > 0 then
do
say 'posjobname = ' posjobname
say 'posjobid = ' posjobid
say 'posmaxrc = 'posmaxrc
end
end
do i = 1 to tmpline.0
if(pos(jobname,tmpline.i)) > 0 then
do
say 'tmpline.i = ' tmpline.i
jobname1 = strip(substr(tmpline.i, posjobname ,8 )
jobid = strip(substr(tmpline.i, posjobid, 7)
maxrc = strip(substr(tmpline.i, posmaxrc, 10))
end
end
say 'jobname = ' jobname1
say 'jobid = ' jobid
say 'maxrc = ' maxrc


when I use EXEC in front of member in ds,like this: EXEC REXXGETS
it can generate right result.

when i use the job to submit the REXX,it can generate wrong result.

//GETSTEP EXEC PGM=IKJEFT01,COND=(4,LT)
//SYSEXEC DD DSN=TMAP006.BAT.SRCLIB,DISP=SHR
//ISFIN DD DSN=TMAP006.BAT.ISFIN,DISP=(NEW,CATLG),UNIT=3390,
// VOL=SER=SYSNEW,
// DCB=(RECFM=FB,LRECL=80,BLKSIZE=27920),
// SPACE=(TRK,(30,30))
//ISFOUT DD DSN=TMAP006.BAT.ISFOUT,DISP=(NEW,CATLG),UNIT=3390,
// VOL=SER=SYSNEW,
// DCB=(RECFM=FBA,LRECL=301,BLKSIZE=27993),
// SPACE=(CYL,(30,30))
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
REXXGETS
/*
so ,anybody can tell why?
david
 
Posts: 8
Joined: Tue Aug 10, 2010 8:30 pm
Has thanked: 0 time
Been thanked: 0 time

Re: difference between EXEC a rexx pg and submit a rexx pg

 

Re: difference between EXEC a rexx pg and submit a rexx pg

Postby MrSpock » Tue Aug 10, 2010 8:53 pm

Don't have SDSF available so I can't help much, but, what I'd do is to go back to my base TSO session (Not my ISPF session. I'd exit that and go back to the TSO READY prompt). Then, I'd free any allocated DD's. Once that was done, I'd allocate the ISFIN and ISFOUT the same way your job does. Finally, I'd enter the TSO command EX 'TMAP006.BAT.SRCLIB(REXXGETS)' and see what happens. If that also fails, then the logical conclusion is that there are other necessary datasets that need to be allocated in order for the address linkpgm 'sdsf parm' command to function (maybe you need a JOBLIB or STEPLIB??).

Or, you could change your job to run your exec in a similar ISPF Address space instead of TSO and see if it makes any difference.
User avatar
MrSpock
Global moderator
 
Posts: 810
Joined: Wed Jun 06, 2007 9:37 pm
Location: Raleigh NC USA
Has thanked: 0 time
Been thanked: 2 times

Re: difference between EXEC a rexx pg and submit a rexx pg

Postby david » Wed Aug 11, 2010 10:21 am

OPTION 6, EX 'TMAP006.BAT.SRCLIB(REXXGETS)' it can also get right result.

If that also fails, then the logical conclusion is that there are other necessary datasets that need to be allocated in order for the address linkpgm 'sdsf parm' command to function (maybe you need a JOBLIB or STEPLIB??).

Could you give me more details?
david
 
Posts: 8
Joined: Tue Aug 10, 2010 8:30 pm
Has thanked: 0 time
Been thanked: 0 time

Re: difference between EXEC a rexx pg and submit a rexx pg

Postby NicC » Wed Aug 11, 2010 4:35 pm

You have to exec your pgm in batch...

    EXEC 'XXX.YYYYYYY.EXEC(pgmname)' 'a parm'
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2690
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisys (almost)
Has thanked: 4 times
Been thanked: 105 times

Re: difference between EXEC a rexx pg and submit a rexx pg

Postby david » Wed Aug 11, 2010 5:18 pm

I Did THAT. exec pgm in batch.But the result is wrong.

When I did (EX 'TMAP006.BAT.SRCLIB(REXXGETS)'), it could also get right result.

I think 'address linkpgm 'sdsf parm' ' can't run in no ISPF service.
david
 
Posts: 8
Joined: Tue Aug 10, 2010 8:30 pm
Has thanked: 0 time
Been thanked: 0 time

Re: difference between EXEC a rexx pg and submit a rexx pg

Postby NicC » Wed Aug 11, 2010 5:36 pm

In that case you will have to use ISPSTART in IKJEFT01 an provide the necessary DDNAMEs for the ISPF files.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2690
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisys (almost)
Has thanked: 4 times
Been thanked: 105 times

Re: difference between EXEC a rexx pg and submit a rexx pg

Postby MrSpock » Wed Aug 11, 2010 6:07 pm

I never did ask, but what exactly did you mean by

when i use the job to submit the REXX,it can generate wrong result.


Are you saying that everything works, but your results in ISFOUT are different or wrong?
User avatar
MrSpock
Global moderator
 
Posts: 810
Joined: Wed Jun 06, 2007 9:37 pm
Location: Raleigh NC USA
Has thanked: 0 time
Been thanked: 2 times

Re: difference between EXEC a rexx pg and submit a rexx pg

Postby david » Wed Aug 11, 2010 6:11 pm

My useid is TMAP006
'the ISPF files' is TMAP006.ISPF.ISPPROF or any others?
'use ISPSTART in IKJEFT01 ' means what? like this :
//SYSTSIN DD *
PROFILE PREFIX(TMAP006)
PROFILE NOPROMPT
ISPSTART PANEL(ISR@PRIM) NEWAPPL(ISR)
EXEC MYREXX(REXXGETS) EXEC
/*
BUT after run the job :
IEF861I FOLLOWING RESERVED DATA SET NAMES UNAVAILABLE TO JREXX
IEF863I DSN = TMAP006.ISPF.ISPPROF JREXX RC = 04
IEF099I JOB JREXX WAITING FOR DATA SETS
david
 
Posts: 8
Joined: Tue Aug 10, 2010 8:30 pm
Has thanked: 0 time
Been thanked: 0 time

Re: difference between EXEC a rexx pg and submit a rexx pg

Postby david » Wed Aug 11, 2010 6:14 pm

when i use the job to submit the REXX,it can generate wrong result.

yes, i mean everything works, but results in ISFOUT are wrong.
david
 
Posts: 8
Joined: Tue Aug 10, 2010 8:30 pm
Has thanked: 0 time
Been thanked: 0 time

Re: difference between EXEC a rexx pg and submit a rexx pg

Postby david » Wed Aug 11, 2010 6:19 pm

USING option 6 :EX 'TMAP006.BAT.SRCLIB(REXXGETS)' EXEC
the results is right like this:
input jobname
160
posjobname = 8
posjobid = 17
posmaxrc = 281
jobname = XMITJ
jobid = JOB02946
maxrc = JCL ERROR

USing jOB: the results is:
input jobname
160
posjobname = 8
posjobid = 17
posmaxrc = 281
jobname = HELD OUT
jobid = UT DISPL
maxrc =
david
 
Posts: 8
Joined: Tue Aug 10, 2010 8:30 pm
Has thanked: 0 time
Been thanked: 0 time

Next

Return to CLIST & REXX

 


  • Related topics
    Replies
    Views
    Last post