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
 

 

Syncsort - need help in sorting a IMS DB unload file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
jaganmoni1

New User


Joined: 31 Oct 2008
Posts: 33
Location: CANADA

PostPosted: Mon Jul 06, 2009 7:22 pm    Post subject: Syncsort - need help in sorting a IMS DB unload file
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: 8593
Location: Back in jolly old England

PostPosted: Mon Jul 06, 2009 7:25 pm    Post subject:
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: 33
Location: CANADA

PostPosted: Mon Jul 06, 2009 7:45 pm    Post subject: Reply to: need help in sorting a IMS DB unload file
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    Post subject:
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: 33
Location: CANADA

PostPosted: Tue Jul 07, 2009 5:20 pm    Post subject: Reply to: need help in sorting a IMS DB unload file
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

Site Director


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

PostPosted: Tue Jul 07, 2009 8:42 pm    Post subject:
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    Post subject:
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: 33
Location: CANADA

PostPosted: Wed Jul 08, 2009 12:32 pm    Post subject: Reply to: need help in sorting a IMS DB unload file
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

Site Director


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

PostPosted: Wed Jul 08, 2009 7:32 pm    Post subject:
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: 2238
Location: @my desk

PostPosted: Thu Jul 09, 2009 12:28 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Changing of LRECL of a file abdulrafi DFSORT/ICETOOL 2 Fri Mar 24, 2017 3:25 pm
No new posts splitting a file abdulrafi DFSORT/ICETOOL 4 Fri Mar 24, 2017 11:51 am
No new posts Receive a file using PCOMM macro Harald.v.K IBM Tools 0 Thu Mar 23, 2017 6:50 pm
No new posts Export flat file data into excel sheet murali.andaluri DFSORT/ICETOOL 2 Mon Mar 20, 2017 5:39 pm
No new posts Formatting VB File Learncoholic DFSORT/ICETOOL 3 Mon Mar 20, 2017 12:29 pm


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