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 pass Sort Sequence in DFSORT

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: How to pass Sort Sequence in DFSORT
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: 2150
Location: At my coffee table

PostPosted: Sun Apr 18, 2010 8:20 am    Post subject: Re: How to pass Sort Sequence in DFSORT
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    Post subject: Reply to: How to pass Sort Sequence in DFSORT
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: 2150
Location: At my coffee table

PostPosted: Sun Apr 18, 2010 8:49 am    Post subject:
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    Post subject: Reply to: How to pass Sort Sequence in DFSORT
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

Site Director


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

PostPosted: Sun Apr 18, 2010 9:01 am    Post subject:
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: 2150
Location: At my coffee table

PostPosted: Sun Apr 18, 2010 9:10 am    Post subject:
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

Site Director


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

PostPosted: Sun Apr 18, 2010 9:27 am    Post subject: Reply to: How to pass Sort Sequence in DFSORT
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    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Innovations in Your Mainframe Sort Arun Raj PC Guides & IT News 4 Wed Mar 15, 2017 10:38 pm
No new posts SORT VSAM file with each field one by... maxsubrat DFSORT/ICETOOL 6 Tue Mar 14, 2017 1:07 pm
No new posts SORT requirement sjiraga COBOL Programming 6 Thu Mar 09, 2017 9:11 pm
No new posts SORT to append Month and YEAR in MMYY... tisamf DFSORT/ICETOOL 1 Wed Mar 08, 2017 4:46 pm
No new posts DFSORT MUL FIELDS tspr52 DFSORT/ICETOOL 16 Fri Mar 03, 2017 11:53 pm


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