BookmarkSubscribeRSS Feed
cnilsen
Quartz | Level 8

Hi Community!

 

I find myself at a loss with a problem. As my SAS skills are in the early stages of development, I am again reaching out for help.

I've written a DIS (v4.901) program to process input files from a remote system. All will have the same format, but different names. Once I was satisfied it worked, I created an outer program to read create a contents listing of all files to be processed and pass the names as a parameter . I initially had this working, but I made a copy to try out another process... and I made a change somewhere that has now caused 2 errors. 

 

I have attached a word doc with my process and settings for some of the relevant transformations on it as well as the errors I am getting.

 

Any help would be greatly appreciated!!

 

 

 

 

 

 

 

- Chris N.
5 REPLIES 5
cnilsen
Quartz | Level 8
as a follow up.. I realized that this might be an issue.. did I set up this path correctly as part of my parameter settings: /dmadata/AS400
I am using &filename as my input parm.
- Chris N.
RLigtenberg
SAS Employee

In your Word doc, 3rd screen shot showing the File Location tab, try the option that says "Double quotes around file name". Because you are using a parameter in the file name.

RLigtenberg
SAS Employee

And in the 8th screen shot, Prompt Type and Values tab, in the Default value box, can you Browse to the files? If so, select a default for testing. If not, you may need a server definition for the server where the files are located.

cnilsen
Quartz | Level 8

Selecting the Double quotes option didn't seem to help, but once I did select a file as a default.. it worked ok.

The problem is that the files I process with be moved to an archive folder. so, once this file processed.. it was removed.

 

The next time I tried to run the program, it said file not found. meaning the defaulted file.  I believe that I have to use &filename to represent my incoming file.. but that somewhere in the file location tabs.. I need to default in the Path of the file(s). and I cannot do so using the prompt type and values. 

 

When I had this version working.. I made a renamed copy and changed something. this change affected other versions/copies of the program it seems. I should exported the original to save the settings. 

 

do I have my parm type correct as file or directory? since this will be a filename passed from my control file?

 

 

- Chris N.
RLigtenberg
SAS Employee

I suggest getting the Inner Job to work first so it completes successfully by itself, before putting it in the Loop Job.

 

  1. Does the Inner Job run successfully with a hardcoded value for the File Name on the File Location tab in screen shot #3?
  2. Does the Inner Job run successfully with &filename as the File Name, the double quotes option and a default value for the &filename parameter? You can assign a default value, for example, on the Parameters tab in the GFGB table properties or with a %let statement in the job or transformation precode. This default value can include the full path to the source file. (The Prompt Type can be "Text". The "File or directory" type gives the convenient Browse feature to pick up the path and file)

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!

How to connect to databases in SAS Viya

Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 5 replies
  • 1258 views
  • 0 likes
  • 2 in conversation