IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

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


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Anuj Dhawan

Superior Member


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

PostPosted: Wed Mar 14, 2007 10:24 pm
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

Moderator Emeritus


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

PostPosted: Thu Mar 15, 2007 12:00 am
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

Superior Member


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

PostPosted: Fri Mar 16, 2007 9:53 am
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: 691
Location: Earth

PostPosted: Fri Mar 16, 2007 10:48 am
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

Superior Member


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

PostPosted: Fri Mar 16, 2007 11:06 am
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: 3156
Location: Tucson AZ

PostPosted: Fri Mar 16, 2007 11:20 am
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: 691
Location: Earth

PostPosted: Fri Mar 16, 2007 11:25 am
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

Superior Member


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

PostPosted: Fri Mar 16, 2007 11:50 am
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: 691
Location: Earth

PostPosted: Fri Mar 16, 2007 12:11 pm
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

Superior Member


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

PostPosted: Fri Mar 16, 2007 12:17 pm
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: 691
Location: Earth

PostPosted: Fri Mar 16, 2007 12:31 pm
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

Moderator Emeritus


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

PostPosted: Fri Mar 16, 2007 7:06 pm
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

Superior Member


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

PostPosted: Sat Mar 17, 2007 9:56 pm
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

Moderator Emeritus


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

PostPosted: Sat Mar 17, 2007 10:08 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Sysplex System won't IPL at DR site I... All Other Mainframe Topics 2
No new posts Help needed to assemble IMS sample co... ABENDS & Debugging 4
This topic is locked: you cannot edit posts or make replies. Sample CICS Webservices Program CICS 1
No new posts Where to get sample for processing RM... PL/I & Assembler 2
No new posts Why TS/OP would Not contact site supp... All Other Mainframe Topics 4
Search our Forums:

Back to Top