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 JES2 JEC: Use UNIX Pipes to Pass Data... Virendra Shambharkar JCL & VSAM 21 Tue Dec 20, 2016 6:55 pm
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
This topic is locked: you cannot edit posts or make replies. How to pass the previous month date i... Suganya87 DFSORT/ICETOOL 5 Mon Oct 31, 2016 4:13 pm
No new posts How to get the remainder and quotient... vnktrrd DFSORT/ICETOOL 2 Mon Oct 31, 2016 10:59 am


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