View previous topic :: View next topic |
Author |
Message |
vaasavi Beginner
Joined: 20 Jun 2005 Posts: 14 Topics: 5
|
Posted: Thu Aug 04, 2005 4:16 am Post subject: Equivalent command to Linenum in Batch |
|
|
Hi,
I want to capture linenum using rexx in batch.ISREDIT (VAR1)=LINENUM is not working.Can anyone help me by tellng the equivalent command to capture linenumber in rexx in batch.
My requirement is to find a particular string in a program,and then return the linenumber where that string is located.
Thanks,
Vasavi. |
|
Back to top |
|
|
vvallaturu Beginner
Joined: 28 Feb 2005 Posts: 8 Topics: 2 Location: Hyderabad
|
Posted: Thu Aug 04, 2005 5:18 am Post subject: |
|
|
Vasavi,
I could not get why "ISREDIT (VAR1)=LINENUM" is not working, because I used it successfully many times and that too in batch.
Are u using the following code in the REXX which you are running in batch ?
Address Ispexec
"Edit dataset('dsn_to_be_edited') macro(mymacro)"
Hope this will help you.
Let me know if you could solve with the above line.
Bye. _________________ Thank you.
Venkata Krishna
MVS system programmer |
|
Back to top |
|
|
vaasavi Beginner
Joined: 20 Jun 2005 Posts: 14 Topics: 5
|
Posted: Thu Aug 04, 2005 5:45 am Post subject: |
|
|
hi venkat,
I am getting the following error
63 *-* ADDRESS ISPEXEC "ISREDIT(VAR1)=LINENUM"
+++ RC(-3) +++ |
|
Back to top |
|
|
Mervyn Moderator
Joined: 02 Dec 2002 Posts: 415 Topics: 6 Location: Hove, England
|
Posted: Thu Aug 04, 2005 6:14 am Post subject: |
|
|
Don't you need:
Code: |
"ISREDIT (VAR1) = LINENUM .ZCSR"
|
Cheers,
Merv _________________ The day you stop learning the dinosaur becomes extinct |
|
Back to top |
|
|
vaasavi Beginner
Joined: 20 Jun 2005 Posts: 14 Topics: 5
|
Posted: Thu Aug 04, 2005 6:20 am Post subject: |
|
|
Hi Merv,
Still i am getting the smae error
63 *-* ADDRESS ISPEXEC "ISREDIT(VAR1)=LINENUM .ZCSR"
+++ RC(-3) +++ |
|
Back to top |
|
|
kolusu Site Admin
Joined: 26 Nov 2002 Posts: 12358 Topics: 75 Location: San Jose
|
Posted: Thu Aug 04, 2005 6:44 am Post subject: |
|
|
Quote: |
I want to capture linenum using rexx in batch.ISREDIT (VAR1)=LINENUM is not working
|
vaasavi,
ISPF commands (ISPEXEC) will work in batch mode but you need to allocate ISPPLIB (Panel Lib), ISPMLIB (Message Lib), ISPTLIB (Table Lib), SYSEXEC, SYSPROC and other ISPF related libraries to do this.
Take a look at Doug nadel's Batchpdf here. Download the code into your mainframe system and store it in your REXX libraries. Open a empty member and invoke BATCHPDF from the command line. It will create you a JCL which has the ability to call a REXX program with ISPF references.
Batchpdf code:
http://www.sillysot.com/ftp/batchpdf.txt
For more details on invoking REXX from JCL see my posts in this link.
http://www.mvsforums.com/helpboards/viewtopic.php?t=271&highlight=batchpdf
Hope this helps,
Cheers
Kolusu _________________ Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
www.linkedin.com/in/kolusu |
|
Back to top |
|
|
vvallaturu Beginner
Joined: 28 Feb 2005 Posts: 8 Topics: 2 Location: Hyderabad
|
Posted: Thu Aug 04, 2005 9:52 pm Post subject: |
|
|
Vasavi,
Below here is the JCL that allocates the necessary ISPF files and for the session and invokes a REXX in batch and that REXX inturn edits a dataset using an edit macro ( in batch).
JCL
Code: |
//EDITMAC EXEC PGM=IKJEFT01,REGION=8M
//SYSEXEC DD DSN=SF0618.LEARN.EDITMACS,DISP=SHR
//ISPPROF DD DISP=(NEW,DELETE,DELETE),SPACE=(TRK,(1,1,3)),
// DCB=(LRECL=80,RECFM=FB)
//ISPPLIB DD DSN=ISP.SISPPENU,DISP=SHR
//ISPMLIB DD DSN=ISP.SISPMENU,DISP=SHR
//ISPSLIB DD DSN=ISP.SISPSENU,DISP=SHR
//ISPTLIB DD DSN=ISP.SISPTENU,DISP=SHR
//ISPLOG DD SYSOUT=*,DCB=(LRECL=125,RECFM=VBA)
//SYSTSPRT DD SYSOUT=*,DCB=LRECL=125
//SYSPRINT DD SYSOUT=*
//SYSTSIN DD *
ISPSTART CMD(MYREXX2)
/*
|
The REXX contains the sample code :
Code: | /* REXX */
ADDRESS ISPEXEC "EDIT DATASET(XXXX) MACRO(XXX)" |
Hope this will help you. _________________ Thank you.
Venkata Krishna
MVS system programmer |
|
Back to top |
|
|
|
|