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

How to pass Sort Sequence in DFSORT


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
samanthjain

New User


Joined: 25 Jul 2008
Posts: 17
Location: Mumbai

PostPosted: Sun Apr 18, 2010 7:46 am
Reply with quote

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.
icon_razz.gif
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Sun Apr 18, 2010 8:20 am
Reply with quote

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
View user's profile Send private message
samanthjain

New User


Joined: 25 Jul 2008
Posts: 17
Location: Mumbai

PostPosted: Sun Apr 18, 2010 8:29 am
Reply with quote

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
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Sun Apr 18, 2010 8:49 am
Reply with quote

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
View user's profile Send private message
samanthjain

New User


Joined: 25 Jul 2008
Posts: 17
Location: Mumbai

PostPosted: Sun Apr 18, 2010 9:01 am
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Sun Apr 18, 2010 9:01 am
Reply with quote

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
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Sun Apr 18, 2010 9:10 am
Reply with quote

dick scherrer wrote:
Then name this member in both sort steps SYSIN DD statement . . .
Good answer Dick... icon_wink.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: Sun Apr 18, 2010 9:27 am
Reply with quote

Thank you, kind sir. 'Preciate it icon_smile.gif

As my Dad used to say, "Even a blind squirrel finds an acorn once in a while". . .

d
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 -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Modifying Date Format Using DFSORT DFSORT/ICETOOL 9
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts JCL sort card - get first day and las... JCL & VSAM 9
Search our Forums:

Back to Top