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
 
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 line 52: Name or string > 250 char... Ashishpanpaliya CLIST & REXX 3 Sat Oct 14, 2017 2:29 am
No new posts How to write Rexx program to size and... sreejeshcs CLIST & REXX 14 Thu Oct 12, 2017 7:26 am
No new posts ejck thru rexx to multiple jobs insid... Susanta All Other Mainframe Topics 5 Tue Sep 19, 2017 1:39 pm
No new posts PLI - printing from multiple programs Pedro PL/I & Assembler 8 Fri Sep 08, 2017 6:36 am
No new posts Repeat part of record multiple times Learncoholic DFSORT/ICETOOL 4 Tue Aug 29, 2017 11:33 am

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