Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Horizontol Sort/Merge

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    Post subject: Horizontol Sort/Merge
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 Moderator


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

PostPosted: Fri Jan 04, 2008 9:32 pm    Post subject:
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    Post subject:
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 Moderator


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

PostPosted: Tue Nov 09, 2010 2:21 am    Post subject:
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:

http://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    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 Extract record for change in combinat... Trinadh DFSORT/ICETOOL 6 Thu Nov 23, 2017 3:32 pm
No new posts JOINKEYS Paired and Unpaired Sort on ... MFwhiz DFSORT/ICETOOL 7 Tue Nov 07, 2017 2:46 am
No new posts sort records based on length exceeds ... maxsubrat DFSORT/ICETOOL 7 Wed Oct 04, 2017 4:48 pm
No new posts JOINKEYS Paired and Unpaired Sort MFwhiz DFSORT/ICETOOL 4 Fri Sep 29, 2017 1:48 am
No new posts Difference in SORT & ICETOOL Mohan Kothakota DFSORT/ICETOOL 5 Fri Sep 22, 2017 4:56 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us