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

Data step code to output two user-written values to the same work table column

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 100
Accepted Solution

Data step code to output two user-written values to the same work table column

I'm working in a User Written transformation in DI Studio. It has a DATA &_output step with the following statement: report_date = intnx('weekday', today(), -1);

The output work table has a column called report_date, which the value for the variable report_date appears in (as 03DEC2012).

If I want the User Written transformation to output TWO values to the report_date column, how do I do it? I basically need it to output both report_date = intnx('weekday', today(), -1); AND report_date_saturday = report_date +1; to the report_date work table column if run on a Monday (so that it outputs the date of Friday and Saturday).

If the job is run on 10DEC2012, the output work table should look like this:

report_date

30NOV2012

01DEC2012

Thanks for your time.


Accepted Solutions
Solution
‎12-04-2012 10:03 AM
Super User
Posts: 5,853

Re: Data step code to output two user-written values to the same work table column

Posted in reply to EinarRoed

You need an output statement after each assignment.

Data never sleeps

View solution in original post


All Replies
Solution
‎12-04-2012 10:03 AM
Super User
Posts: 5,853

Re: Data step code to output two user-written values to the same work table column

Posted in reply to EinarRoed

You need an output statement after each assignment.

Data never sleeps
Frequent Contributor
Posts: 100

Re: Data step code to output two user-written values to the same work table column

Whenever I try using the output statement, I get an error saying  "ERROR 455-185: Data set was not specified on the DATA statement". The data step is data &_output;

Is it forbidden to use output inside an &_output data step, and if so, is there an alternative?

UPDATE: Nevermind, figured it out, thanks. Smiley Happy

Frequent Contributor
Posts: 88

Re: Data step code to output two user-written values to the same work table column

Posted in reply to EinarRoed

what is the solution for this? I'm having the same issue. What did you figure out?

🔒 This topic is solved and locked.

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

Discussion stats
  • 3 replies
  • 1348 views
  • 0 likes
  • 3 in conversation