MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Reference modificatiom

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming
View previous topic :: View next topic  
Author Message
baskkarsubbian
Beginner


Joined: 31 Aug 2003
Posts: 18
Topics: 12

PostPosted: Sun Sep 07, 2003 12:58 am    Post subject: Reference modificatiom Reply with quote

Hi

Can we use reference modificatin in the receiving field?

such as move 'abc' to ws-var(2 : 3).

If it is possible then what happens if the length of ws-var is only 4 such as

ws-var pic x(4).

one more doubt in Next sentence. If we code anything after next sentence is it be executed?

If c > 10
Display "....."
Next sentence
Display "00000"
else
Display "///////".

In the above case if c value 12 what will be displayed to the terminal?
Back to top
View user's profile Send private message Yahoo Messenger
Mervyn
Moderator


Joined: 02 Dec 2002
Posts: 415
Topics: 6
Location: Hove, England

PostPosted: Sun Sep 07, 2003 1:07 pm    Post subject: Reply with quote

I don't see why these questions are in the JCL Forum.

Anyway, why don't you just try these things out and see what happens? I guarantee you'll learn more that way.
_________________
The day you stop learning the dinosaur becomes extinct
Back to top
View user's profile Send private message
slade
Intermediate


Joined: 07 Feb 2003
Posts: 266
Topics: 1
Location: Edison, NJ USA

PostPosted: Sun Sep 07, 2003 9:22 pm    Post subject: Reply with quote

OK bask,

This ia a 2 for 1 sale:

1) The 1st char of ws-var will remain unchanged.
2) The "next sent" stmt will not execute anymore than it would if "next sent" were "go to label-a", you may get a compiler error.

Now, you tell ME:

What happens when you "move 'abc' to ws-var(1 : 3)"?

Regards, Jack.
Back to top
View user's profile Send private message
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Mon Sep 08, 2003 6:19 am    Post subject: Reply with quote

baskkarsubbian,

Please post in the approriate forum. I moved this topic from JCL to Application programming forum.

NEXT SENTENCE transfers control to the first statement following the closest separator period.

Hope this helps...

cheers

kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
baskkarsubbian
Beginner


Joined: 31 Aug 2003
Posts: 18
Topics: 12

PostPosted: Mon Sep 08, 2003 8:38 am    Post subject: Reply with quote

Sorry for posting in wrong forum.

What happens If ws-var pic x(3).

What happens to the last char?
Back to top
View user's profile Send private message Yahoo Messenger
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12375
Topics: 75
Location: San Jose

PostPosted: Mon Sep 08, 2003 9:05 am    Post subject: Reply with quote

baskkarsubbian,

The last character gets truncated.

I sincerely hope we don't have another mcmillan here.

Kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Manas Biswal
Intermediate


Joined: 29 Nov 2002
Posts: 382
Topics: 27
Location: Chennai, India

PostPosted: Mon Sep 08, 2003 9:54 am    Post subject: Reply with quote

who is Mcmillan in this context? Rolling Eyes

Regards,
Manas
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
haatvedt
Beginner


Joined: 14 Nov 2003
Posts: 66
Topics: 0
Location: St Cloud, Minnesota USA

PostPosted: Fri Nov 14, 2003 10:34 pm    Post subject: Reply with quote

Kolusu -->> I suspect that if the reference modification is beyond the range of the recieving field, then it will result in corruption of the storage after the recieving field. You could try this and see.

I have had to debug some very nasty abends due to people not doing range checking in thier code.

All the shops I've worked in set the SSRANGE option to OFF for performance reasons.

These types of errors are some of the most challenging problems to solve because the results are totally unpredictable. The impact is dependant upon what storage gets corrupted , how and when it is later referenced.

Very Nasty Bugs.. Twisted Evil Twisted Evil
_________________
Chuck Haatvedt

email --> clastnameatcharterdotnet

(replace lastname, at, dot with appropriate
characters)
Back to top
View user's profile Send private message
RobertL
Beginner


Joined: 18 Nov 2003
Posts: 22
Topics: 0
Location: Lisbon, Portugal

PostPosted: Wed Nov 19, 2003 8:43 am    Post subject: Reply with quote

Quote:

I suspect that if the reference modification is beyond the range of the recieving field, then it will result in corruption of the storage after the recieving field. You could try this and see.


This is, in fact, what happens. Storage beyond the end of the receiving field is overlaid.
Regards,
Robert
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Application Programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group