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
 
accessing a table with SSrange ON.

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
counto

New User


Joined: 30 Jun 2005
Posts: 1

PostPosted: Thu Jun 30, 2005 4:48 am    Post subject: accessing a table with SSrange ON.
Reply with quote

Hi,

I have the following array:

01 WS-LINE-TABLE.
05 WS-LINE-SWITCH OCCURS 7 TIMES.
07 WS-LINE-SW PIC X.

With SSrange ON is it possible for me to access all the occurences of WS-LINE-SW ? I mean, will the following line of code work?

MOVE WS-LINE-SW (var-1) TO var-2 ?

Or would i need to access it by:
MOVE WS-LINE-SWITCH (var-1) TO var-2.

Thanks.
Back to top
View user's profile Send private message

priya

Moderator


Joined: 24 Jul 2003
Posts: 568
Location: Bangalore

PostPosted: Sun Jul 03, 2005 3:04 am    Post subject:
Reply with quote

Quote:
all the occurences of WS-LINE-SW


WS-LINE-SW is not an array. Then how you got occurances??

MOVE WS-LINE-SW (var-1) TO var-2

Error.

MOVE WS-LINE-SWITCH (var-1) TO var-2

It's ok. If you code SSRANGE, then you will get an error message at runtime only if var-1 > 7. Otherwise (SSRANGE Off) you will get Junk value in Var-2.
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Tue Jul 05, 2005 12:15 am    Post subject:
Reply with quote

WS-LINE-SW is part of the array because it is subordinate to
WS-LINE-SWITCH.
Back to top
View user's profile Send private message
Prasanthhere

Active User


Joined: 03 Aug 2005
Posts: 306

PostPosted: Mon Aug 08, 2005 4:59 pm    Post subject: Re: accessing a table with SSrange ON.
Reply with quote

SS range is used only just 2 check the out of boundary conditions so what u have specified there will will work as long as its with in the array limit
Back to top
View user's profile Send private message
atik

New User


Joined: 29 Jul 2005
Posts: 20

PostPosted: Wed Aug 10, 2005 4:41 pm    Post subject: Re: accessing a table with SSrange ON.
Reply with quote

MOVE WS-LINE-SW (var-1) TO var-2
can be used.
Back to top
View user's profile Send private message
Prasanthhere

Active User


Joined: 03 Aug 2005
Posts: 306

PostPosted: Wed Aug 10, 2005 5:58 pm    Post subject: Re: accessing a table with SSrange ON.
Reply with quote

It will work definitely we cna move value like that as u specifed
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 -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Adding a userid to SMTP Security table Yolanda Harvey JCL & VSAM 1 Sun Aug 13, 2017 6:16 pm
No new posts Loading data to table gives wrong for... Raghu navaikulam DB2 19 Thu Jul 13, 2017 2:11 pm
No new posts Accessing first bit of PD value rajatbagga DFSORT/ICETOOL 11 Wed May 03, 2017 6:03 am
No new posts unload data from table with lob columns farhad_evan DB2 1 Sat Apr 22, 2017 1:32 pm
No new posts Data replication from multiple Db2 ta... kishpra DB2 9 Mon Mar 27, 2017 9:58 pm


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