Published on :
Macro INTERNAL_CREATION

AHGLtoP Macro: Vertical List Display

This code is also available in: Deutsch Español Français
This macro takes an input string ('line') and an optional delimiter ('dlm'). It uses a macro loop (%do) to iterate through each element of the string. It relies on an external macro '%AHGcount' to determine the number of iterations, then uses '%scan' to extract and '%put' to display each element on a new line in the log.
Data Analysis

Type : INTERNAL_CREATION


The processed data is provided directly via the macro parameters.

1 Code Block
MACRO
Explanation :
Defines the AHGLtoP macro. It iterates from 1 up to the number of elements returned by the %AHGcount macro (external dependency). In each iteration, it extracts the i-th word from the 'line' string using the 'dlm' delimiter and displays it in the log.
Copied!
1/*Landscope to Portrait*/
2%macro AHGLtoP(line,dlm=%str( ));
3 %DO i=1 %to %AHGcount(&line);
4 %put %scan(&line,&i,&dlm);
5 %END;
6%mend;
This material is provided "as is" by We Are Cas. There are no warranties, expressed or implied, as to merchantability or fitness for a particular purpose regarding the materials or code contained herein. We Are Cas is not responsible for errors in this material as it now exists or will exist, nor does We Are Cas provide technical support for it.