Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to run sample pgm,DAY FINDER, given on the this site?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Wed Mar 14, 2007 10:24 pm    Post subject: How to run sample pgm,DAY FINDER, given on the this site?
Reply with quote

Hi,

Tried to give a shot to the pgm DAY FINDER (Return SUN/MON upto 9999/12/31 )..listed in Sample Programs on this site.

I never used Accept verb, specifically, I am curious to know ..How to run this pgm so that I can get the output.

icon_rolleyes.gif
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Mar 15, 2007 12:00 am    Post subject:
Reply with quote

Hello,

ACCEPT is a way to get data from SYSIN into your program. You could accomplish the same thing with a SELECT, an FD, an OPEN, and a READ. ACCEPT is a lazy way and many organizations have automated standards checking that will not allow ACCEPT in any production code.

In your JCL, add a //SYSIN DD * statement and following it should be the input the program is trying to accept.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Fri Mar 16, 2007 9:53 am    Post subject:
Reply with quote

Hi Dick,

Based on your suggestion used the following JCL



***************************** Top of Data *********************
//JOBCARD
//*
//STEP010 EXEC UCC11RMS,TYPRUN=F
//*
//STEP016 EXEC PGM=DAYFIND,REGION=4096K
//STEPLIB
//*
//SYSIN DD *
//SYSOUT DD SYSOUT=*
//SYSABEND DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//CEEDUMP DD SYSOUT=*
//SYSPRINT DD SYSOUT=*


HMM......above JCL made the program in loop, As stated earlier, I never used the accept verb, please correct me where I went wrong. icon_exclaim.gif
Back to top
View user's profile Send private message
agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 686
Location: Earth

PostPosted: Fri Mar 16, 2007 10:48 am    Post subject: Re: How to run sample pgm,DAY FINDER, given on the this site
Reply with quote

Code:
//*
//SYSIN DD *
2007
03
16
/*
//SYSOUT DD SYSOUT=*

Change your JCL as above.
2007 will go to first accept stmt and 03 and 16 will go to 2nd and 3rd.
Good luck. icon_smile.gif
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Fri Mar 16, 2007 11:06 am    Post subject:
Reply with quote

Thanks Abhijit.

It workd out.
But, I was under the impression that the accpet verb will make a 'dynamic-environment'..I mean.. I will be regulary promt to enter year, month & date..instead of providing the in-stream data as above.

Is there any such way..!?
or in-stream data is the only way?
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Fri Mar 16, 2007 11:20 am    Post subject:
Reply with quote

Did you look a the manual? ACCEPT from ??????
Back to top
View user's profile Send private message
agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 686
Location: Earth

PostPosted: Fri Mar 16, 2007 11:25 am    Post subject:
Reply with quote

Welcome! icon_smile.gif
In 'batch' JOB, there will be no prompting.
I think you would like to try this. icon_idea.gif
go to ISPF option 6 (Enter TSO or Workstation commands)

Code:
alloc fi(sysprint) da(*)
alloc fi(sysin) da(*)
call 'your.linklib(DAYFND)'

it will prompt you for inputs. icon_wink.gif
By this you can run your program directly under tso without JCL. icon_biggrin.gif
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Fri Mar 16, 2007 11:50 am    Post subject:
Reply with quote

Very Well said Abhijit..!!!

This was something ..what I wanted.
How do you know this, If you have some document on these type of ISPF commnads please provide me or direct me to some link on this site.

One more thing, It's a bit out of subject question:
I hope you used the following options of file-aid
f/fa/3/8
here we give some dataset name , it will ask you the function name..if we give "tally" then it gives the no. of records in the dataset specified.

Question is, I know only this function, can you please suggets some other function name.
Back to top
View user's profile Send private message
agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 686
Location: Earth

PostPosted: Fri Mar 16, 2007 12:11 pm    Post subject:
Reply with quote

Anuj,
Everything is there in manuals and internet. Just you need to search. icon_smile.gif
Your query is very simple-
got to f.3.8 file-aid option and press F1 twice
You will see all the functions available in option 5. icon_smile.gif

Please note that, you need to start new topic for a new question. icon_cool.gif
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Fri Mar 16, 2007 12:17 pm    Post subject:
Reply with quote

agkshirsagar wrote:
Welcome! icon_smile.gif
In 'batch' JOB, there will be no prompting.
I think you would like to try this. icon_idea.gif
go to ISPF option 6 (Enter TSO or Workstation commands)

Code:
alloc fi(sysprint) da(*)
alloc fi(sysin) da(*)
call 'your.linklib(DAYFND)'

it will prompt you for inputs. icon_wink.gif
By this you can run your program directly under tso without JCL. icon_biggrin.gif


hey just wanted to say that last line in the commands must be lodlib instead of linklib, as:

call 'your.lodlib(DAYFND)

what say?
Back to top
View user's profile Send private message
agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 686
Location: Earth

PostPosted: Fri Mar 16, 2007 12:31 pm    Post subject:
Reply with quote

What's there in the NAME?
It is your wish to give name you like. It can be anything
'MR.ANUJ(DAYFND)' (Depending on your site standards they may allow or not)
It's just an example. I am more used to name LINKLIB than LOADLIB. icon_smile.gif
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Mar 16, 2007 7:06 pm    Post subject:
Reply with quote

Hello,

This topic is talking about alternative "solutions" when the actual requirement has not been posted icon_smile.gif

Anuj - please post just what you need to do. Your original question indicated you needed to know more about accept. ACCEPT may not even be what you want. Please describe what your process is and we will be able to offer better suggestions.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Sat Mar 17, 2007 9:56 pm    Post subject:
Reply with quote

Yeah Dick ..in actual we went out of the 'original' subject.
Actually, the interactive feactures provided by the 'alloc' & 'call' command were just mind blowing for me...ah...that crazyness made me to put a query on the fly...instead of posting a new topic.

Now onwards, I'll take care about this. Thanks for correcting me.[/i]
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Sat Mar 17, 2007 10:08 pm    Post subject:
Reply with quote

You're welcome.

Not to worry icon_smile.gif
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Why TS/OP would Not contact site supp... RahulG31 All Other Mainframe Topics 4 Wed Mar 22, 2017 7:46 am
No new posts A sample of exit program for exit XMN... lind sh CICS 2 Mon Oct 03, 2016 5:07 pm
No new posts Can I use sort to select sample recor... Steve Ironmonger DFSORT/ICETOOL 3 Tue Nov 10, 2015 10:02 pm
No new posts sample report program kiran_65 COBOL Programming 4 Sat Jun 06, 2015 4:19 pm
No new posts IRXLOAD Sample Example iqbal.mallick CLIST & REXX 6 Tue Apr 01, 2014 6:49 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us