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
 

 

Insert space after copying of records from a file.

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

Active User


Joined: 03 Nov 2005
Posts: 269
Location: Mumbai

PostPosted: Thu Mar 11, 2010 3:56 pm    Post subject: Insert space after copying of records from a file.
Reply with quote

Hi All,

My requirement is as below:

I am merging around 20 files in one out put file with a SORT condition. There will no change in order of records due to sort condition. I want to insert a Blank line in final output once the records from each input file are copied

//SORTIN DD DSN1
// DD DSN2
// DD DSN3
// DD DSN4
// DD DSN5
//SORTOUT DD DSNF
//SORTIN DD *

I need my file DSNF to have data as below

DSN1 records
<SPACE>
DSN2 records
<SPACE>
DSN3 records
<SPACE>
DSN4 records
<SPACE>
DSN5 records
<SPACE>

Please help me out in this

Regards,
Chandan
Back to top
View user's profile Send private message

gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Thu Mar 11, 2010 4:06 pm    Post subject:
Reply with quote

Hi,

create a file with a blank record and concatenate it with the other files.


Gerry
Back to top
View user's profile Send private message
guptae

Moderator


Joined: 14 Oct 2005
Posts: 1187
Location: Bangalore,India

PostPosted: Thu Mar 11, 2010 4:14 pm    Post subject:
Reply with quote

Hello Gerry,

I dont think it will help because order of blank record will change depends upon sort criteria
Back to top
View user's profile Send private message
chandan.inst

Active User


Joined: 03 Nov 2005
Posts: 269
Location: Mumbai

PostPosted: Thu Mar 11, 2010 4:16 pm    Post subject:
Reply with quote

Thanks Gerry.

It will solve my problem just for curosity is it possible by using DFSORT only?
If yes then it will also save creation of emty file which rather will not be useful afterwords

Thanks and regards,
Chandan
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Thu Mar 11, 2010 5:38 pm    Post subject:
Reply with quote

It is very difficult to tell if it will work by this way. You need to really explain your sort criteria if there is any.
If you are just copying all datasets to one they why to use sort why not just IEBGENER with trick what Gerry has mentioned?
Back to top
View user's profile Send private message
chandan.inst

Active User


Joined: 03 Nov 2005
Posts: 269
Location: Mumbai

PostPosted: Thu Mar 11, 2010 7:32 pm    Post subject: Reply to: Insert space after copying of records from a file.
Reply with quote

Hi,

I am just copying all the records to output file by elimination few records which are having particular string..

I am using following sort criteria
Option COPY
Omit Cond=(1,80,SS,EQ,C'STRING')

Regards,
Chandan
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: Fri Mar 12, 2010 12:13 am    Post subject:
Reply with quote

Hello,

At the beginning of the job, create an empty temporary dataset.

In the COPY step concatenate this temporary dataset between the data files.

After the COPY, delete the temporary dataset.
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 Mar 12, 2010 12:32 am    Post subject:
Reply with quote

Chandan,

Here's another way to do it with DFSORT/ICETOOL:

Code:

//S1   EXEC  PGM=ICETOOL
//TOOLMSG   DD  SYSOUT=*
//DFSMSG    DD  SYSOUT=*
//IN1 DD DSN=...  input file1
//IN2 DD DSN=...  input file2
//IN3 DD DSN=...  input file3
//IN4 DD DSN=...  input file4
//IN5 DD DSN=...  input file5
//OUT DISP=MOD,DSN=...  MOD output file
//TOOLIN DD *
COPY FROM(IN1) USING(CTL1)
COPY FROM(IN2) USING(CTL1)
COPY FROM(IN3) USING(CTL1)
COPY FROM(IN4) USING(CTL1)
COPY FROM(IN5) USING(CTL1)
/*
//CTL1CNTL DD *
  OMIT COND=(1,80,SS,EQ,C'STRING')
  OUTFIL FNAMES=OUT,REMOVECC,TRAILER1=(X)
/*
Back to top
View user's profile Send private message
gcicchet

Senior Member


Joined: 28 Jul 2006
Posts: 1703
Location: Australia

PostPosted: Fri Mar 12, 2010 3:23 am    Post subject:
Reply with quote

Hi Ekta,

Quote:
I dont think it will help because order of blank record will change depends upon sort criteria

Why do you think this ?

The op said
Quote:
There will no change in order of records due to sort condition. I want to insert a Blank line in final output once the records from each input file are copied

The order of the records will not change.


Gerry
Back to top
View user's profile Send private message
chandan.inst

Active User


Joined: 03 Nov 2005
Posts: 269
Location: Mumbai

PostPosted: Fri Mar 12, 2010 9:19 am    Post subject: Reply to: Insert space after copying of records from a file.
Reply with quote

Thnaks Frank and Gerry for your replies..

Both of the solutions will work for me..

Regards,
Chandan
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 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