Page 1 of 1

using the COMMON across jobs

Posted: Mon Apr 27, 2015 1:40 am
by SIHM
I have a job which reads a table into a routine. The routine contains a dynamic array in a common area which stores each column individually for each row.

The common uses the following syntax

Code: Select all

COMMON /x/ a b
This job is called from a job sequence. Once the job has run, I have another routine to read from the dynamic array from the same memory area.

However, when I run the job sequence, it fails to find the data in the dynamic array.

I have tested all of the routines to read and write to the dynamic array by running them in a test job sequence via uservariable routines. e.g.

uv1-> Store Dynamic array routine
uv2-> Get Dynamic array values for a given row.

These work fine.

My question is whether a Common area can be used between a job and a job sequence.

Posted: Mon Apr 27, 2015 6:59 am
by chulett
No. It's meant to persist data across calls to the routine, not across multiple jobs.

Posted: Mon Apr 27, 2015 8:23 pm
by ray.wurlod
You can, of course, use the job's User Status area to communicate back to its controlling sequence; contents of the User Status area are available through the $UserStatus activity variable for the Job activity.

Posted: Tue Apr 28, 2015 1:36 am
by SIHM
I did think of that but the number of lines stored in the array are unknown. Do you have any idea how much data can be stored in the userstatus variable ?

Posted: Tue Apr 28, 2015 3:51 am
by ray.wurlod
Unlimited dynamic array size until you run out of memory.