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

Redefining an array with individual variable having 88 level


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
mathiprakash

New User


Joined: 29 Apr 2005
Posts: 14
Location: Pune, India.

PostPosted: Thu Aug 25, 2005 11:54 am
Reply with quote

Hi Everybody,

I have one array which occurs 7 times with PIC 9(2).
Now I want to redefine this array with 7 different individual variables which all having 88 level numbers as well.

How can we achieve that?

The context is like this
---------------------------
01 WS-LIST-CALENDER
05 THE-CALENDER OCCURS 7 TIMES INDEXED BY CAL1
10 CALENDER-DAY PIC 9(02)

Now I want to redefine this array with these individual variables.....

01 WS-SUNDAY PIC 9(02)
88 DAY-SET VALUE 00
88 DAY-NOT-SET VALUE 01

01 WS-MONDAY PIC 9(02)
88 DAY-SET VALUE 00
88 DAY-NOT-SET VALUE 02
::
::
01 WS-SATURDAY PIC 9(02)
88 DAY-SET VALUE 00
88 DAY-NOT-SET VALUE 07

Anybody help me in this..

Thanks,
Matty.
Back to top
View user's profile Send private message
vijay naidu

New User


Joined: 12 Jul 2005
Posts: 5
Location: pune

PostPosted: Thu Aug 25, 2005 2:39 pm
Reply with quote

Hi Matty,

Good question but we can't redifned an array. but u can redifine an element in an array i don't what is ur logic in ur array but i am sending one solution in my way
01 WS-LIST-CALENDER
05 THE-CALENDER OCCURS 7 TIMES INDEXED BY CAL1
10 CALENDER-DAY PIC 9(02)
10 WS-SUNDAY REDEFINES CALENDER-DAY PIC 9(02)
88 DAY-NOT-SET VALUE 00
88 DAY-SET VALUE 01
10 WS-MONDAY REDEFINES CALENDER-DAY PIC 9(02)
88 DAY-NOT-SET VALUE 00
88 DAY-SET VALUE 02
::
::
10 WS-SATURDAY REDEFINES CALENDER-DAY PIC 9(02)
88 DAY-NOT-SET VALUE 00
88 DAY-SET VALUE 07
FOR EXAMPLE
SET CAL1 TO 1.
THEN THE ARRAY STARTS FROM BEGANING AND EACH ONE SHARES THE SAME MEMORY AREA
Back to top
View user's profile Send private message
mathiprakash

New User


Joined: 29 Apr 2005
Posts: 14
Location: Pune, India.

PostPosted: Thu Aug 25, 2005 2:48 pm
Reply with quote

Thanks Vijay.

But I want like this.
The WS-SUNDAY should redefine the THE-CALENDER(1)
The WS-MONDAY should redefine the THE-CALENDER(2)
:
:
The WS-SATURDAY should redefine the THE-CALENDER(7)

Is it possible?
Back to top
View user's profile Send private message
mainframesguru

New User


Joined: 24 Jun 2005
Posts: 36
Location: Hyderabad

PostPosted: Tue Aug 30, 2005 12:57 pm
Reply with quote

Hi,

Do it This Way:
It Works

Please check the Rough Sketch of it:

01 WS-TABLE.
03 WS-ARRAY1.
05 WS-ARRAY2 PIC 9(2).
88 WS-ARRAY2-TRUE VALUE 1.
88 WS-ARRAY2-FALSE VALUE 0.
05 WS-ARRAY3 PIC 9(2).
03 WS-ARRAY4 REDEFINES WS-ARRAY1.
05 WS-ARRAY5 OCCURS 2 TIMES.
07 WS-ARRAY6 PIC 9(2).

1. Define the variables with 88 level number first
2. Then Redefine it
3. Use occurs in Redefined Data-Item

For anyother Clarification Revert Back.

Thanks And Regards
Vamshi
ICC-ISH
Chennai
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 -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts How to load to DB2 with column level ... DB2 6
No new posts Variable Output file name DFSORT/ICETOOL 8
No new posts ISRSUPC search utility - using high l... TSO/ISPF 2
No new posts Moving Or setting POINTER to another ... COBOL Programming 2
Search our Forums:

Back to Top