Tag: programming languages

Questions Related to programming languages

  1. Referencing a nonexistent macro variable results in a warning message. Referencing an invalid macro variable name results in an error message.

  2. Referencing a nonexistent macro variable results in a error message. Referencing an invalid macro variable name results in an warning message.

  3. Referencing a nonexistent macro variable and invalid macro variable name results in an error message.

  4. Referencing a nonexistent macro variable and invalid macro variable name results in an warning message.


Correct Option: A
  1. FORE, BACK

  2. OpenVMS,WIN, HP 300

  3. Batch,Interactive

  4. All of the above


Correct Option: A

(a) %let prog=%str(data new; x=1; run;); (b) %let prog=data new%str(;) x=1%str(;)run%str(;); The above two are equivalent?

  1. True

  2. False


Correct Option: B

%let a=begin; %let b=%nrstr(&a); %put UPCASE produces: %upcase(&b); %put QUPCASE produces: %qupcase(&b); The output of the two put statement is :

  1. BEGIN and &A

  2. begin and &A

  3. begin and begin

  4. begin and BEGIN


Correct Option: A
  1. month1 June month2 July period1 June July period2 May June period3 July Aug

  2. month1 June month2 July period1 JuneJuly period2 MayJune period3 July.Aug

  3. month1 June month2 July period1 JuneJuly period2 MayJune period3 JulyAug

  4. month1 June month2 July period1 junejuly period2 Mayjune period3 julyaug


Correct Option: C
Explanation:

To understand the resulting values for the macro variables, we need to know that the ampersand (&) is used to reference the value of a macro variable. The resulting values for the macro variables are:

  • %let month1 = June; (the value of month1 is "June")
  • %let month2 = July; (the value of month2 is "July")
  • %let period1 = &month1&month2; (the value of period1 is "JuneJuly")
  • %let period2 = May&month1; (the value of period2 is "MayJune")
  • %let period3 = &month2.Aug; (the value of period3 is "July.Aug")

Therefore, the answer is:

The Answer is: C

Which of the following correctly produces a title in which the current date is left justified in order to remove extra blanks?

  1. title "Report for %sysfunc(left(%sysfunc(today(),worddate.)))";

  2. title "Report for %sysfunc(left(today(), worddate.))";

  3. title "Report for %sysfunc(left(%qsysfunc(today(), worddate.)))";

  4. title "Report for %left(today(), worddate.))";


Correct Option: C

AI Explanation

To answer this question, you need to understand how to format a title in SAS using the %sysfunc function to manipulate the current date.

Let's go through each option to understand why it is correct or incorrect:

Option A) title "Report for %sysfunc(left(%sysfunc(today(),worddate.)))"; This option is incorrect because it uses an unnecessary nested %sysfunc function. The left function should be applied directly to the result of %sysfunc(today(),worddate.) to left justify it.

Option B) title "Report for %sysfunc(left(today(), worddate.))"; This option is incorrect because it does not use the proper syntax for the %sysfunc function. The %sysfunc function should be used with a specific SAS function, such as date. or left..

Option C) title "Report for %sysfunc(left(%qsysfunc(today(), worddate.)))"; This option is correct because it uses the %sysfunc function with the left function to left justify the result of %qsysfunc(today(), worddate.). The %qsysfunc function is used to resolve any potential macro quoting issues.

Option D) title "Report for %left(today(), worddate.))"; This option is incorrect because it does not use the %sysfunc function to manipulate the current date. The left function should be used within the %sysfunc function to left justify the result.

The correct answer is C. This option is correct because it properly uses the %sysfunc function with the left function and the %qsysfunc function to left justify the result of %qsysfunc(today(), worddate.).

New functions provided with SAP NetWeaver PI 7.1 are an extension of the robust architecture based on

  1. JEE5

  2. VB

  3. .NET

  4. ABAP


Correct Option: A
  1. Enterprise Service Repository

  2. Enterprise Service Registry

  3. Integration Directory

  4. Integration Builder


Correct Option: A,B