View previous topic :: View next topic
|
Author |
Message |
karthikr44
Active User
Joined: 25 Aug 2007 Posts: 235 Location: Chennai
|
|
|
|
Hi,
I have the following code. It is executing perfectly when i am invoking
directly from TSO. Ie (after execution found =1) But when i am submitting this from batch JCL not getting exected results. (ie found = 0)
Will outtrap command execute while executing from batch JCL?
Code: |
DMY=OUTTRAP("LOADLINES.","*")
ADDRESS TSO
"PRINT IDS('TEST.SDR.LOADLIB(TESTPGM)') CHAR"
DMY = OUTTRAP("OFF")
FOUND=0
DO K= 1 TO 2
IF POS('ZEPF',LOADLINES.K) > 0 THEN DO
FOUND=1
LEAVE
END
END
|
Please share your thoughts.
Thanks in advance
R KARTHIK |
|
Back to top |
|
|
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Have you done any investigation yourself?
You have run OUTTRAP. Surely you now know whether it executes or not?
Why don't you get a little bit of code to show you what (if anything) exists in LOADLINES? What are the values you get in DMY at the relevant points? |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1787 Location: Bloomington, IL
|
|
|
|
You are running your exec in batch in background TSO (PGM=IKJEFT01, not PGM=IRXJCL), yes? |
|
Back to top |
|
|
karthikr44
Active User
Joined: 25 Aug 2007 Posts: 235 Location: Chennai
|
|
|
|
HI,
Yes Akatsukami. I am running this code through PGM=IKJEFT01.
Since this dataset is in undefined format, i am using Outtrap and PRINT IDS command. I cant use EXECIO command.
Please let me know any alternative way.
Thanks
R KARTHIK |
|
Back to top |
|
|
karthikr44
Active User
Joined: 25 Aug 2007 Posts: 235 Location: Chennai
|
|
|
|
HI,
I am doing some investigation between both execution. Will post you the updates soon.
Thanks
R KARTHIK |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Quote: |
But when i am submitting this from batch JCL not getting (sic) exected results. (ie found = 0) |
not bothering to go into the necessary libraries you need,
why don't you think found=1?
how are you seeing the results? |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
you can do this with LMM routines,
which would save you memory in the event one of these load members is reallllllllllly big,
but otherwise OUTTRAPing the print, or a variation of that is probably easier,
coding-wise. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
to get around the file size problem,
since you are only processing 2 records anyway
actually you are only processing 1 record from the testpgm file.
the first item in your stem is
Code: |
RECORD SEQUENCE NUMBER - 1
|
so modify your print command as follows:
Code: |
"PRINT IDS('TEST.SDR.LOADLIB(TESTPGM)') COUNT(1) CHAR"
|
then instead of looping, you only need to address the 2 stem item
to see if your POS('ZEPF',LOADLINES.K) is > 0. |
|
Back to top |
|
|
karthikr44
Active User
Joined: 25 Aug 2007 Posts: 235 Location: Chennai
|
|
|
|
HI ALL,
I found the problem. Before outtrap command i am using the following code to copy the member of PDS.
Code: |
"ISPEXEC LMINIT DATAID(FROMDD) DATASET('PROD.LOADLIB')"
"ISPEXEC LMINIT DATAID(BKPDD) DATASET('TEST.SDR.LOADLIB')",
" ENQ(EXCLU)"
"ISPEXEC LMCOPY FROMID(&FROMDD) FROMMEM(YRFTGU01) TOMEM(TESTPGM)
" REPLACE TODATAID(&BKPDD)"
"ISPEXEC LMFREE DATAID("BKPDD")"
"ISPEXEC LMFREE DATAID("FROMDD")"
|
When i am invoking directly from TSO, new member YRFTGU01 is copied to TESTPGM.
But when i am submitting in batch thru IKJEFT01, new member YRFTGU01 is not copied to TESTPGM.
Will LMM service not work when submitting thru batch? Is there any alternative to copy the member from PDS.
Thanks
R KARTHIK |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
karthikr44 wrote: |
Will LMM service not work when submitting thru batch? |
ISPF Services work just fine if you remember to start ISPF and if you've provided all of the necessary ISPF libraries to that job step.
karthikr44 wrote: |
Is there any alternative to copy the member from PDS |
What's wrong with a good old-fashioned IEBCOPY step? |
|
Back to top |
|
|
karthikr44
Active User
Joined: 25 Aug 2007 Posts: 235 Location: Chennai
|
|
|
|
HI Superk,
Thanks for your reply. I tried giving ISPF libs which i picked from LOGON jcl. Still LMM service not working. Is there any standard IBM library for ISPF service.
If it is possible can you please suggest how to use IEBCOPY in rexx. I searched in forums. But not getting how to use that.
Thanks
R KARTHIK |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Try the free ISPF Edit Macro utility BATCHPDF which will create a batch equivalent to your TSO and ISPF session. You can tweak the results from there however you please.
You can use IEBCOPY like you use any utility or program in TSO. You allocate the necessary DD statements and you call it. Seriously, do you not know how to run programs in TSO? A quick review:
Code: |
/* REXX */
...
"ALLOC F(ddname) DA(.....)"
"ALLOC F(SYSIN) NEW REU RECFM(F B) LRECL(80) UNIT(VIO) SPACE(1,1) CYLINDERS"
Queue "your sysin parameters"
"EXECIO "Queued()" DISKW sysin (FINIS"
"CALL *(IEBCOPY)"
"FREE F(ddname .... SYSIN)"
...
|
|
|
Back to top |
|
|
karthikr44
Active User
Joined: 25 Aug 2007 Posts: 235 Location: Chennai
|
|
|
|
HI Kevin,
Thanks for your reply.
I coded IEBCOPY in REXX. It is working perfectly as expected.
Code: |
"ALLOC F(SYSUT1) DS('PROD.LOADLIB')
SHR REUSE"
"ALLOC F(SYSUT2) DS('TEST.SDR.LOADLIB')
SHR REUSE"
"ALLOC F(SYSPRINT) SYSOUT REUSE"
"ALLOC F(SYSIN) UNIT(SYSDA) SPACE(1 1) TRACKS REUSE"
SYSIN.0 = 2
SYSIN.1 = " C I=SYSUT1,O=SYSUT2"
SYSIN.2 = " SELECT MEMBER=((DRDED022,TESTPGM,R))"
"EXECIO * DISKW SYSIN (FINIS STEM SYSIN."
DROP SYSIN.
"CALL *(IEBCOPY)"
"FREE F(SYSUT1 SYSUT2 SYSPRINT SYSIN)"
|
Thanks all for your suggestions.
R KARTHIK |
|
Back to top |
|
|
|