SAS Data Integration Studio, DataFlux Data Management Studio, SAS/ACCESS, SAS Data Loader for Hadoop and others

Loop on SAS Data Integration Studio

Accepted Solution Solved
Reply
New Contributor
Posts: 4
Accepted Solution

Loop on SAS Data Integration Studio

Hi !

I have a problem. I want to do a LOOP on SAS Data Integration Studio and execute this Loop until the value in my table is equal 1.

For example :

Capture.PNGThe user writer code generate a variable "file_test" in the table work.test

I want to make a LOOP with the LOOP transformation (no user writer code) to execute the loop until the value of "file_test" equal 0 and if the value of "file_test" = 1 then stop the LOOP.

Is it possible ?

The version of SAS DIS is 4.9

 

Thanks Smiley Happy


Accepted Solutions
Solution
‎11-10-2017 08:02 AM
Super User
Posts: 5,490

Re: Loop on SAS Data Integration Studio

This sounds more like a job for a scheduler or an external script.
DI Studio is mainly for dealing with data flows, not application logic.
Data never sleeps

View solution in original post


All Replies
Super User
Posts: 5,490

Re: Loop on SAS Data Integration Studio

Spontaneously I would say no, that's not how the loop transform works.
A dirty solurion is to wrap the steps in the inner job with a surronding macro with %do and %while/%until.
If you describe the logic how you assign the file_test we might can come up with a neater solution.
Data never sleeps
New Contributor
Posts: 4

Re: Loop on SAS Data Integration Studio

Hello LinusH,

 

First of all thanks for your reply ! Smiley Happy

 

The operation of the process is as follows:


The DIS job should run every 5 minutes by searching a directory for a specific file.
The macro loops as long as the file is not found. If the file is found, it stops.
How can I set up a condition in my program that runs the DIS job every 5 minutes to check for the presence of the file and does not run after the file is found?

I can use the USER WRITER transformation, as you said the LOOP transformation doesn't work for this.

Best regards,

Solution
‎11-10-2017 08:02 AM
Super User
Posts: 5,490

Re: Loop on SAS Data Integration Studio

This sounds more like a job for a scheduler or an external script.
DI Studio is mainly for dealing with data flows, not application logic.
Data never sleeps
New Contributor
Posts: 4

Re: Loop on SAS Data Integration Studio

Super !! you confirm all iwas thinking Smiley Happy))

Thanks a lot Smiley Happy

 

Best regards,

Stefan

☑ This topic is solved.

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

Discussion stats
  • 4 replies
  • 198 views
  • 0 likes
  • 2 in conversation