Using Amper Variables Within a Subroutine

To use amper variables within a subroutine:

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:

  • Values to the parm argument.
  • The length of the parm argument (parm_length).
  • The variables &VAR1 and &VAR2 are then substituted for these arguments.
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

Feedback