DATA Step, Macro, Functions and more

Readin in datasets from a mainframe host

Accepted Solution Solved
Reply
Super Contributor
Super Contributor
Posts: 444
Accepted Solution

Readin in datasets from a mainframe host

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

Accepted Solutions
Solution
‎04-20-2017 12:10 PM
Super User
Posts: 11,343

Re: Readin in datasets from a mainframe host


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


All Replies
Super Contributor
Posts: 345

Re: Readin in datasets from a mainframe host

Posting code and log will help to answer your question.

Super User
Posts: 11,343

Re: Readin in datasets from a mainframe host

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)

 

 

Super Contributor
Super Contributor
Posts: 444

Re: Readin in datasets from a mainframe host

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

Super User
Super User
Posts: 7,070

Re: Readin in datasets from a mainframe host

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.

Super Contributor
Super Contributor
Posts: 444

Re: Readin in datasets from a mainframe host

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

Solution
‎04-20-2017 12:10 PM
Super User
Posts: 11,343

Re: Readin in datasets from a mainframe host


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.

Super Contributor
Super Contributor
Posts: 444

Re: Readin in datasets from a mainframe host

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

Super User
Super User
Posts: 7,070

Re: Readin in datasets from a mainframe host

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? 

Super Contributor
Super Contributor
Posts: 444

Re: Readin in datasets from a mainframe host

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

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 9 replies
  • 130 views
  • 0 likes
  • 4 in conversation