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

To Sort the output of a the SEARCH (3.14 option)


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ch.sridhar

New User


Joined: 01 May 2006
Posts: 7
Location: INDIA, Mumbai

PostPosted: Wed Dec 12, 2007 1:47 am
Reply with quote

Hi,

I need to sort an input file that has a list of program names and while writing the output, I need to put these program names within brackets. The problem is some program names are 7 characters in lenght and some are 8 characters in lenght, so while trying to put brackets, for the 7 character program, I am getting a SPACE before closing the bracket.

Could some body advise as how to solve this using SYNCSORT and DFSORT? . I am trying to use ALTSEQ but its not working properly.
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Wed Dec 12, 2007 2:24 am
Reply with quote

ch.sridhar wrote:
Hi,

I need to sort an input file that has a list of program names and while writing the output, I need to put these program names within brackets. The problem is some program names are 7 characters in lenght and some are 8 characters in lenght, so while trying to put brackets, for the 7 character program, I am getting a SPACE before closing the bracket.

Could some body advise as how to solve this using SYNCSORT and DFSORT? . I am trying to use ALTSEQ but its not working properly.


Here is a DFSORT job which would give you the desired results. This job will take care of spaces

Code:

//STEP0100 EXEC PGM=ICEMAN                                 
//SYSOUT   DD SYSOUT=*                                   
//SORTIN   DD *                                         
A                                                       
BB                                                       
CCC                                                     
DDDD                                                     
EEEEE                                                   
FFFFFF                                                   
GGGGGGG                                                 
HHHHHHHH                                                 
//SORTOUT  DD SYSOUT=*                                   
//SYSIN    DD *                                         
  SORT FIELDS=COPY                                       
    INREC IFTHEN=(WHEN=INIT,                             
      BUILD=(1,80,JFY=(LEAD=C'(',SHIFT=LEFT,TRAIL=C')')))
//*                                                     


and the output is

Code:

(A)       
(BB)     
(CCC)     
(DDDD)   
(EEEEE)   
(FFFFFF) 
(GGGGGGG)
(HHHHHHHH)


Hope this helps...
Back to top
View user's profile Send private message
ch.sridhar

New User


Joined: 01 May 2006
Posts: 7
Location: INDIA, Mumbai

PostPosted: Wed Dec 12, 2007 2:46 am
Reply with quote

Hi,

I have tried previously with JFY and TRAIL options etc...but the sort step is abending.
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: Wed Dec 12, 2007 3:03 am
Reply with quote

Hello,

You are using Syncsort.
Back to top
View user's profile Send private message
acevedo

Active User


Joined: 11 May 2005
Posts: 344
Location: Spain

PostPosted: Wed Dec 12, 2007 3:19 am
Reply with quote

yes, the WER messages belongs to SyncSort.

is Alissa registered in this forum?
Back to top
View user's profile Send private message
ch.sridhar

New User


Joined: 01 May 2006
Posts: 7
Location: INDIA, Mumbai

PostPosted: Wed Dec 12, 2007 3:27 am
Reply with quote

Hi,

Yes sorry I forgot to tell...I can use SYNCSORT only not DFSORT so is there any way I can do this with SYNCSORT.


Thanks,
Sridhar
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: Wed Dec 12, 2007 5:01 am
Reply with quote

Hello,

Quote:
is Alissa registered in this forum?
Yes, she is.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Wed Dec 12, 2007 11:35 pm
Reply with quote

Sridhar,

Kolusu's job works fine with DFSORT which has supported the JFY function since April, 2006. Syncsort does NOT support the JFY function.
Back to top
View user's profile Send private message
ch.sridhar

New User


Joined: 01 May 2006
Posts: 7
Location: INDIA, Mumbai

PostPosted: Thu Dec 13, 2007 12:01 am
Reply with quote

Frank,

Thanks for the response but I am not sure if my company has DFSORT or not...Could you please let me know if there is a way to handle this with SYNCSORT.


Thanks,
Sridhar
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Thu Dec 13, 2007 12:24 am
Reply with quote

ch.sridhar wrote:
Could you please let me know if there is a way to handle this with SYNCSORT.


That will be up to someone from SYNCSORT to respond to. Please wait for their response, or contact their tech. support directly via their website.
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Thu Dec 13, 2007 12:24 am
Reply with quote

Quote:
Frank,

Thanks for the response but I am not sure if my company has DFSORT or not...Could you please let me know if there is a way to handle this with SYNCSORT.


Kolusu and I are DFSORT developers. DFSORT and Syncsort are competitive products. We're happy to answer questions on DFSORT and DFSORT's ICETOOL, but we don't answer questions on Syncsort.
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 -> JCL & VSAM

 


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 Search two or more word with FILEAID Compuware & Other Tools 15
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts JCL sort card - get first day and las... JCL & VSAM 9
Search our Forums:

Back to Top