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 

ISREDIT COPY Command - Getting the No. Of Lines Copied.

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


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Sat Feb 22, 2003 3:21 am    Post subject: ISREDIT COPY Command - Getting the No. Of Lines Copied. Reply with quote

I'm using the following command in my Rexx routine to copy a set of copybooks into the program.

Code:

"ISREDIT COPY "DSN_NAME" AFTER .ZCSR" 


Is there any way to know how many lines have been copied. Anyway, I want to copy the entire copybook (.ZFIRST - .ZLAST). But I'm using a Panel in which I have the details like which copybook has been found, and where it is found and how many lines it contains.... Previously, I was capturing the file info. into a Stem and copy the contents using a loop. But I felt that as in-efficient.

So, I would like to know whether there is any way to know the no. of lines in the copybook without opening it using Alloc (or) other commands and reading it (or) opening it via a Macro and then find for .ZLAST and fetch the line number of .ZLAST.

Will ISPF store the no.of lines copied into some system variable.

Please Advise.

Thanks,
Phantom,
Back to top
View user's profile Send private message
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Sat Feb 22, 2003 1:00 pm    Post subject: Reply with quote

No, but what is wrong with looking at .zlast before and after your copy? It's only 3 lines of code including the subtraction.
Back to top
View user's profile Send private message Visit poster's website
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Sun Feb 23, 2003 10:40 pm    Post subject: Reply with quote

No Semigeezer, I don't mind coding the 3 additional lines to find out the no. of lines. But finding out the value of .ZLAST means that, open the PS using another MACRO and then find the .ZLAST. ie. It includes additional I/O Operation which I think would be in-efficient, just to find out the no. of lines. So, I just want to know whether, the COPY command stores the value in some system variable which could be read without additional I/O. B'cas opening the same PS once for copying the contents and again for finding out the no. of lines is totally in-efficient.
Back to top
View user's profile Send private message
semigeezer
Supermod


Joined: 03 Jan 2003
Posts: 1014
Topics: 13
Location: Atlantis

PostPosted: Sun Feb 23, 2003 10:45 pm    Post subject: Reply with quote

??? I don't understand why you would need to open it twice. You get the size of the data set before the copy, do the copy, get the new size and subtract.
Back to top
View user's profile Send private message Visit poster's website
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Sun Feb 23, 2003 10:55 pm    Post subject: Reply with quote

Sorry,

I don't understand what you are saying. To get the size of the file that file must be opened via a MACRO, correct. Just like this

Code:

"ISPEXEC EDIT DATASET(dsn) MACRO(macro)"


Then use the .ZLAST command to find out the line. Then how would you copy the contents in the main program, b'cas now the MACRO is pointing to the copybook and not to the main program. So, you need to come back to the main routine and again give "ISREDIT COPY ... AFTER .ZCSR".

If I am wrong please explain me, where I went wrong.

Thanks,
Phantom,
Back to top
View user's profile Send private message
Premkumar
Moderator


Joined: 28 Nov 2002
Posts: 77
Topics: 7
Location: Chennai, India

PostPosted: Sun Feb 23, 2003 11:00 pm    Post subject: Reply with quote

Semigeezer says,

1. Get the size of the program before you copy the copybook into it.
2. Get the size of the program after you copy the copybook into it.
3. Difference will give you the size of the copybook you copied.
Back to top
View user's profile Send private message Send e-mail
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Sun Feb 23, 2003 11:02 pm    Post subject: Reply with quote

Okay, I got it now, Thanks Premkumar & Semigeezer.
Back to top
View user's profile Send private message
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