APPX is the Premier Development and Runtime Environment for Business Application Software
(Answer) (Category) FAQ's - APPX Software, Inc. : (Category) Trash :
157 - Converting Arrays to Scalar Data
At present, only the 'CNV TEXT' stmt addresses an Alpha array as if it were a single scalar variable. (Unfortunately, it also adjusts for periods, insuring no more than one space after a period.)


       *         initialize an Alpha Array:
*
SET --- TEMP 1 =
CNV TEXT OPT WORK TEST ARRAY 000 = --- TEMP 1

You can also accomplish the "Array to Scalar" assignment, by setting up a Working Storage type file, with a GROUP construction like the following:

100 WS GROUP1 GROUP HEADER 1
200 WS A50 ALPHA 1 X(50)
300 WS GROUP1 END GROUP TRAILER 1
400 WS GROUP2 GROUP HEADER 1
500 WS A1 50 ALPHA 1 X(1) Oc 50
600 WS GROUP2 END GROUP TRAILER 1

... then perform the assignment as follows:

      SET      PAT WS A50                     =      XYZ
SET PAT WS GROUP2 = PAT WS GROUP1

... resulting in:

Appl Field Name Occ Field Value
PAT WS A1 50 001 X
PAT WS A1 50 002 Y
PAT WS A1 50 003 Z

--------------------------------------------------------------------------------

Don't forget the ability to search for individual characters (ex: commas or quotes) in ILF code, by means of the IF INCLUDES ('IF' verb with 'IN' operator), to perform string processing.

[Append to This Answer]
2010-May-20 12:29am
Previous: (Answer) 657 - How APPX Spawns Background Processes
Next: (Answer) 159 - Running Windows Functions from APPX (SUB TOPICS)
This document is: http://board.appx.com/cgi-bin/fom.cgi?file=98
[Search] [Appearance]
This is a Faq-O-Matic 2.719.
Copyright 2003 by APPX Software, Inc. All rights reserved.