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 

accepting a non-integer value passed through a JCL

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Job Control Language(JCL)
View previous topic :: View next topic  
Author Message
deepatred
Beginner


Joined: 29 Nov 2005
Posts: 19
Topics: 6

PostPosted: Wed Apr 05, 2006 3:25 am    Post subject: accepting a non-integer value passed through a JCL Reply with quote

Hi,

Through JCL we can pass values that can be accepted in program using an ACCEPT statement.

like
//SYSIN DD *
0.003
/*

If i want to pass a value like 0.003 can i accept it in a variable of PICTURE 9(3)V9(3).

it is accepting the value in my program but giving an exception later.

Thanks.

Deepa
Back to top
View user's profile Send private message
Phantom
Data Mgmt Moderator
Data Mgmt Moderator


Joined: 07 Jan 2003
Posts: 1056
Topics: 91
Location: The Blue Planet

PostPosted: Wed Apr 05, 2006 4:05 am    Post subject: Reply with quote

Deepa,

'V' in cobol picture declaration stands for assumed decimal point. So, it can never accept ".". So, the solution is - "You must also assume that you are passing a decimal point but actually you should not" !!! Wink change your sysin as below.

Code:

//SYSIN DD *
0003
/*


Numeric fields will be filled from rightmost digit and hence, '003' will be passed to decimal portion leaving the integer portion as "0".

Hope this helps,

Thanks,
Phantom
Back to top
View user's profile Send private message
deepatred
Beginner


Joined: 29 Nov 2005
Posts: 19
Topics: 6

PostPosted: Wed Apr 05, 2006 10:26 pm    Post subject: Reply with quote

Phantom,

Thanks.

But i could not get the funda clear.
When i tried passing 0.000 from sysin to variable of PIC 9V9(3), it displayed the accepted value as 0.00
When i tried passing 0.000 to variable of PIC 9(3)V9(3), it displayed the accepted value as 0.000

What does this mean?

Quote:

'V' in cobol picture declaration stands for assumed decimal point. So, it can never accept ".".


Since V is assumed can we consider the PIC as 9999 in first case, then it looks as if the variable is treating decimal point also as numeric quantity. Hows that possible?

I solved that problem another way. I accepted the value in an alphanumeric variable and converterted it to numeric in program. This approach looks OK to me till now.

Please provide some help to clear my doubts.

Thanks,

Deepa
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 -> Job Control Language(JCL) 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