BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Tal
Pyrite | Level 9 Tal
Pyrite | Level 9
Hi,
I have 10 equal datasets to read in and append to each other using the "for" loop
When i run that process from pc sas( i use ftp to access the datasets) it works fine but when i do it from within unix sas i get a 0 result
Would any of you have any ecplanaiton what could cause that?

Thx
1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

@Tal wrote:

but god knows  how many times  i  tried to  run  yesterday and  even this morning

i  attached the code and  the  logs  so if you  guys  have time to go over  and  let me know  if you see anyhting strange.

I just worry that the issue  i had  might come back


Perhaps the FTP server was having availability or response issues?

 

An example of the log when it fails might be more informative.

Also running with options MPRINT and SYMBOLGEN may be helpful in debugging if this occurs in the future.

 

I see several places where you are using:

 

Data datasetname;

    set datasetname;

 

coding structure. Since when these go wrong you have replaced the input set debugging can get harder because you can't do a before/after comparison to validate that everything when as planned.

View solution in original post

9 REPLIES 9
andreas_lds
Jade | Level 19

Posting code and log will help to answer your question.

ballardw
Super User

You might show the code from the log that is showing a "0 result"

 

Some things FTP connections may interpret the data differently depending on your transfer settings, binary or text, and the text result may not match the code developed for windows as end of line is different between the two.

Case sensitivity to names rears an ugly head

Path construction/referrences

Permissions (the Unix box can't connect at all for some reason)

 

 

Tal
Pyrite | Level 9 Tal
Pyrite | Level 9

this is insane,

now after so many attempts this thing worked in my  unix box too. So now i am still wondering what is it that   happened in between?

I changed nothing,just ran the code 10 times

Tom
Super User Tom
Super User

Hard to say without seeing logs.  A non uncommon problem is setting macro variables in wrong order. So the first attempt fails because you have haven't defined the macro variable before using it. Then you run again and it works because it used the macro variable you defined at some point later in the first attempt.

Tal
Pyrite | Level 9 Tal
Pyrite | Level 9

but god knows  how many times  i  tried to  run  yesterday and  even this morning

i  attached the code and  the  logs  so if you  guys  have time to go over  and  let me know  if you see anyhting strange.

I just worry that the issue  i had  might come back

ballardw
Super User

@Tal wrote:

but god knows  how many times  i  tried to  run  yesterday and  even this morning

i  attached the code and  the  logs  so if you  guys  have time to go over  and  let me know  if you see anyhting strange.

I just worry that the issue  i had  might come back


Perhaps the FTP server was having availability or response issues?

 

An example of the log when it fails might be more informative.

Also running with options MPRINT and SYMBOLGEN may be helpful in debugging if this occurs in the future.

 

I see several places where you are using:

 

Data datasetname;

    set datasetname;

 

coding structure. Since when these go wrong you have replaced the input set debugging can get harder because you can't do a before/after comparison to validate that everything when as planned.

Tal
Pyrite | Level 9 Tal
Pyrite | Level 9

i just took this code over  yesterday and  will definately make some changes

thanks for mentioning the mprint and symbolgen .Those 2 can be  helpful,yes.

 

The funny thing is  i tried to access individially each of the  27 datasets. At some moments i could open the  first 2 and  i could not the  rest then there were moments  when i could  open all of them but after running the entire code  it would fail and the logs  wont tell me more  than  what i sent  you.Everyhting seemes  fine and  it just says 0 records  were  written to....

Will use the  mprint and  symbolgen as  those make the  log  more detailed

 

Thank you guys for your insights

Tom
Super User Tom
Super User

Another issue to consider is are you using a GRID environment on Unix?  Is it possible that some of the nodes are not properly configured to connect to the FTP site? 

Tal
Pyrite | Level 9 Tal
Pyrite | Level 9

as  a matter  of fact i changed the node today and after  a  few attempts it worked . Dont know... maybe that was what  troubled me

 

Good point to  remember  . Thanks

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 9 replies
  • 1242 views
  • 0 likes
  • 4 in conversation