BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
AlanC
Barite | Level 11

There is no file that I can see. You are welcome to copy it to: https://1drv.ms/u/s!Ajc9gcr7VcqLcFqNfYKDQarYZu0?e=iC1UpX.

 

Password is Sas!234

The link above expires on Monday midnight, MST.    

 

SAS has a new transport format that I can't figure out. The documentation, from SAS, is off in one area and I couldn't get past it. If it is the new format, I can't fix it until the documentation is corrected. The file should have a .xpt extension for the standard transport format. The C# code for doing this is on the github repo. I can run it through a debug if you send it there. Add the xpt extension and see if it fixes it. If so, that is a bug and I will correct.

 

 

https://github.com/savian-net
nivasoft
Calcite | Level 5

Hi Alan,

 

I couldn't figure out how to use the share drive link you sent me. Here I am trying to enclose the files in Zip format for you. Hopefully you can extract it on your end.

AlanC
Barite | Level 11

The transport files are compressed. See the binary (I use 010 Editor):

 

AlanC_0-1647924814289.png

 

I don't handle compressed files. Possibly doable but I don't have the time to figure it out right now. The source code is on github so you could give it aa whirl or, better yet, get them w/o compression. Compression, from what I have seen, is normally done with a header before each record indicating the length/layout if you want to look at the code base. It would really be much easier to just get them uncompressed. Figuring out the binary layout is tedious.

 

https://github.com/savian-net
mitpancha
Calcite | Level 5

Hi,

 

As per your guidance code is running but i observe that when i use four column xpt file it shows me error, details are as follow:

 

xportLib.DataSets[0].Observations = 'xportLib.DataSets[0].Observations' threw an exception of type 'System.ArgumentOutOfRangeException'

 

Awaiting for your prompt reply.

 

Thanks,

MP

AlanC
Barite | Level 11

I haven't touched the code in years but it looks like the error is telling you that you are assigning a string to a numeric:

 

xportLib.DataSets[0].Observations = 'xportLib.DataSets[0].Observations' 

 

I have used it with plenty of datasets with more than 4 columns so the # of columns is not the issue. You need to look at what is contained in the xpt file that is causing the issue. The layout for where to look is contained in that c# code. Ignore reading the actual records and look at the initial file and column metadata. Set your debug on where the Observations are being assigned and see what is being pushed to that statment xportLib.DataSets[0].Observations. 

 

 

https://github.com/savian-net
mitpancha
Calcite | Level 5

Hello Alen,

 

Thanks for your prompt and valuable reply.

Well actually I have tried many  xpt from our side as well as download from internet having four column but error shows ""xportLib.DataSets[0].Observations = 'xportLib.DataSets[0].Observations' threw an exception of type 'System.ArgumentOutOfRangeException'".

 

In four column i am not getting dataset and its observation too only getting variable details having first row header details.

Please guide on me on this.

 

Thanks,

MP

 

AlanC
Barite | Level 11

The source code is there. You need to run it from source and see where it throws. Look at the binary file and see if you have something such as COMPRESSED in the hex codes. It is impossible for me to guess at what may be causing it since I don't have the data. Open up the file in a good hex editor (UltraEdit, NPP, or 010 Editor which is what I use) and see what is happening. The code will guide you through it. Just step the code.

 

SAS also changed the xpt layout and I couldn't figure out the new layout (their documentation was off in one area). I don't think you have that but you need to look at the hex and see where things are off. 

 

I looked at the code and the error you are showing doesn't tell me where the error is located (line #) or anything meaningful. There is no way you are blowing up on the value of an int and Observations is a List. Not much I can do to help w/o info and that requires stepping the code to see where it fails.

 

https://github.com/savian-net

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 51 replies
  • 4909 views
  • 13 likes
  • 5 in conversation