Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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 Format to pipe delimited with variabl... pshongal SYNCSORT 6 Wed Sep 14, 2016 2:48 pm
No new posts Variable for cursor names ravikumar15 DB2 5 Sun Jul 17, 2016 7:08 am
No new posts OPC JCL Variable passion_sujesh IBM Tools 5 Fri Jul 01, 2016 4:21 am
No new posts Unstring list of values into an array. Roshnii COBOL Programming 8 Mon Jun 27, 2016 6:25 pm
No new posts JOINKEYs and Variable files migusd SYNCSORT 8 Fri Jun 17, 2016 3:16 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us