View previous topic :: View next topic |
Author |
Message |
meena_cts Beginner
Joined: 13 Feb 2007 Posts: 5 Topics: 1 Location: Chennai
|
Posted: Mon Mar 12, 2007 1:24 am Post subject: Copy a Load module from One PDS to another thru REXX |
|
|
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 |
|
 |
ofer71 Intermediate
Joined: 12 Feb 2003 Posts: 358 Topics: 4 Location: Israel
|
Posted: Mon Mar 12, 2007 2:46 am Post subject: |
|
|
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 |
|
 |
Nic Clouston Advanced
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
|
Posted: Mon Mar 12, 2007 3:23 am Post subject: |
|
|
What did it fail with? _________________ Utility and Program control cards are NOT, repeat NOT, JCL. |
|
Back to top |
|
 |
meena_cts Beginner
Joined: 13 Feb 2007 Posts: 5 Topics: 1 Location: Chennai
|
Posted: Mon Mar 12, 2007 3:45 am Post subject: |
|
|
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 |
|
 |
Nic Clouston Advanced
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
|
Posted: Mon Mar 12, 2007 3:45 am Post subject: |
|
|
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 |
|
 |
meena_cts Beginner
Joined: 13 Feb 2007 Posts: 5 Topics: 1 Location: Chennai
|
Posted: Mon Mar 12, 2007 6:50 am Post subject: |
|
|
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 |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Mon Mar 12, 2007 7:07 am Post subject: |
|
|
meena_cts,
Is the blksize same on both datasets?
Kolusu _________________ Kolusu
www.linkedin.com/in/kolusu |
|
Back to top |
|
 |
Nic Clouston Advanced
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
|
Posted: Mon Mar 12, 2007 7:24 am Post subject: |
|
|
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 |
|
 |
kolusu Site Admin

Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
|
Posted: Mon Mar 12, 2007 9:55 am Post subject: |
|
|
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 |
|
 |
Nic Clouston Advanced
Joined: 01 Feb 2007 Posts: 1075 Topics: 7 Location: At Home
|
Posted: Mon Mar 12, 2007 10:09 am Post subject: |
|
|
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 |
|
 |
semigeezer Supermod
Joined: 03 Jan 2003 Posts: 1014 Topics: 13 Location: Atlantis
|
Posted: Mon Mar 12, 2007 2:54 pm Post subject: |
|
|
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 |
|
 |
meena_cts Beginner
Joined: 13 Feb 2007 Posts: 5 Topics: 1 Location: Chennai
|
Posted: Mon Mar 12, 2007 11:53 pm Post subject: |
|
|
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 |
|
 |
ofer71 Intermediate
Joined: 12 Feb 2003 Posts: 358 Topics: 4 Location: Israel
|
Posted: Tue Mar 13, 2007 12:53 am Post subject: |
|
|
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 |
|
 |
meena_cts Beginner
Joined: 13 Feb 2007 Posts: 5 Topics: 1 Location: Chennai
|
Posted: Tue Mar 13, 2007 5:37 am Post subject: |
|
|
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 |
|
 |
ofer71 Intermediate
Joined: 12 Feb 2003 Posts: 358 Topics: 4 Location: Israel
|
Posted: Tue Mar 13, 2007 6:39 am Post subject: |
|
|
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 |
|
 |
|
|