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

Horizontol Sort/Merge


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Steynek

New User


Joined: 02 Jan 2008
Posts: 4
Location: PHX, AZ

PostPosted: Fri Jan 04, 2008 7:42 am
Reply with quote

Hi,

I have a flat file containing 10 sequential records of a hundred bytes each. I would like to copy these records into one record of 1000 bytes (thus horizontally). At first I thought that there must be a simple procedure in either ICEMAN or ICETOOL to perform this task; however, I have not been able to come up with anything!! Resorted to some REXX code to perform the task in the interim; however, I am quite interested in finding out if this is possible with ICEMAN or ICETOOL?

Thanks
Erik
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: Fri Jan 04, 2008 9:32 pm
Reply with quote

Here's a DFSORT/ICETOOL job that will do what you asked for:

Code:

//S1    EXEC  PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG  DD SYSOUT=*
//IN DD DSN=...  input file (FB/100)
//OUT DD DSN=...  output file (FB/1000)
//TOOLIN DD *
SPLICE FROM(IN) TO(OUT) ON(1001,1,CH) WITHEACH -
 WITH(101,100) WITH(201,100) WITH(301,100) WITH(401,100) -
 WITH(501,100) WITH(601,100) WITH(701,100) WITH(801,100) -
 WITH(901,100) USING(CTL1)
/*
//CTL1CNTL DD *
  INREC IFTHEN=(WHEN=INIT,OVERLAY=(1002:SEQNUM,1,ZD,START=0)),
    IFTHEN=(WHEN=(1002,1,ZD,EQ,+1),OVERLAY=(101:1,100)),
    IFTHEN=(WHEN=(1002,1,ZD,EQ,+2),OVERLAY=(201:1,100)),
    IFTHEN=(WHEN=(1002,1,ZD,EQ,+3),OVERLAY=(301:1,100)),
    IFTHEN=(WHEN=(1002,1,ZD,EQ,+4),OVERLAY=(401:1,100)),
    IFTHEN=(WHEN=(1002,1,ZD,EQ,+5),OVERLAY=(501:1,100)),
    IFTHEN=(WHEN=(1002,1,ZD,EQ,+6),OVERLAY=(601:1,100)),
    IFTHEN=(WHEN=(1002,1,ZD,EQ,+7),OVERLAY=(701:1,100)),
    IFTHEN=(WHEN=(1002,1,ZD,EQ,+8),OVERLAY=(801:1,100)),
    IFTHEN=(WHEN=(1002,1,ZD,EQ,+9),OVERLAY=(901:1,100))
  OUTFIL FNAMES=OUT,BUILD=(1,1000)
/*
Back to top
View user's profile Send private message
Steynek

New User


Joined: 02 Jan 2008
Posts: 4
Location: PHX, AZ

PostPosted: Fri Jan 04, 2008 10:06 pm
Reply with quote

Thanks Frank!!!

I guess this solution is not dynamic as it is specific to the number of rows in the input file. Would have been nice if it could just append dynamically for each input record.

Regards
erik
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: Tue Nov 09, 2010 2:21 am
Reply with quote

With z/OS DFSORT V1R10 PTF UK90025 or z/OS DFSORT V1R12 PTF UK90026 (Oct,2010), you can now use the new RESIZE operator of DFSORT's ICETOOL to do this more easily like this:

Code:

//NEW   EXEC  PGM=ICETOOL                                       
//TOOLMSG DD SYSOUT=*                                           
//DFSMSG  DD SYSOUT=*     
//IN DD DSN=...  input file (FB/100)
//OUT DD DSN=...  output file (FB/1000)
//TOOLIN DD *                                                   
RESIZE FROM(IN) TO(OUT) TOLEN(1000)                             
/*                                         


For complete details on the new functions for DFSORT and DFSORT's ICETOOL available with the Oct, 2010 PTF, see:

www.ibm.com/support/docview.wss?rs=114&uid=isg3T7000242
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 -> DFSORT/ICETOOL

 


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 JCL sort card - get first day and las... JCL & VSAM 9
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts Merge two VSAM KSDS files into third ... JCL & VSAM 6
Search our Forums:

Back to Top