Home      Mainframe Forum      Mainfarme Tutorials      IBM Manuals      Mainframe Interview Questions      Mainframe Books      IT News     SiteMap     Downloads


     
 
MAINFRAME - TIP OF THE DAY : All available storage is assigned to the job or jobstep, If REGION is coded 0K or 0M

Google
 
Web mainframegurukul.com

Return-code

 
Post new topic   Reply to topic    mainframegurukul.com Forum Index -> COBOL
  View previous topic :: View next topic  
Author Message
venky
Member


Joined: 12 May 2012
Posts: 49

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Wed Oct 16, 2013 8:00 pm    Post subject: Return-code Reply with quote

Hi All,

As we know that Return-code is to send condition code(maxcc) when we submit the job based on logic in our program.

Is there is any parameter like Return-code to send Alphabetic data instead of numeric data.

like i want to display message in alphabetic after submitting the job as we are getting it for return-code.

eg:

move '8' to retrun-code.

I want to display like below.

move 'data is not matching' to return-code.

let me know the parameter for getting the message.

Regards,
Venky.
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.

DikDude
Moderator


Joined: 22 Jul 2011
Posts: 1001
Location: usa

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Wed Oct 16, 2013 9:52 pm    Post subject: Reply with quote

First, return-code is NOT maxcc.

You need to read in the COBOL manual about RETURN-CODE. It can only be numbers and be between 0 and 4095. If you set it higher, you will get unexpected results.
_________________
Have a good one
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
venky
Member


Joined: 12 May 2012
Posts: 49

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Wed Oct 16, 2013 10:43 pm    Post subject: Reply with quote

Thanks Dikdude,

I have included the code like below.

If file-status-code = 0
move 8 to return-code
else
move 0 to return-code
end-if.

here,when I am submitting the job I am getting Maxcc=8 it depends upon the input file.

Now, my question is instead of 8 or 0, can we pass alphabetic data into any other parameter like we are passing numeric data into return-code, I know return-code will not accept alphabetic data.

my requirement is to pass alphabatic data and need to pass data like 'data is not matching' and need to display this data after job completion.

let me know if ther is any procedure.

Regards,
Venky.
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
DikDude
Moderator


Joined: 22 Jul 2011
Posts: 1001
Location: usa

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Wed Oct 16, 2013 11:44 pm    Post subject: Reply with quote

Sure, you can write the apha info to a file and read it for presentation later.
_________________
Have a good one
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
Gurugars
Active Member


Joined: 23 Oct 2010
Posts: 106
Location: Chennai,India.

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Thu Oct 17, 2013 10:41 am    Post subject: Reply with quote

Quote:
my requirement is to pass alphabatic data and need to pass data like 'data is not matching' and need to display this data after job completion


Where you want to disply this message? SYSOUT or somewhere else?
Message in the same step or on some other steps?
_________________
Guru:-)

You're never fully dressed without a smile Smile
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
venky
Member


Joined: 12 May 2012
Posts: 49

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Thu Oct 17, 2013 11:06 am    Post subject: Reply with quote

Hi Guru,

No I don't want in sysout, in sysout if we want to display we can use 'Display' in the program.

When we run any program we will be seeing the message like maxcc=0 after completing the job right?

Below that maxcc=0 message only I need to dispaly 'data is not matching'.

can we do this?

Thanks.
Regards,
Venky.
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
NicC
Active Member


Joined: 24 Jul 2011
Posts: 651
Location: Down on the pig farm

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Thu Oct 17, 2013 5:38 pm    Post subject: Reply with quote

I would very much doubt that you could do that. Certainly you could not do it without a modification to the operating system and or JES subsystem.
_________________
Regards
Nic
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
William Collins
Active Member


Joined: 24 May 2012
Posts: 714

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Thu Oct 17, 2013 8:08 pm    Post subject: Reply with quote

I think venky wants to see a message from the program on the response in his session from the NOTIFY on the JOB statement (hence the reference to MAXXCC).

There is no way to do this directly.

Why do you want to do it? If we know, we might be able to suggest something.
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
venky
Member


Joined: 12 May 2012
Posts: 49

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Thu Oct 17, 2013 10:03 pm    Post subject: Reply with quote

Hi William,

Exactly you are right!

Actually I am writing a program like if a dataset is empty I am sending Maxcc=8 and If a dataset is having data in it then I am sending Maxcc=0 by using return-code. Please look into the below code.

If file-status-code = 0
move 8 to return-code
else
move 0 to return-code
end-if.

Now, I want is after maxcc i need to display some message.

for example: if the dataset is empty I am getting maxcc=8 ,after maxcc=8 i need to display like 'there are no records in the file'.

Thanks.
Regards,
Venky.
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
William Collins
Active Member


Joined: 24 May 2012
Posts: 714

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Thu Oct 17, 2013 11:18 pm    Post subject: Reply with quote

OK, but why do you need it?
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
DikDude
Moderator


Joined: 22 Jul 2011
Posts: 1001
Location: usa

Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Fri Oct 18, 2013 5:49 am    Post subject: Reply with quote

If you want a message generated for one or the other condition code, conditionally execute a step that will print the message you want to generate based on that condition code.

Suggest you forget about MAXCC.
_________________
Have a good one
Back to top
View user's profile Send private message
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
academyindia4
Guest





Answer was approved by Question owner.
Useful Post
0 votes
Not an useful post
Greate Post!! Salute Author
0 salutes

PostPosted: Fri Jan 15, 2016 8:56 pm    Post subject: Topic deleted by Admin Reply with quote

<< Content deleted By Admin >>
Back to top
Click here, If this post answer your question. <-- Click on right mark icon. If this post answer your question.
Display posts from previous:   
Post new topic   Reply to topic    mainframegurukul.com Forum Index -> COBOL 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

Related topics
 Topics   Replies   Author   Views   Last Post 
No new posts Query For IEBPTPCH 3 padmajeet.gaikwad 13445 Mon Feb 01, 2016 10:56 pm
academyindia4 View latest post
No new posts Unable to achieve below scenario using ICETOOL 27 sirianangel 33683 Mon Feb 01, 2016 10:01 pm
academyindia4 View latest post
No new posts Need to put records a Sorting order as mentioned below. 14 Yash1911 12634 Mon Jan 25, 2016 9:50 pm
academyindia4 View latest post
No new posts how to deal with the below scenario using iebgener 7 mainframes_6002 11170 Wed Dec 07, 2011 10:34 am
DikDude View latest post
No new posts Coulu someone explain the parameters in the below code? 1 lovely sweety 11352 Thu Jun 09, 2011 3:50 pm
dbzTHEdinosauer View latest post
 


Cobol Tutorial
This cobol tutorial covers most of the important topics like STRING, UNSTRING, COMP, COMP-3.....
DB2 Tutorial
DB2 Tutorial focuses on DB2 COBOL Programming. Explains in simple language. Some Chapters are locked, Forum members have free access to these chapters
CICS Tutorial
This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming...
JCL Tutorial
This is most popular JCL tutorial from mainframegurukul. It does contain important jcl ....
SORT Tutorial
This Tutorial covers all important aspects of DFSORT. Has more SORT examples
INTERVIEW Questions
This page covers important interview questions
Mainframe Jobs
Mainframe Jobs posted by members of mainframegurukul forum
FaceBook Page
MainframeGurukul FaceBook Page
LinkedIn Page
MainframeGurkul Linkedin Page

This widget requires Flash Player 9 or better







Go to top of the page
 

Online ABEND Reference ||  JCL References ||  COBOL References ||  VSAM References ||  Tutorials by Drona Series ||  SQL tutorial ||  BOOKS  ||  DB2 INTERVIEW QUESTIONS ||  COBOL INTERVIEW QUESTIONS  ||  JCL INTERVIEW QUESTIONS ||  JCL2 INTERVIEW QUESTIONS ||  VSAM INTERVIEW QUESTIONS ||  CICS INTERVIEW QUESTIONS  ||  Online tutorials ||  Online ABEND Reference ||  JCL References ||  COBOL References ||  VSAM References ||  Tutorials by Drona Series ||  SQL tutorial ||  BOOKS  ||  SiteMap  ||  Expeditor Tutorial  ||  FILE-AID Tutorial  ||  Changeman Tutorial  ||  COBOL   ||  DB2   ||  JCL  ||  CICS  ||  VSAM  ||  DB2 Interview Questions ( 110 )   || Simple JCL Tutorials  || JCL Tutorial from MainframeGurukul.com   || Simple JCL Tutorial - Chapter1 ;|| Mainframe Forum - Tutorials  || Mainframe Tutorials || Mainframe CICS tutorial|| Mainframe COBOL Tutorial

Drona Educational Forums - Mainframe Cobol DB2 CICS Board
Powered by phpBB

mainframetopic-7307.html