BookmarkSubscribeRSS Feed
marka
Calcite | Level 5
On the mainframe (MVS) I know how to read in multiple datasets using the concatenated DD stmt. Is there something similar for pc-SAS (Windows) when reading MVS datasets using the FILENAME FTP statement?
5 REPLIES 5
sbb
Lapis Lazuli | Level 10 sbb
Lapis Lazuli | Level 10
Not that I'm aware of - the ability to concatenate files is within the FILENAME specification and enclosing your quoted files in parentheses. I don't expect that you can open two concurrent FTP connections as a concatenation.

Scott Barry
SBBWorks, Inc.
marka
Calcite | Level 5
Thanks
Peter_C
Rhodochrosite | Level 12
don't give up just yet.
The syntax definition allows concatenation within the filename statement.
I just had some success with code like[pre]filename fcont ftp ("'AUP.SREED.ACT.AVP.PETER(H)'"
"'AUP.SREED.ACT.AVP(EXIST)'" )
user= 'your user ID'
prompt /*for password*/
HOST='your hostname'
;
data _null_ ;
length filen $200 ;
infile fcont filename= filen ;
input ;
if filen ne lag(filen) then put filen= ;
put _infile_ ;
run ; [/pre]PeterC
data_null__
Jade | Level 19
The EOV INFILE statement option provides a more general method for concatenation boundary detection. Using changes to the value of FILENAME would not work if the files have the same name by design or accident when FILENAME is defined with improper attributes.

[pre]
filename FT15F001 temp;
parmcards;
Use EOV
1
2
3
4
5
;
run;


filename FT30F001 ("%sysfunc(pathname(ft15f001))" "%sysfunc(pathname(ft15f001))" "%sysfunc(pathname(ft15f001))");
data _null_;
length filename $100;
infile FT30F001 eov=eov filename=filename;
input;
if _n_ eq 1 or EOV then do;
put 'NOTE: ' _n_= filename=;
eov = 0;
end;
run;[/pre]
marka
Calcite | Level 5
Thanks, this works great!

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 757 views
  • 0 likes
  • 4 in conversation