Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to use the SMCOPY command ?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: How to use the SMCOPY command ?
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10231
Location: italy

PostPosted: Tue Nov 04, 2008 12:40 pm    Post subject: Reply to: How to use the SMCOPY command ?
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: 8593
Location: Back in jolly old England

PostPosted: Tue Nov 04, 2008 1:10 pm    Post subject:
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10231
Location: italy

PostPosted: Tue Nov 04, 2008 1:13 pm    Post subject: Reply to: How to use the SMCOPY command ?
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
http://www-03.ibm.com/systems/z/os/zos/bkserv/index.html#other_pubs

look at the ISPF manual for ...
http://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

Senior Member


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

PostPosted: Wed Nov 05, 2008 6:53 am    Post subject: Reply to: How to use the SMCOPY command ?
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    Post subject: Reply to: How to use the SMCOPY command ?
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10231
Location: italy

PostPosted: Thu Nov 06, 2008 6:59 pm    Post subject: Reply to: How to use the SMCOPY command ?
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

Global Moderator


Joined: 14 Mar 2007
Posts: 10231
Location: italy

PostPosted: Thu Nov 06, 2008 7:04 pm    Post subject: Reply to: How to use the SMCOPY command ?
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

Senior Member


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

PostPosted: Thu Nov 06, 2008 10:42 pm    Post subject: Reply to: How to use the SMCOPY command ?
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

Senior Member


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

PostPosted: Thu Nov 06, 2008 10:45 pm    Post subject: Reply to: How to use the SMCOPY command ?
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    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts TSO or command line utility to genera... kishpra JCL & VSAM 3 Thu Mar 09, 2017 1:11 am
No new posts Customizing the ISPF HILITE Command Pedro TSO/ISPF 3 Fri Mar 03, 2017 11:49 pm
No new posts Fail to change physical VSAM filename... jacobdng CICS 7 Fri Jan 20, 2017 12:36 pm
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 7 Fri Nov 18, 2016 1:48 pm
No new posts SDSF Command Avtrix CLIST & REXX 4 Fri Sep 30, 2016 11:13 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us