View previous topic :: View next topic
|
Author |
Message |
dot1q3 Warnings : 1 New User
Joined: 09 Feb 2021 Posts: 26 Location: United States
|
|
|
|
i'm trying to use smcopy to copy datasets. here's my syntax
smc fds(mydataset.data1) tds(mydataset.data2)
i'm getting the following error:
smcopy record format of data set not consistent with operation being performed
i see the new mydataset.data2 was created but it's empty.
what could be wrong.
is there any other copy utilities that i can copy in the foreground? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
smcopy is not a general use utility,
IIRC it was used to copy the TSO session manager log datasets
why not use the dataset copy option from the utilities ? |
|
Back to top |
|
|
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
When I use SMCOPY, I always check to see that TODATASET exists.
If it does not, I ALLOCate in my Rexx program first.
You can use the LIKE operand if you wish. |
|
Back to top |
|
|
dot1q3 Warnings : 1 New User
Joined: 09 Feb 2021 Posts: 26 Location: United States
|
|
|
|
enrico-sorichetti wrote: |
smcopy is not a general use utility,
IIRC it was used to copy the TSO session manager log datasets
why not use the dataset copy option from the utilities ? |
sometimes i just want to copy a dataset w/o launching jcl. i just want to do it dynamically in the foreground. |
|
Back to top |
|
|
dot1q3 Warnings : 1 New User
Joined: 09 Feb 2021 Posts: 26 Location: United States
|
|
|
|
daveporcelan wrote: |
When I use SMCOPY, I always check to see that TODATASET exists.
If it does not, I ALLOCate in my Rexx program first.
You can use the LIKE operand if you wish. |
does the todataset need to exist first as a prereq before i can issue this command? |
|
Back to top |
|
|
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
Quote: |
does the todataset need to exist first as a prereq before i can issue this command? |
I am unsure about that. That is why...see above
I was assuming this is part of a Rexx exec. Is that correct?
If not then perhaps options 3.2 (allocate) and 3.3 (copy) would be an option.
Alternatively, I use DUP next to the from dataset in 3.4. I do not know if you have that available at your shop.
I am unsure if that is IBM or how our shop acquired it. |
|
Back to top |
|
|
dot1q3 Warnings : 1 New User
Joined: 09 Feb 2021 Posts: 26 Location: United States
|
|
|
|
daveporcelan wrote: |
Quote: |
does the todataset need to exist first as a prereq before i can issue this command? |
I am unsure about that. That is why...see above
I was assuming this is part of a Rexx exec. Is that correct?
If not then perhaps options 3.2 (allocate) and 3.3 (copy) would be an option.
Alternatively, I use DUP next to the from dataset in 3.4. I do not know if you have that available at your shop.
I am unsure if that is IBM or how our shop acquired it. |
not rexx. just dynamically/interactively copying dataset on the fly in tso |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10886 Location: italy
|
|
|
|
Quote: |
3.2 (allocate) and 3.3 (copy) |
no need ... 3.3 if the dataset does not exists will ask You to proceed with the
allocation |
|
Back to top |
|
|
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
Did you try:
3.2 Look at the FROM Dataset to get a 'picture' of the parameters
3.2 Allocate TO Dataset
3.3 Copy FROM - TO
Never mind. Enrico is correct. 3.3 prompts you to allocate new dataset with options. |
|
Back to top |
|
|
dot1q3 Warnings : 1 New User
Joined: 09 Feb 2021 Posts: 26 Location: United States
|
|
|
|
even when i pre-allocate the todataset, it keeps saying i need to define LRECL and RECFM
what's an example of SMC with these DCBs. i tried to add these but kept getting errors |
|
Back to top |
|
|
dot1q3 Warnings : 1 New User
Joined: 09 Feb 2021 Posts: 26 Location: United States
|
|
|
|
sorry but am not trying to do via panels or ISPF.
this is from the command line using TSO commands in the foreground |
|
Back to top |
|
|
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
Quote: |
sorry but am not trying to do via panels or ISPF.
this is from the command line using TSO commands in the foreground
|
Don't know. Never tried just issuing the command.
Sorry. |
|
Back to top |
|
|
daveporcelan
Active Member
Joined: 01 Dec 2006 Posts: 792 Location: Pennsylvania
|
|
|
|
OK. So I tried it from Option 6 (should have done that the first time)
Code: |
ISPF Command Shell
Enter TSO or Workstation commands below:
===> smc fds(TEMP.XXX.SYSIN) tds(TEMP.XXX.SYSIN2)
DATA SET TEMP.XXX.SYSIN2 NOT IN CATALOG OR CATALOG CAN NOT BE ACCESSED
OUTPUT DATA SET NOT FOUND - ASSUMED TO BE NEW
*** |
The new dataset was allocated correctly, and the data was copied. |
|
Back to top |
|
|
|