View previous topic :: View next topic
|
Author |
Message |
samanthjain
New User
Joined: 25 Jul 2008 Posts: 17 Location: Mumbai
|
|
|
|
Hi... I recently attended an interview and there was one question asked on DFSORT. The question goes like this.
How do we pass the Sorting order ( Ascending or Descending ) from one step to other.
Suppose we have 1st step sorting the file on ascending order.
This sorting order should be passed to the 2nd step and the input file in 2nd step should be sorted in the same order as of the 1st step.
Please provide me the solution for this.
|
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
samanthjain wrote: |
Hi... I recently attended an interview and there was one question asked on DFSORT. |
Interview question?
Quote: |
The question goes like this.
How do we pass the Sorting order ( Ascending or Descending ) from one step to other.
Suppose we have 1st step sorting the file on ascending order.
This sorting order should be passed to the 2nd step and the input file in 2nd step should be sorted in the same order as of the 1st step. |
Why would you need to, you (the JCL creator) specified the first step sort order, you would know that order for the second step..... |
|
Back to top |
|
|
samanthjain
New User
Joined: 25 Jul 2008 Posts: 17 Location: Mumbai
|
|
|
|
Even i gave the same reason. Being JCL creator, i can have the same order for all steps.
But the person who took the interview told that i can use some symbolic parameter for passing the order.
Just wanted to know if there is any solution for this or not.
Thanks |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
I may be somewhat limited in my JCL understanding, but since all (almost) JCL is procs and sysin in procs is limited (not allowed?) and symbolics don't (?) work in sysins, I can't think of a way to do that....
Can you post some JCL that might accomplish what the interviewer wanted? |
|
Back to top |
|
|
samanthjain
New User
Joined: 25 Jul 2008 Posts: 17 Location: Mumbai
|
|
|
|
Even my understanding on JCL is limited and knew that symbolic parameters wont work in sysin.
I am sorry that i couldnt post any JCL as i am not sure how this will be done.
The interviewer told that after giving Sort fields in Sysin, we should give some command which will store the Sorting order and that command can be used in the later steps for sort.
Thanks |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Place the sort control information in a pds member.
Then name this member in both sort steps SYSIN DD statement . . .
Code: |
//SYSIN DD DSN=the.pds(sortstuf),DISP=SHR |
Changing the member changes the control for both steps.
This is not really a sort question. . .
Possibly, there is additional requirement info not yet posted? |
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
dick scherrer wrote: |
Then name this member in both sort steps SYSIN DD statement . . . |
Good answer Dick... |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Thank you, kind sir. 'Preciate it
As my Dad used to say, "Even a blind squirrel finds an acorn once in a while". . .
d |
|
Back to top |
|
|
|