file movement using sas

Reply
Contributor
Posts: 42

file movement using sas


Hi ,

Using  sas coding in mainframe, I want to move different mainframe datasets to remote system/location.

what all(s/w , scripts, etc) will be required to achieve this?

Does anybody has code to achieve this?

thanks

Esteemed Advisor
Posts: 6,646

Re: file movement using sas

Have your datacenter people move the files for you. They get paid to do that. And have the tools.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Super User
Super User
Posts: 6,318

Re: file movement using sas

Are you talking about SAS dataset or other types of files?

Is SAS available on the target systems?  Then you can use SAS/Connect to move SAS datasets and other files.

Otherwise you can use FTP to move files. 

Contributor
Posts: 42

Re: file movement using sas

I mean Mainframe files/ datasets.. (not SAS datasets)
I need to create a sas code logic(nothing manual) to daily move these files to a remote system(how can this be achieved  a) if SAS is present on remote system    b)  if SAS is not present ?

Esteemed Advisor
Posts: 6,646

Re: file movement using sas

Use JCL. Don't try to drive in nails with a stalk of celery.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Contributor
Posts: 42

Re: file movement using sas

do you have any reference(s)/samples of sas+jcl code that deals with file movement?

Esteemed Advisor
Posts: 6,646

Re: file movement using sas

You don't need SAS at all.

from:

http://www.lascon.co.uk/zOS-file-utilities.php

an example for flatfiles with IEBGENER:

//S1       EXEC PGM=IEBGENER

//SYSUT1   DD DISP=SHR,DSN=input dataset

//SYSUT2   DD DISP=(,CATLG,DELETE),DSN=output dataset,

//    DATACLAS=SEQ80

//SYSPRINT DD SYSOUT=*

//SYSIN    DD *

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Contributor
Posts: 42

Re: file movement using sas

where do I give the username, pwd & host name and port of remote system.

Also I want to execute this in infinite loop so as to keep checking for arrival of files and their movement..    such that as new files arrive , they should be moved to remote system...?

how do I add an infinite  loop here ...

Grand Advisor
Posts: 17,321

Re: file movement using sas

As mentioned this isn't a SAS question. You're best off posting this to Stack Overflow, with more details of course Smiley Happy

Esteemed Advisor
Posts: 6,646

Re: file movement using sas

You are working on a mainframe, so you have a staff of data center people who are versed in JCL, TSO and the other IBM mainframe tools. Hand the problem over to them (or at least get their advice), it is their job, they get paid for it.

If they don't want to help, tell your boss to send you to the IBM operator courses Smiley Wink. This usually fixes any interdepartment "communication problems".

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
Ask a Question
Discussion stats
  • 9 replies
  • 372 views
  • 2 likes
  • 4 in conversation