View previous topic :: View next topic
|
Author |
Message |
SanaR
New User
Joined: 04 Feb 2016 Posts: 15 Location: Lithuania
|
|
|
|
Hi All,
I am trying to run a macro via rexx in batch mode:
Code: |
/* REXX
*/
Address TSO /* allocate macro library */
"ALTLIB ACTIVATE APP(EXEC) DA('USUXXX.XXX12940.REXXLIB')"
trace r
SAY "Calling PARTCNT1"
dsn = "USU.XXXXXX11.XXXXXXTS.DFROMIC"
"ISPEXEC VIEW DATASET('"dsn"') MACRO(PARTCNT1)"
SAY "<<<<<<PART MACRO WAS CALLED>>>>>>"
Address TSO /* Deactivate macro library */
"ALTLIB DEACTIVATE APP(EXEC)"
EXIT 0
|
Code: |
/* MACRO */
ADDRESS ISREDIT
"MACRO"
TRACE R
POS1 = 1
POS2 = 350000
POS3 = 1100000
POS4 = LAST
"(LVAL1) = LINE "POS1; "SEEK ALL "LVAL1; "(LCNT1) = SEEK_COUNTS"
"(LVAL2) = LINE "POS2; "SEEK ALL "LVAL2; "(LCNT2) = SEEK_COUNTS"
"(LVAL3) = LINE "POS3; "SEEK ALL "LVAL3; "(LCNT3) = SEEK_COUNTS"
"(LASTL) = LINENUM .ZLAST"
"(LVAL4) = LINE "LASTL; "SEEK ALL "LVAL4; "(LCNT4) = SEEK_COUNTS"
SAY "POS;CRD_NUMBER;CRD_COUNT"
SAY LEFT(POS1,15,' ')";'"LVAL1"';"LCNT1
SAY LEFT(POS2,15,' ')";'"LVAL2"';"LCNT2
SAY LEFT(POS3,15,' ')";'"LVAL3"';"LCNT3
SAY LEFT(POS4'='LASTL,15,' ')";'"LVAL4"';"LCNT4
"ISREDIT SAVE"
"ISREDIT END" |
The JCL runs ok but the report that the above macro is created to produce is not returned in the job output.
The rexx and macro runs fine online.
Can anyone please suggest?
The JCL is as follows:
Code: |
//S01 EXEC PGM=IKJEFT01,COND=(4,LT)
//SYSTSPRT DD SYSOUT=*
//ISPLOG DD SYSOUT=*,RECFM=VA,LRECL=125,BLKSIZE=129
//ISPPLIB DD DSN=SPF.ISPPLIB,DISP=SHR
// DD DSN=SX1.SISPPLIB,DISP=SHR
//ISPMLIB DD DSN=SPF.ISPMLIB,DISP=SHR
// DD DSN=SX.SISPMENU,DISP=SHR
// DD DSN=SX.SBLSMSG0,DISP=SHR
//ISPTLIB DD DSN=SX.SISPTENU,DISP=SHR
//ISPSLIB DD DSN=SPF.ISPSLIB,DISP=SHR
//ISPPROF DD DSN=USXXX1.BATCH.SPF.PROFILE,DISP=SHR
//SYSPROC DD DSN=USXXX1.XXXXX940.REXXLIB,DISP=SHR
//SYSEXEC DD DSN=USXXX1.XXXXX940.REXXLIB,DISP=SHR
//SYSTSIN DD *
ISPSTART CMD(%CALLPART)
/* |
|
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Have you given up on your SORT question? |
|
Back to top |
|
|
SanaR
New User
Joined: 04 Feb 2016 Posts: 15 Location: Lithuania
|
|
|
|
Yes |
|
Back to top |
|
|
SanaR
New User
Joined: 04 Feb 2016 Posts: 15 Location: Lithuania
|
|
|
|
But for the time being due to limited timescale. |
|
Back to top |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 734 Location: Denmark
|
|
|
|
What do you mean by 'report that the above macro is created to produce is not returned in the job output.' - the SAYs?
I did a quick test and I see all the SAYs. |
|
Back to top |
|
|
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
You are invoking this 'edit' macro with an "ISPEXEC VIEW....
You probably do not want an "ISREDIT SAVE" in your macro.
Additionally, in your JCL you have SYSTSPRT=*
What is the MSGCLASS on your Job card? |
|
Back to top |
|
|
SanaR
New User
Joined: 04 Feb 2016 Posts: 15 Location: Lithuania
|
|
|
|
Thanks Willy for your reply. Did you run it via JCL ? Can I see what did you use and what output you got? |
|
Back to top |
|
|
SanaR
New User
Joined: 04 Feb 2016 Posts: 15 Location: Lithuania
|
|
|
|
Thanks Dave for your reply. I have changed the code from SAVE to CANCEL now but it still doesn't give any out.
Is SYSTSPRT=* wrong? Should I remove it?
MSGCLASS=X |
|
Back to top |
|
|
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
Well the =* part says to use the same class as the MSGCLASS.
In our shop MSGCLASS=X sends the output to the 'bit bucket' aka garbage, where it will never be seen.
If you are not seeing ANY output, then you want a different MSGCLASS.
What is the HOLD class at your shop?
Additionally, if you have ISREDIT CANCEL, then you do not need the ISREDIT END afterward it. |
|
Back to top |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 734 Location: Denmark
|
|
|
|
JCL...
Code: |
//BE EXEC PGM=IKJEFT1B,PARM='ISPSTART CMD(%zispedt1)'
//SYSEXEC DD DISP=SHR,DSN=WJ.LIB.EXEC
//ISPMLIB DD DISP=SHR,DSN=ISP.SISPMENU
//ISPPLIB DD DISP=SHR,DSN=ISP.SISPPENU
//ISPSLIB DD DISP=SHR,DSN=ISP.SISPSENU
//ISPTLIB DD DISP=SHR,DSN=ISP.SISPTENU
//ISPPROF DD UNIT=SYSDA,SPACE=(TRK,(5,5,5)),RECFM=FB,LRECL=80
//ISPLOG DD DUMMY SYSOUT=*,RECFM=VA,LRECL=125,BLKSIZE=129
//ISPFILE DD SYSOUT=*,RECFM=FB,LRECL=80,BLKSIZE=6240
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD DUMMY |
ZISPEDT1....
Code: |
/* rexx */
trace r
address tso "altlib act app(exec) da('WJ.DEZHI.EXEC')"
address ispexec "view dataset('WJ.LIB.CNTL(ZZ)') macro(zispedt2)"
address tso "altlib deact app(exec)"
trace off
|
ZISPEDT1....
A copy of you 2nd REXX.
Output extract, tons of error messages as my data is different from yours...
Code: |
*-* address tso "altlib act app(exec) da('WJ.DEZHI.EXEC')"
>>> "altlib act app(exec) da('WJ.DEZHI.EXEC')"
*-* address ispexec "view dataset('WJ.LIB.CNTL(ZZ)') macro(zispedt2)"
>>> "view dataset('WJ.LIB.CNTL(ZZ)') macro(zispedt2)"
*-* POS1 = 1
>>> "1"
*-* POS2 = 350000
>>> "350000"
*-* POS3 = 1100000
>>> "1100000"
*-* POS4 = LAST
>>> "LAST"
*-* "(LVAL1) = LINE "POS1
>>> "(LVAL1) = LINE 1"
*-* "SEEK ALL "LVAL1
>>> "SEEK ALL DC CL12'04 Alfa '
+++ RC(28) +++
*-* "(LCNT1) = SEEK_COUNTS"
>>> "(LCNT1) = SEEK_COUNTS"
+++ RC(28) +++
*-* "(LVAL2) = LINE "POS2
>>> "(LVAL2) = LINE 350000"
+++ RC(28) +++
*-* "SEEK ALL "LVAL2
>>> "SEEK ALL " |
Re MSGCLASS, if you see output from job JCL / JOBLOG all then msgclass is ok. |
|
Back to top |
|
|
SanaR
New User
Joined: 04 Feb 2016 Posts: 15 Location: Lithuania
|
|
|
|
Hi Will,
Thanks for your reply.
I tried using the exact same JCL as yours but I am not able to see any output
Code: |
********************************* TOP OF D
<<<<<<PART MACRO WAS CALLED>>>>>>
READY
END
******************************** BOTTOM O |
|
|
Back to top |
|
|
SanaR
New User
Joined: 04 Feb 2016 Posts: 15 Location: Lithuania
|
|
|
|
Just to let you know the input file is FB, 20 bytes and record key in 1-19. |
|
Back to top |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 734 Location: Denmark
|
|
|
|
Are you sure that the calling REXX CALLPART in 'USXXX1.XXXXX940.REXXLIB' is the one you listed? You get the SAY output but not the trace. Not sure it matters, but I would remove the SYSPROC DD. |
|
Back to top |
|
|
SanaR
New User
Joined: 04 Feb 2016 Posts: 15 Location: Lithuania
|
|
|
|
Hi Willy.
I had removed the trace that's why I was just getting the SAY msg. I have tried running it without SYSPROC but no use . May I request you to run your job with a sample file of FB,20 bytes and record key in 1-19. |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
Can y'all please use the code tags when posting code, data, screen extracts? Thank you.
BTW: you can edit your posts for up to 10 minutes after posting. That would have saved a couple of the edits that I did. |
|
Back to top |
|
|
Willy Jensen
Active Member
Joined: 01 Sep 2015 Posts: 734 Location: Denmark
|
|
|
|
The file structure is irrelevant, only contents matter in your example. I did another small test with data which matches your logic, as I understand it, and I get a report displayed. Now I have to ask, do you get output from TRACE R in the PARTCNT1 pgm? I suggest that you put the TRACE R right after the top label.
Is your input file really 1.1 m+ records?
@Nic. sorry, will try to remember those tags.[/code] |
|
Back to top |
|
|
|