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

How to use the SMCOPY command ?


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
yuvaraj C

New User


Joined: 01 Jan 2008
Posts: 14
Location: IBM-India

PostPosted: Tue Nov 04, 2008 12:36 pm
Reply with quote

Hi,

I have written a CLIST program using SMCOPY command for copying the datasets.

When I use the logic to copy the datasets having the LRECL < 256 .it's working fine.But at the sametime when I use the logic copy a dataset which has LRECL = 309,it could not able to copy. I got the following error message.

IHTHPXFF.MSIXXXX.IHTA1.ATIFOUTA.G3045V00
FROM DATA SET LRECL INVALID

Could you please give me a solution to copy this dataset?

Thanks,
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Nov 04, 2008 12:40 pm
Reply with quote

check the manuals ( tso/e series )
smcopy is not a general use utility, is an utility deigned specifically
for the TSO/E session manager environment
using it for generic data set copy is not recommended
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Tue Nov 04, 2008 1:10 pm
Reply with quote

You can use LMCOPY (ISPF Services), you can invoke any IBM utility or any other program to perform the copy.

There are examples in the forum.

Also, for future reference, please DO NOT attach documents as many people are unable to open them due to security restrictions. This will seriously hinder your chances of a response should you have a problem.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Tue Nov 04, 2008 1:13 pm
Reply with quote

why do You waste resources posting as attachment material that anybody can find on the net
starting for example from Your employer's
www-03.ibm.com/systems/z/os/zos/bkserv/index.html#other_pubs

look at the ISPF manual for ...
publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/ispser03/2.25?ACTION=MATCHES&REQUEST=lmcopy&TYPE=FUZZY&SHELF=ISPBKM08.bks&DT=19990719141855&CASE=&searchTopic=TOPIC&searchText=TEXT&searchIndex=INDEX&rank=RANK&ScrollTOP=FIRSTHIT#FIRSTHIT

not the latest release but enough to start with

the useless post with attachment will be deleted
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Wed Nov 05, 2008 6:53 am
Reply with quote

Quote:
I have written a CLIST program...

I realize some people have to support CLISTs, but new development should be in rexx. It is easier to code in, more powerful, work almost everywhere that CLISTs do, etc...
Back to top
View user's profile Send private message
yuvaraj C

New User


Joined: 01 Jan 2008
Posts: 14
Location: IBM-India

PostPosted: Thu Nov 06, 2008 6:53 pm
Reply with quote

Hi,

As I have completed my coding part.It is very difficult to switch to develop a code newly in REXX.

As you suggested me to use the LMCOPY,I have modified the logic as below.If I get a solution for this,it would be great help for me.
Code:
BB01CPY: SET BBFDS = &STR(&SYSUID.&BB1.&BB2.&D1)                     
         SET STR4 = &SUBSTR(1:21,&INFILE)                             
         WRITE &BBFDS                                                 
         SET STR5 = &STR('&STR4')                                     
         WRITE &STR5                                                 
         ALLOC DA('&SYSUID.&BB1.&BB2.&D1') DSORG(PS) SPACE(100,50) + 
         TRACKS LRECL(800) BLKSIZE(27920) RECFM(V,B) NEW             
         SMCOPY FROMDATASET(&STR5) TOSTREAM('&SYSUID.&BB1.&BB2.&D1') 
         GOTO LM1                                                     


LM2: "ISPEXEC LMCOPY FROMID('INDD1') TODATAID('OUTDD1') REPLACE"       
     SET C3 = &C3 +1                                                   
     GOTO RFILE                                                         
/*                                                                     
LM1: "ISPEXEC LMINIT DATAID('INDD1') DATASET('&INFILE')"               
     "ISPEXEC LMINIT DATAID('OUTDD1') DATASET('&SYSUID.&BB1.&BB2.&D1')"             



Explanation:

After allocating the dataset in 'BB01CPY' the flow will go to 'LM1' to assign a data-id using LMINIT
and then it will go 'LM2' which copy the datasets using LMCOPY.

But while executing the CLIST program I am getting the following errors
Code:
IKJ56701I MISSING "TO" SESSION MANAGER STREAM NAME+                         
 IKJ56716I EXTRANEOUS INFORMATION WAS IGNORED: 'R05905.OUT.FILE.OCT0308'     
 IKJ56701I MISSING THE SESSION MANAGER "QUERY" COMMAND TO LIST STREAM NAMES   
A command entered or contained in a CLIST has invalid syntax.


Could you help me to resolve it?

Thanks,

Edited: Please use BBcode when You post some code, that's rather readable...Anuj
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Nov 06, 2008 6:59 pm
Reply with quote

Quote:
IKJ56701I MISSING "TO" SESSION MANAGER STREAM NAME+
IKJ56716I EXTRANEOUS INFORMATION WAS IGNORED: 'R05905.OUT.FILE.OCT0308'
IKJ56701I MISSING THE SESSION MANAGER "QUERY" COMMAND TO LIST STREAM NAMES
A command entered or contained in a CLIST has invalid syntax.
Could you help me to resolve it?
Thanks,
_________________
Yuvaraj Chandrasekar.
IBM India.


how could we, since you are mixing up facilities..
what do the IKJ... messages suggest,

also I find very strange that IBM in it' s training
forgot to tell You that it is better to use rexx, rather then clist..
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Thu Nov 06, 2008 7:04 pm
Reply with quote

another thougth...
in one of Your previous posts one dataset name looked like a GDG

You should remember that for heavy I/O clist/rexx and even lmcopy services
are not the best options

what prevents You from using specific tools,
IDCAMS,IEBGENER, or the best one DFSORT to do Your copying...

silly requirements, bad advices, .....
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Thu Nov 06, 2008 10:42 pm
Reply with quote

Quote:
As I have completed my coding part


Obviously, you have not!

You can call a rexx program from a clist. I recommend breaking this function into a separate member of your pds and code it in rexx.
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Thu Nov 06, 2008 10:45 pm
Reply with quote

Code:
SMCOPY FROMDATASET(&STR5) TOSTREAM('&SYSUID.&BB1.&BB2.&D1')


Seems like you want a from DATASET and a to DATASET. Hint... TOSTREAM is not the same as TODATASET
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 -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts RACF - Rebuild SETROPTS command which... All Other Mainframe Topics 3
No new posts Routing command Address SDSF to other... TSO/ISPF 2
No new posts DTL - how to define key with stacked ... TSO/ISPF 3
No new posts LTJ command CA Products 4
No new posts Query on edit primary command CLIST & REXX 5
Search our Forums:

Back to Top