View previous topic :: View next topic
|
Author |
Message |
quest2008
New User
Joined: 12 Jun 2008 Posts: 22 Location: bangalore
|
|
|
|
I am a very new to PLI. i have just coded a sample program to get data from SYSIN and to display this.
Here is my sample program. I searched the forum and got that to pass values to PLI i should code the statements like PLI in SYSIN.
But still its throwing an abend U4038. Could anyone help me to solve this error?
P3:PROCEDURE OPTIONS(MAIN);
DCL X CHARACTER(4);
GET LIST(X);
PUT LIST(X);
END P3;
JCL:
000810 //SYSIN DD *
000820 X='ABCD';
000830 /*
another test program
000001 P1:PROCEDURE OPTIONS(MAIN);
000002 DCL DATA_AREA CHARACTER(4);
000003 GET FILE(SYSIN) LIST(DATA_AREA);
000004 PUT LIST(DATA_AREA);
000005 END P1;
JCL
000810 //SYSIN DD *
000820 TEST
000830 /*
000900 //
Error:
ONCODE=613 The CONVERSION condition was raised because a conversion error occur
ition was raised because a conversion error occurred when converting character to arithmetic on input or output.
*******************************************
* Analysis of Error *
*******************************************
The CONVERSION condition was raised when an invalid character was found
in a character string being converted to an arithmetic data type for a
GET or PUT FILE statement. PL/I expected the field to contain a string
of digits 0 through 9 with an optional leading sign, decimal point,
and/or trailing exponent. A trailing exponent must consist of a decimal
integer preceded by a sign and/or the letter "E".
The ERROR condition has been raised.
To prevent the ERROR condition from being raised, either correct the
input data or add an ON-unit that will handle the CONVERSION condition.
You can use built-in functions ONSOURCE and ONCHAR to identify the error
and the ONSOURCE and ONCHAR pseudovariables to substitute a valid value
that will allow the program to continue processing. |
|
Back to top |
|
|
quest2008
New User
Joined: 12 Jun 2008 Posts: 22 Location: bangalore
|
|
|
|
Hello friends.
I searched the forum repatedly. I found there was a similar kind of post and the solution. Now i am able to run the program succeesfully and got the results.
000810 //SYSIN DD *
000820 'AAAAAAAAAAAAAAAAAAAAAAAAA'
000830 /*
ibmmainframes.com/viewtopic.php?t=7378&highlight=pli+sysin
Thank you |
|
Back to top |
|
|
DeepMoni
New User
Joined: 20 Aug 2009 Posts: 2 Location: Bangalore
|
|
|
|
The problem why you were getting the abends is as follows:-
For the first code you were using GET LIST to retrieve the data.This expects only input value and not the name of the variable.So instead of giving X = 'ABCD' you should have only entered 'ABCD'.
For the second code you entered only value without the quotes.Earlier you declared the value as character in the program.So the program expects a opening and closing quote containing the data.Its absence prompted the compiler to consider the data as numeric and so Data Conversion condition was raised. |
|
Back to top |
|
|
quest2008
New User
Joined: 12 Jun 2008 Posts: 22 Location: bangalore
|
|
|
|
Thanks DeepMoni. But this problem was resolved one year back. |
|
Back to top |
|
|
DeepMoni
New User
Joined: 20 Aug 2009 Posts: 2 Location: Bangalore
|
|
|
|
Yes , but I thought it might be a good idea to point out what specifically the errors were so that it might be helpful to others. |
|
Back to top |
|
|
|