MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Equivalent command to Linenum in Batch

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
vaasavi
Beginner


Joined: 20 Jun 2005
Posts: 14
Topics: 5

PostPosted: Thu Aug 04, 2005 4:16 am    Post subject: Equivalent command to Linenum in Batch Reply with quote

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
View user's profile Send private message
vvallaturu
Beginner


Joined: 28 Feb 2005
Posts: 8
Topics: 2
Location: Hyderabad

PostPosted: Thu Aug 04, 2005 5:18 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger
vaasavi
Beginner


Joined: 20 Jun 2005
Posts: 14
Topics: 5

PostPosted: Thu Aug 04, 2005 5:45 am    Post subject: Reply with quote

hi venkat,

I am getting the following error

63 *-* ADDRESS ISPEXEC "ISREDIT(VAR1)=LINENUM"
+++ RC(-3) +++
Back to top
View user's profile Send private message
Mervyn
Moderator


Joined: 02 Dec 2002
Posts: 415
Topics: 6
Location: Hove, England

PostPosted: Thu Aug 04, 2005 6:14 am    Post subject: Reply with quote

Don't you need:

Code:

"ISREDIT (VAR1) = LINENUM .ZCSR"


Cheers,
Merv
_________________
The day you stop learning the dinosaur becomes extinct
Back to top
View user's profile Send private message
vaasavi
Beginner


Joined: 20 Jun 2005
Posts: 14
Topics: 5

PostPosted: Thu Aug 04, 2005 6:20 am    Post subject: Reply with quote

Hi Merv,

Still i am getting the smae error
63 *-* ADDRESS ISPEXEC "ISREDIT(VAR1)=LINENUM .ZCSR"
+++ RC(-3) +++
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12358
Topics: 75
Location: San Jose

PostPosted: Thu Aug 04, 2005 6:44 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website
vvallaturu
Beginner


Joined: 28 Feb 2005
Posts: 8
Topics: 2
Location: Hyderabad

PostPosted: Thu Aug 04, 2005 9:52 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group