Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Redefining an array with individual variable having 88 level

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Redefining an array with individual variable having 88 level
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    Post subject:
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    Post subject:
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    Post subject: Re: Redefining an array with individual variable having 88 l
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Moving values to a variable of copybo... Vignesh Sid COBOL Programming 6 Wed Sep 06, 2017 1:04 pm
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts Move from Comp3 variable to Edited Va... sreekusr COBOL Programming 8 Thu Aug 10, 2017 4:20 pm
No new posts Can I traverse a STEM variable? chong.zhou CLIST & REXX 5 Wed May 31, 2017 3:54 pm
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us