View previous topic :: View next topic
|
Author |
Message |
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
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.
|
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
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 |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
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. |
|
Back to top |
|
|
agkshirsagar
Active Member
Joined: 27 Feb 2007 Posts: 691 Location: Earth
|
|
|
|
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. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
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 |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
Did you look a the manual? ACCEPT from ?????? |
|
Back to top |
|
|
agkshirsagar
Active Member
Joined: 27 Feb 2007 Posts: 691 Location: Earth
|
|
|
|
Welcome!
In 'batch' JOB, there will be no prompting.
I think you would like to try this.
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.
By this you can run your program directly under tso without JCL. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
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 |
|
|
agkshirsagar
Active Member
Joined: 27 Feb 2007 Posts: 691 Location: Earth
|
|
|
|
Anuj,
Everything is there in manuals and internet. Just you need to search.
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.
Please note that, you need to start new topic for a new question. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
agkshirsagar wrote: |
Welcome!
In 'batch' JOB, there will be no prompting.
I think you would like to try this.
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.
By this you can run your program directly under tso without JCL. |
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 |
|
|
agkshirsagar
Active Member
Joined: 27 Feb 2007 Posts: 691 Location: Earth
|
|
|
|
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. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Hello,
This topic is talking about alternative "solutions" when the actual requirement has not been posted
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 |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
You're welcome.
Not to worry |
|
Back to top |
|
|
|