View previous topic :: View next topic
|
Author |
Message |
santhosh.kumar.vj
New User
Joined: 03 Aug 2011 Posts: 8 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.
But still its throwing an abend soc4. Could anyone help me to solve this error?
MADHAN:PROCEDURE OPTIONS(MAIN);
DCL X CHAR(4);
GET LIST(X);
PUT LIST(X);
END P3;
JCL:
000810 //SYSIN DD *
000820 X='ABCD';
000830 /* |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10888 Location: italy
|
|
|
|
HELLO to You
my usual suggestion when I see such poorly worded topics...
to make the most out of the questions You ask and to forecast the comments You might receive
it would be wise for You to read and meditate on
how to ask questions the smart way
here catb.org/~esr/faqs/smart-questions.html
or .. for a more PC language
here support.microsoft.com/kb/555375 |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1787 Location: Bloomington, IL
|
|
|
|
santhosh.kumar.vj wrote: |
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.
But still its throwing an abend soc4. Could anyone help me to solve this error?
Code: |
MADHAN:PROCEDURE OPTIONS(MAIN);
DCL X CHAR(4);
GET LIST(X);
PUT LIST(X);
END P3; |
|
(Code tags added.)
This code will in fact generate a compile-time error. Please determine why and correct it; we will then talk further, |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
One problem you have is your END statement - the label (P3) does not match that on your PROC (MADHAN) |
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1050 Location: Richmond, Virginia
|
|
|
|
Don't you want GET DATA (and if you wish also PUT DATA)? |
|
Back to top |
|
|
santhosh.kumar.vj
New User
Joined: 03 Aug 2011 Posts: 8 Location: Bangalore
|
|
|
|
Thanks for your advice
i have corrected it, still am getting same SOC4 ABEND When i pass values through sysin
here is my sample code and
run program |
|
Back to top |
|
|
Gnanas N
Active Member
Joined: 06 Sep 2007 Posts: 792 Location: Chennai, India
|
|
|
|
Declare A as CHAR(80) |
|
Back to top |
|
|
Phrzby Phil
Senior Member
Joined: 31 Oct 2006 Posts: 1050 Location: Richmond, Virginia
|
|
|
|
Gnana -
I do not see why making A char(80) solves the problem. User clearly is inputting 3 chars.
Please explain. |
|
Back to top |
|
|
santhosh.kumar.vj
New User
Joined: 03 Aug 2011 Posts: 8 Location: Bangalore
|
|
|
|
Hi
problem is not yet solved.can some one tell me how to use 'DATA'. |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1787 Location: Bloomington, IL
|
|
|
|
santhosh.kumar.vj wrote: |
Hi
problem is not yet solved.can some one tell me how to use 'DATA'. |
Please post (cut-and-paste surrounded by code tags; do not attach screen shots) the run JCL, the relevant portions (i.e., the abend message(s)) of the JES message log, and the LEMSG sysout. |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
The format of your input data is for GET DATA processing not GET LIST. For GET LIST you supply the data only whereas for GET DATA you supply the entire assignment statement. If you look in the PL/1 Language Reference manual and look at the index for GET you can jump to the relevant sections of the manual. |
|
Back to top |
|
|
Gnanas N
Active Member
Joined: 06 Sep 2007 Posts: 792 Location: Chennai, India
|
|
|
|
Hi Phrzby,
I thought, GETting SYSIN of 80 bytes into CHAR(7) might cause an error, but it is not.
Sorry about that. |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1787 Location: Bloomington, IL
|
|
|
|
Gnana Sekaran Nallathambi wrote: |
Hi Phrzby,
I thought, GETting SYSIN of 80 bytes into CHAR(7) might cause an error, but it is not.
Sorry about that. |
You're not GETting 80 bytes, you're GETting the length of the actual data in SYSIN. "A='MAD'" has a length of 3, not 7 or 80.
Incidentally, I am fairly confident that the TS is not getting a "SOC4" (sic) abend, although he is likely getting a variety of other errors that, like a S0C4 abend, are intercepted by LE causing it to issue a U4038 abend.
(Even more incidentally: I don't recall anyone ever asking "What is a SOC4?" You may be sure, however, that when someone does ask that, I will fight to be first with the reply "It's for keeping your foot warm and dry" ) |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hi Akatsumi,
Quote: |
I don't recall anyone ever asking "What is a SOC4?" |
Once upon a tme, these were not as common as they are today. In those days (early 70's), the only s0c4's i remember happened with programs that interfaced to TCAM (predecessor to VTAM). In those days, there were few organizations that had anything "online", so it was all new to most everyone.
When a programmer was called by Operations that their program had blown up, they'd come to the computer room to pick up the available info. Seeing the abend, they'd often call out "What's a S0C4?" and several of the operators (in chorus) would yell back your answer
d |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
Compiles, Links and Gos with rc=0 for all 3 steps IF the change I referred to re the end label is made and DATA is used rather than LIST. TS has not come bck for a bit - maybe he got it going and was so excited that he forgot to thank us |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1787 Location: Bloomington, IL
|
|
|
|
Nic Clouston wrote: |
Compiles, Links and Gos with rc=0 for all 3 steps IF the change I referred to re the end label is made and DATA is used rather than LIST. TS has not come bck for a bit - maybe he got it going and was so excited that he forgot to thank us |
Oh, he'll be back...if he ever tries to write another line of PL/I |
|
Back to top |
|
|
|