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

Syncsort - need help in sorting a IMS DB unload file


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

New User


Joined: 31 Oct 2008
Posts: 35
Location: CANADA

PostPosted: Mon Jul 06, 2009 7:22 pm
Reply with quote

Hi,

I have one Variable length file with file length 4096. It is an IMS DB unload file. The file contains 4 different types of segments namely SCIFBSC, SCIFACT,SCIFADR, SCIFSPC. I want the file to be sorted on the basis of the card number which is present in the fields starting from 3 to 12 in the SCIFBSC segment.
When the SCIFBSC segment is sorted I want all the other segments ( SCIFACT,SCIFADR, SCIFSPC ) under the SCIFBSC segment also to be in order.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Mon Jul 06, 2009 7:25 pm
Reply with quote

Please give an example of the input and the expected output.
Back to top
View user's profile Send private message
jaganmoni1

New User


Joined: 31 Oct 2008
Posts: 35
Location: CANADA

PostPosted: Mon Jul 06, 2009 7:45 pm
Reply with quote

Segment name starts from column 3 to 9 and the key value starts from 12 to 21 in SCIFBSC segment.
Note: I just want to remaind you again that file format is VB
Code:
Input Data:
----+----1----+----2----+----3----+----4----+----5----+----
********************************* Top of Data *************
01..DPSRCIFD                                               
01SCIFBSC .4560009974 00 991207070700000000000091021980010E
02SCIFEXTN.Ñ070101S0710240910219000000ABCDE     230       0
02SCIFACT .ýA4537002500230910219000000ABCDE     230       
02SCIFADR .¡900080929ADDRESS-1                             
01SCIFBSC .4550203306 00 991207070700000009100991021980010F
02SCIFEXTN.Ñ070101S0710240910219000000ABCDE     230       0
02SCIFACT .ýA4537002500230910219000000ABCDE     230       
02SCIFADR .¡900090728APT 2  RR2                           
02SCIFSRV .ûTSSACT ...I20082009040271506...............Sf47
01SCIFBSC .4550238919 00 080907070700000000000091021950476E
02SCIFADR ..¡900000000APT 2  RR2                           
02SCIFADR .ý0013 BROADWAY AVE.  APT.34       TORONTO       
02SCIFSPC .uP0000000000000000000000000  000000...0000000000
01SCIFBSC .4550240688 00 120805070700000000000091021950476E
02SCIFADR ..¡900000000APT 2  RR2                           
02SCIFADR .ý0013 BROADWAY AVE.  APT.34       TORONTO       
02SCIFADR .¡900000000APT 2  RR2                           
02SCIFSPC .uP0000000000000000000000000  000000...0000000000
01SCIFBSC .;712000219 00 991200000000000000000000000099999E

Output Data:
Output should be in the same format, but it should be sorted based on the key value in the SCIFBSC segment.
Back to top
View user's profile Send private message
Skolusu

Senior Member


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

PostPosted: Mon Jul 06, 2009 10:06 pm
Reply with quote

jaganmoni1,

The following DFSORT/ICETOOL JCL will give you the desired results.

Code:

//STEP0100 EXEC PGM=SORT                                         
//SYSOUT   DD SYSOUT=*                                           
//SORTIN   DD DSN=your input vb file,DISP=SHR 
//SORTOUT  DD SYSOUT=*                                           
//SYSIN    DD *                                                   
  INREC IFTHEN=(WHEN=INIT,BUILD=(1,4,10X,5)),                     
  IFTHEN=(WHEN=GROUP,BEGIN=(17,7,CH,EQ,C'SCIFBSC'),PUSH=(5:26,10))
  SORT FIELDS=(5,10,CH,A)                                         
  OUTFIL BUILD=(1,4,15)                                           
/*
Back to top
View user's profile Send private message
jaganmoni1

New User


Joined: 31 Oct 2008
Posts: 35
Location: CANADA

PostPosted: Tue Jul 07, 2009 5:20 pm
Reply with quote

Hi Skolusu,

Thanks a lot for your solution with DFSORT utility. We are getting some syntax problems due to the older version of DFSORT.
Presently we are using version Z/OS 1.3.1. Is it possible to build this logic with existing command of 1.3.1 version?
If it is not possible, please provide the solution with ICETOOL. We are using ICETOOL version - 1.6.1
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: Tue Jul 07, 2009 8:42 pm
Reply with quote

Hello,

It sounds like you are using Syncsort rather than DFSORT.

Please post any complete message (including the message id) from an execution of your sort.
Back to top
View user's profile Send private message
Skolusu

Senior Member


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

PostPosted: Tue Jul 07, 2009 8:43 pm
Reply with quote

jaganmoni1,

As Dick pointed out , you are using syncsort and not DFSORT. I'm a DFSORT developer. DFSORT and Syncsort are competitive products. I'm happy to answer questions on DFSORT and DFSORT's ICETOOL, but I don't answer questions on Syncsort.
Back to top
View user's profile Send private message
jaganmoni1

New User


Joined: 31 Oct 2008
Posts: 35
Location: CANADA

PostPosted: Wed Jul 08, 2009 12:32 pm
Reply with quote

Hi Dick,

Yes.. You are correct.. We are using SYNCSORT. I am sorry to confuse all of you.
Can you please provide the same solution with SYNCSORT utility, if possible.

Hi Skolusu,
Thank you very much for providing the solution with DFSORT
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 Jul 08, 2009 7:32 pm
Reply with quote

Hello,

I believe the same solution will work with Syncsort if your system upgrades to the current version. . .
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2481
Location: @my desk

PostPosted: Thu Jul 09, 2009 12:28 pm
Reply with quote

Quote:
When the SCIFBSC segment is sorted I want all the other segments ( SCIFACT,SCIFADR, SCIFSPC ) under the SCIFBSC segment also to be in order
jaganmoni1,

May be it's too late to ask. Can you explain the above statement? And do you mind posting the expected output for your sample input.
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 Extract the file name from another fi... DFSORT/ICETOOL 6
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Load new table with Old unload - DB2 DB2 6
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
Search our Forums:

Back to Top