IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

tso copy in the foreground


IBM Mainframe Forums -> TSO/ISPF
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
dot1q3
Warnings : 1

New User


Joined: 09 Feb 2021
Posts: 26
Location: United States

PostPosted: Tue Feb 09, 2021 11:23 pm
Reply with quote

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

Superior Member


Joined: 14 Mar 2007
Posts: 10886
Location: italy

PostPosted: Tue Feb 09, 2021 11:32 pm
Reply with quote

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

Active Member


Joined: 01 Dec 2006
Posts: 792
Location: Pennsylvania

PostPosted: Wed Feb 10, 2021 12:00 am
Reply with quote

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
View user's profile Send private message
dot1q3
Warnings : 1

New User


Joined: 09 Feb 2021
Posts: 26
Location: United States

PostPosted: Wed Feb 10, 2021 12:08 am
Reply with quote

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
View user's profile Send private message
dot1q3
Warnings : 1

New User


Joined: 09 Feb 2021
Posts: 26
Location: United States

PostPosted: Wed Feb 10, 2021 12:08 am
Reply with quote

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

Active Member


Joined: 01 Dec 2006
Posts: 792
Location: Pennsylvania

PostPosted: Wed Feb 10, 2021 12:22 am
Reply with quote

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
View user's profile Send private message
dot1q3
Warnings : 1

New User


Joined: 09 Feb 2021
Posts: 26
Location: United States

PostPosted: Wed Feb 10, 2021 12:36 am
Reply with quote

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

Superior Member


Joined: 14 Mar 2007
Posts: 10886
Location: italy

PostPosted: Wed Feb 10, 2021 12:46 am
Reply with quote

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

Active Member


Joined: 01 Dec 2006
Posts: 792
Location: Pennsylvania

PostPosted: Wed Feb 10, 2021 12:48 am
Reply with quote

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
View user's profile Send private message
dot1q3
Warnings : 1

New User


Joined: 09 Feb 2021
Posts: 26
Location: United States

PostPosted: Wed Feb 10, 2021 12:49 am
Reply with quote

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
View user's profile Send private message
dot1q3
Warnings : 1

New User


Joined: 09 Feb 2021
Posts: 26
Location: United States

PostPosted: Wed Feb 10, 2021 12:50 am
Reply with quote

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

Active Member


Joined: 01 Dec 2006
Posts: 792
Location: Pennsylvania

PostPosted: Wed Feb 10, 2021 12:53 am
Reply with quote

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

Active Member


Joined: 01 Dec 2006
Posts: 792
Location: Pennsylvania

PostPosted: Wed Feb 10, 2021 1:10 am
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> TSO/ISPF

 


Similar Topics
Topic Forum Replies
No new posts Copy only TEXT or String from a record SYNCSORT 4
No new posts Use Copy Utility DB2 7
No new posts VB to VB copy - Full length reached SYNCSORT 8
No new posts Need COBOL COPY Help in MVS Environment COBOL Programming 4
No new posts Issue after ISPF copy to Linklist Lib... TSO/ISPF 1
Search our Forums:

Back to Top