IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Usage of array in EZTPA00


IBM Mainframe Forums -> CA Products
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
op

New User


Joined: 31 Oct 2006
Posts: 48
Location: Chennai

PostPosted: Wed Apr 04, 2007 5:35 pm
Reply with quote

Hi,

Can we use array in EASYTREV(EZTPA00).

If yes, can anyone given an example for declaration and its usage down the line.

Thanks a lot in advance.

Best Regards,
Om Prakash
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1208
Location: Bangalore,India

PostPosted: Wed Apr 04, 2007 6:15 pm
Reply with quote

Hi there,


There are two type of table
a) Instram Table:Instream tables are specified by the INSTREAM subparameter of the TABLE option on the FILE statement. Instream tables are created by coding the table data immediately following the associated library definition statements for the table file. Table data is ended by the word ENDTABLE in the first eight positions of a record. Instream data is 80 characters per record. Table size is limited only by the amount of available memory. The next exhibit illustrates an instream table definition.
FILE WEEKDAY TABLE INSTREAM
ARG 1 1 A
DESC 3 9 A
1 SUNDAY
2 MONDAY
3 TUESDAY
4 WEDNESDAY
5 THURSDAY
6 FRIDAY
7 SATURDAY
ENDTABLE

External Tables
If you specify the TABLE option with no subparameter, the file is an external table whose maximum number of entries is limited by a value in the options table established at installation. Check with your data center to determine this value. If the number of entries in your external table is larger than the default value, you can code a numeric literal as the subparameter of the TABLE option to specify the maximum number of entries.
A file that meets the following criteria can be defined as an external table:
■ An existing file that is in ascending order by the field used as a search argument
■ A file created by having its name specified as the TO parameter of a SORT statement that is sorted into ascending order by the search argument.
Back to top
View user's profile Send private message
op

New User


Joined: 31 Oct 2006
Posts: 48
Location: Chennai

PostPosted: Wed Apr 04, 2007 10:25 pm
Reply with quote

I declared an array MONTH-TABLE as shown below. How to give values to the array. Please help.

DEFINE MONTH-TABLE W 10 A +
OCCURS(12) +
VALUE( +
'JANUARY ', +
'FEBRUARY ', +
*******B016 INVALID OR CONFLICTING KEYWORD - VALUE 'MARCH ', +
'APRIL ', +
'MAY ', +
'JUNE ', +
'JULY ', +
'AUGUST ', +
'SEPTEMBER ', +
'OCTOBER ', +
'NOVEMBER ', +
'DECEMBER ') +
INDEX(MONTH-INDEX)
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Wed Apr 04, 2007 10:53 pm
Reply with quote

Code:
DEFINE MONTHS W 120 A VALUE +
                   'JANUARY +
                   FEBRUARY +
...
                   NOVEMBER +
                   DECEMBER '

Code:
DEFINE MONTH    MONTHS 10 A +
  OCCURS (12) INDEX (MONTH-INDEX)
Back to top
View user's profile Send private message
op

New User


Joined: 31 Oct 2006
Posts: 48
Location: Chennai

PostPosted: Wed Apr 04, 2007 11:08 pm
Reply with quote

Can't we pass values to the array MONTH without using an intermediate variable.
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Wed Apr 04, 2007 11:46 pm
Reply with quote

It is just a redefinition, the first for overall size and filling the entries, the redef for the array.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CA Products

 


Similar Topics
Topic Forum Replies
No new posts STEM usage in REXX CLIST & REXX 14
No new posts COBOL Ascending and descending sort n... COBOL Programming 5
No new posts z/OS Modules Usage report using SMF 42 DFSORT/ICETOOL 2
No new posts Concatenate 2 fields (usage national)... COBOL Programming 2
No new posts To find an array of words (sys-symbol... JCL & VSAM 9
Search our Forums:

Back to Top