Using Amper Variables Within a Subroutine

To use amper variables within a subroutine:


Top of page

Example: Using Amper Variables for the Burst Value and Email Address Field

You can use amper variables in place of hard coding a value that is passed as a parameter to a subroutine. This example uses the -SET Dialogue Manager command to supply:

FILEDEF SUBLOG DISK D:\ibi\srv77\wfs\catalog\sublog.ftm
-RUN
-SET &VAR1='COUNTRY=FRANCE';
-SET &VAR2=14;
-SET &SUBERR = DSTMEM(
-  'userid',6,
-  'mypass',6,
-  'ibiwnt:3794',11,
-  'Managers',8,
-  'A',1,
-  'listownerId',11,
-  &VAR1,&VAR2,
-  ' ',0,
-  'I4');
-IF &SUBERR EQ 0 GOTO EXIT;
-INCLUDE DSTMEMER
-WRITE SUBLOG &SUBERR
-EXIT

WebFOCUS