answersLogoWhite

0

How arrays are used in synon?

Updated: 10/23/2022
User Avatar

Wiki User

11y ago

Best Answer

Synon array processing is totally intuitive for any synon user. You do not need to open a manual. If you can use a file, you can use an array. The main difference is that there are only 4 function types: CRTOBJ, CHGOBJ, DLTOBJ, RTVOBJ, and only 1 "ACP" (set of Key fields)

The array processing really behaves more like an indexed file than an array. The file portion (Records) is a multiple occurrence data structure and the index portion is an array. The data structure contains the fields as defined in the *ARRAY file. The array(Index) is the fields defined as the Key concatenated with the occurrence# of the data structure. When you create an element in the array (a record in the file), the program takes the next available occurrence of the data structure and loads the fields. The program also creates the Index element by concatenating the key fields with the occurrence# of the newly added data structure. The program then does a Sort Array to sequence the Index so that the records may be accessed in key sequence. Any time a record is deleted, the Index element is blanked out and the Index is Sorted (Sort Array). This is a very clean solution and the performance is surprisingly good considering that the array is sorted after each add or delete.

When accessing the data, a LOKUP is performed on the array using the key value with blanks instead of the occurrence# and looking for GT in the array. This allows processing of partial keys as positioners or restrictors. The program then reads the data structure for the occurrence# taken from the array element to get the data(fields). For the next occurrence, it is not necessary to do another LOKUP (which is slow) because the array is sorted. The program only has to read the next element in the array and continue the processing as long as the partial key matches the key in the array. From the point of view of the Synon user, this processing is identical to a file RTVOBJ.

Synon loads the array from the bottom (an RPG technique to improve performance in large arrays) because the LOKUP command may be given a starting position, but cannot be stopped until every element is checked when no match is found. By loading the array backwards from the bottom and counting the elements, the search may be started at the last element loaded and only elements which contain data are read.IF No Match is Found

An array is defined for 1000 elements.

Only 10 elements are loaded.

These are loaded to occurrences 991 thru 1000.

When the LOKUP is performed, it starts at 991 and only 10 compares are made.

** If the array is loaded from the top, 1000 compares are performed.

User Avatar

Wiki User

11y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: How arrays are used in synon?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

When did Synon end?

Synon ended in 1998.


When was Synon created?

Synon was created in 1984.


When was Mary Ellen Synon born?

Mary Ellen Synon was born in 1951.


When was Mary Synon born?

Mary Synon was born in 1881, in Chicago, Illinois.


When did Mary Synon die?

Mary Synon died on April 1, 1987, in Naperville, Illinois, USA.


Is chug a antonym or a synon?

it can be both


What is difference between Bac arrays and DNA arrays?

BAC (Bacterial Artificial Chromosome) arrays are a type of DNA arrays. BAC arrays are usually used for a technique called array CGH (Comparative Genomic Hybridisation) which is used to identify gross deletions or amplifications in DNA (which for example is common in cancer). DNA arrays include BAC arrays but also oligo, cDNA, and promoter arrays. Oligo and cDNA arrays are typically used for gene expression analysis (looking to see how heavily expressed each gene is). Oligo arrays can also be used for SNP (single nucleotide polymorphism) analysis. Promoter arrays are used to identify transcription factor binding sites.


Can arrays be used in for loops?

yes


How can arrays be used for inter function communication?

The size of a function can be determined from the size of the array. Arrays and functions are both used in computer programming.


Why are matrices used for representation while programming?

Let me correct you: two-dimensional arrays are used in programming to represent matrices. (Matrices are objects of mathematics, arrays are objects of programming.)


Dynamically allocated array waste storage and time?

It's actually not true. In order to make a good program which can work with big arrays you have to use dynamic arrays because you can cleam memory used by dymanic arrays any time. For static arrays is not true, memery which was reserved for static arrays will be available for other applications only when you finish working with your application (which is working with static arrays).


What are very large arrays used for?

Storing lots of data.