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
 

 

Multiple lines into one line

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Aloke Maity

New User


Joined: 25 Mar 2010
Posts: 4
Location: Hyderabad

PostPosted: Thu May 05, 2011 7:28 pm    Post subject: Multiple lines into one line
Reply with quote

Hi, I've a requirement to create a new file F2 from F1. The F1 & F2 files are as below:


Pls help...
Back to top
View user's profile Send private message

Aloke Maity

New User


Joined: 25 Mar 2010
Posts: 4
Location: Hyderabad

PostPosted: Thu May 05, 2011 7:29 pm    Post subject: Hi All,
Reply with quote

Please ignore the heading line in both the files
Back to top
View user's profile Send private message
Skolusu

Senior Member


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

PostPosted: Thu May 05, 2011 10:05 pm    Post subject:
Reply with quote

Aloke Maity,

Please STOP posting jpeg images of data. It cannot be copied. Post the data in between code tags like this

Code:
[code]your data here[/code]


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

//STEP0100 EXEC PGM=ICETOOL                                   
//TOOLMSG  DD SYSOUT=*                                         
//DFSMSG   DD SYSOUT=*                                         
//IN       DD *                                               
----+----1----+----2----+----3----+----4----+----5----+----6---
AAAAAA    S111     45                                         
AAAAAA    S222     68                                         
AAAAAA    S333     72                                         
BBBBBB    S111     46                                         
CCCCCC    S111     59                                         
CCCCCC    S222     78                                         
DDDDDD    S222     97                                         
DDDDDD    S333     57                                         
//OUT      DD SYSOUT=*                                         
//TOOLIN   DD *                                               
  SPLICE FROM(IN) TO(OUT) ON(1,10,CH) WITHANY KEEPNODUPS -     
  WITH(14,2) WITH(19,2) WITH(24,2) USING(CTL1)                 
//CTL1CNTL DD *                                               
  SORT FIELDS=COPY                                             
  INREC IFOUTLEN=80,                                           
  IFTHEN=(WHEN=INIT,BUILD=(1,10,81:11,4,20,2)),               
  IFTHEN=(WHEN=(81,4,CH,EQ,C'S111'),OVERLAY=(14:85,2)),       
  IFTHEN=(WHEN=(81,4,CH,EQ,C'S222'),OVERLAY=(19:85,2)),       
  IFTHEN=(WHEN=(81,4,CH,EQ,C'S333'),OVERLAY=(24:85,2))         
                                                               
  OUTFIL FNAMES=OUT,                                           
  IFTHEN=(WHEN=(14,2,CH,EQ,C' '),OVERLAY=(14:C'00'),HIT=NEXT),
  IFTHEN=(WHEN=(19,2,CH,EQ,C' '),OVERLAY=(19:C'00'),HIT=NEXT),
  IFTHEN=(WHEN=(24,2,CH,EQ,C' '),OVERLAY=(24:C'00'))           
//*


The output from this job is
Code:

AAAAAA       45   68   72
BBBBBB       46   00   00
CCCCCC       59   78   00
DDDDDD       00   97   57
Back to top
View user's profile Send private message
Aloke Maity

New User


Joined: 25 Mar 2010
Posts: 4
Location: Hyderabad

PostPosted: Tue May 31, 2011 5:03 pm    Post subject: Hi Kolusu,
Reply with quote

thanks a lot. it's really helpful.

Thank you once again...
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 Changeman get multiple "Browse C... elixir1986 Compuware & Other Tools 4 Fri Jul 14, 2017 1:48 am
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
No new posts Unable to create multiple files using... mbattu COBOL Programming 3 Fri May 05, 2017 5:35 pm
This topic is locked: you cannot edit posts or make replies. SDSF multiple spool datasets extracte... PJAlarcon CLIST & REXX 1 Fri Apr 21, 2017 10:50 pm


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