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 

Copy a Load module from One PDS to another thru REXX
Goto page 1, 2  Next
 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> TSO and ISPF
View previous topic :: View next topic  
Author Message
meena_cts
Beginner


Joined: 13 Feb 2007
Posts: 5
Topics: 1
Location: Chennai

PostPosted: Mon Mar 12, 2007 1:24 am    Post subject: Copy a Load module from One PDS to another thru REXX Reply with quote

Hi,
I need to copy a load module member from one pds to another tru Rexx Pgm.
But this doesn't work.
Can U PLease Help out?
Note:I am able to do the below task manually (i.e) copy loadmodule from one PDS to another mentioned below )

Below is the code which i tried..........

Code:

/* rexx */                                                         
"Alloc Fi(SYSUT1) Da('ENDH1.B0YCL007.SBATLOAD(ABEND1)') Shr Reu"   
"Alloc Fi(SYSUT2) Da('N408f0.GULF.LOADLIB(ABEND1)') Shr Reu"       
"Alloc Fi(SYSPRINT) Sysout Reu"                                   
"Alloc Fi(SYSIN) Dummy Reu"                                       
"IEBGENER"                                                         
say 'Copy return code = 'rc                                       
"Free Fi(SYSUT1 SYSUT2 SYSIN SYSPRINT)"
Back to top
View user's profile Send private message
ofer71
Intermediate


Joined: 12 Feb 2003
Posts: 358
Topics: 4
Location: Israel

PostPosted: Mon Mar 12, 2007 2:46 am    Post subject: Reply with quote

Why not IEBCOPY???????????

By the way, you can always use ISPF services from within REXX, like LMMCOPY.

O.
________
AMC Straight-4 engine history


Last edited by ofer71 on Sat Feb 05, 2011 11:57 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Mon Mar 12, 2007 3:23 am    Post subject: Reply with quote

What did it fail with?
_________________
Utility and Program control cards are NOT, repeat NOT, JCL.
Back to top
View user's profile Send private message
meena_cts
Beginner


Joined: 13 Feb 2007
Posts: 5
Topics: 1
Location: Chennai

PostPosted: Mon Mar 12, 2007 3:45 am    Post subject: Reply with quote

1)When i use IEBGENER,i am getting rc =12 and the member is created as empty in output pds(N408f0.GULF.LOADLIB)
2)When i use IEBCOPY,rc=0 ,But member is not copied to output pds at all
3)As,I m in learning phase with Rexx, I dont know how to code LMMCOPY.Plz let know.
Back to top
View user's profile Send private message
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Mon Mar 12, 2007 3:45 am    Post subject: Reply with quote

I ran you code with my data (but not a load module) and got a 0 retrun code - are your DCBs the same?
_________________
Utility and Program control cards are NOT, repeat NOT, JCL.
Back to top
View user's profile Send private message
meena_cts
Beginner


Joined: 13 Feb 2007
Posts: 5
Topics: 1
Location: Chennai

PostPosted: Mon Mar 12, 2007 6:50 am    Post subject: Reply with quote

Yes, I am also able to copy normal member(say pgm or copybook) successfully.
But Load modules,i m not able to copy.

Both the PDS are having same RECFM as U,
But LRECL is different ,iNPUT PDS is having 0 LRECL and OUTPUT PDS is having 80 Record length.
Is LRECL is the problem?
Note:But i am able to copy the same member manually as mentioned earlier.
ie. opening the Input PDS in View mode and placing a character 'C' in front of member we need to copy and then pressing enter,we get next screen wherein output pds where we need to copy is to be mentioned.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Mon Mar 12, 2007 7:07 am    Post subject: Reply with quote

meena_cts,

Is the blksize same on both datasets?

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Mon Mar 12, 2007 7:24 am    Post subject: Reply with quote

I have managed to copy a load module using your Rexx. I note that the DCB on my load library is LRECL=0, BLKSIZE=6144(!) and RECFM=U and these were the same on my output library. I think Load libraries have a LRECL = 0 so your 80 is wrong. Thjis is where IEBGENER is gettin confused because it needs control cards to change from one LRECL to another.

I have just tried to open my load library in View mode and got a message saying BROWSE SUBSTITUED and the line command C does not exist.
_________________
Utility and Program control cards are NOT, repeat NOT, JCL.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


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

PostPosted: Mon Mar 12, 2007 9:55 am    Post subject: Reply with quote

Quote:

I think Load libraries have a LRECL = 0 so your 80 is wrong.


Nic,

Not exactly true. You can copy even when the LRECL is 80. It just overrides the LRECL. Try copying it. The problem comes only when blksizes are different.

Quote:
I have just tried to open my load library in View mode and got a message saying BROWSE SUBSTITUED and the line command C does not exist.


Is your load module a PDS? or a sequential dataset?

Kolusu
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Nic Clouston
Advanced


Joined: 01 Feb 2007
Posts: 1075
Topics: 7
Location: At Home

PostPosted: Mon Mar 12, 2007 10:09 am    Post subject: Reply with quote

I admit to using a PDSE as I was trying to replicate the problem. I do not know if the PDS's used by Meena_ct are PDSEs or plain old PDSs and I have no idea if that would make a difference. But I am sure that it is the difference in the DCB info between the 2 datasets that is the problem. I am going to have to set up a special PDS with recfm=U and LRECL80 - Just done that and my copy still worked with rc = 0 so I think we need the error messages.
_________________
Utility and Program control cards are NOT, repeat NOT, JCL.
Back to top
View user's profile Send private message
semigeezer
Supermod


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

PostPosted: Mon Mar 12, 2007 2:54 pm    Post subject: Reply with quote

All pretty much irrelevant. You can't copy a load module with IEBGENER and expect it to work because IEBGENER does not copy the directory entry and that is what tells the loader how to load and start the load module.

You should use IEBCOPY and use the COPYMOD statement (not COPY) which will reblock the module if needed. If you use LMCOPY, it will just use IEBCOPY under the covers.
Back to top
View user's profile Send private message Visit poster's website
meena_cts
Beginner


Joined: 13 Feb 2007
Posts: 5
Topics: 1
Location: Chennai

PostPosted: Mon Mar 12, 2007 11:53 pm    Post subject: Reply with quote

Hi ,

I searched for the syntax to specify COPYMOD Option next to IEBCOPY command.

In Jcl,its like

COPYMOD OUTDD(outdd1) INDD(indd1)

Plz let me know the syntax in Rexx.
Back to top
View user's profile Send private message
ofer71
Intermediate


Joined: 12 Feb 2003
Posts: 358
Topics: 4
Location: Israel

PostPosted: Tue Mar 13, 2007 12:53 am    Post subject: Reply with quote

There is no different syntax for REXX, since you invoke the original utility from within REXX. Simply write your input statements to SYSIN.

O.
________
20SE


Last edited by ofer71 on Sat Feb 05, 2011 11:57 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
meena_cts
Beginner


Joined: 13 Feb 2007
Posts: 5
Topics: 1
Location: Chennai

PostPosted: Tue Mar 13, 2007 5:37 am    Post subject: Reply with quote

Rexx Code below not working
_________________________________________________________
/* rexx */
"Alloc Fi(sysut1) Da('ENDH1.B0YCL007.SBATLOAD(ABEND1)') Shr Reu"
"Alloc Fi(sysut2) Da('N408F0.GULF.LOADLIB(ABEND1)') Shr Reu"
"Alloc Fi(SYSPRINT) Sysout Reu"
"Alloc Fi(SYSIN) Dummy Reu"
"IEBCOPY"
"copymod OUTDD(sysut2) INDD(sysut1)"
say 'Copy return code = ' rc
"Free Fi(SYSUT1 SYSUT2 SYSIN SYSPRINT)"
______________________________________

Error message obtained:
COMMAND COPYMOD NOT FOUND
Copy return code = -3
Back to top
View user's profile Send private message
ofer71
Intermediate


Joined: 12 Feb 2003
Posts: 358
Topics: 4
Location: Israel

PostPosted: Tue Mar 13, 2007 6:39 am    Post subject: Reply with quote

IEBCOPY expects its input in SYSIN.

Do something like this:
- Allocate SYSIN (not DUMMY).
- Assign the parameters to a variable.
- Write this variable to SYSIN using EXECIO.

O.
________
Toyota Auris specifications


Last edited by ofer71 on Sat Feb 05, 2011 11:58 am; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail
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
Goto page 1, 2  Next
Page 1 of 2

 
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