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
 

 

How to merge two different files in a single record of third

 
Post new topic   This topic is locked: you cannot edit posts or make replies.    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
sandy_mcs

New User


Joined: 01 Apr 2006
Posts: 17
Location: Pune

PostPosted: Thu Jul 19, 2007 3:58 pm    Post subject: How to merge two different files in a single record of third
Reply with quote

Hi all,
My query is as below,
I want to write 'n' number of records in a file which will have a header
in below format :

TRI(a string nothing else) DATE: / / (business date from specific file) RECORD COUNT: (number of records present in file)

In STEPXX i am gettint TRI and DATE: / / using below control card
//SYSIN DD *
SORT FIELDS=COPY
OUTFIL FNAMES=SORTOUT
OUTREC FIELDS=(C'TRI',7X,11:39,2,C'-',14:37,2,C'-',17:41,4,160X)
/*

in STEPYY i got the record count using ICEMAN in another file at its first 4 locations.

Now if i am trying to combine STEPXX and STEPYY result as to make my header record not able to do, because when i am writing counter in output file it is overriding STEPXX output.
Back to top
View user's profile Send private message

krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Thu Jul 19, 2007 4:29 pm    Post subject:
Reply with quote

sandy_mcs
Code:
OUTREC FIELDS=(C'TRI',7X,11:39,2,C'-',14:37,2,C'-',17:41,4,160X)

After the string TRI you are writing DATE right? is that a run(current) date?
If so you can create the header completely in the step STEPYY itself.
Back to top
View user's profile Send private message
sandy_mcs

New User


Joined: 01 Apr 2006
Posts: 17
Location: Pune

PostPosted: Thu Jul 19, 2007 4:48 pm    Post subject: How to merge two different files in a single record of third
Reply with quote

kris,
in my STEPYY as i said i am just teking an count of records present in file SORT3, and i need to use TRAILER1 for that, because SORT do not support record count in header write??
i was in a consideration that i can use that four digit count while writting header, but it was wrong...

FYI...

//STEPYY EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=BMOM4.SORT3.OUT,DISP=SHR
//SORTOUT DD DSN=BMOM4.SORT.ICEOUT,DISP=SHR
//*DFSMSG DD SYSOUT=*
//*SYSPRINT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
OUTFIL NODETAIL,REMOVECC,
TRAILER1=(COUNT=(M11,LENGTH=4))
/*
//
Back to top
View user's profile Send private message
krisprems

Active Member


Joined: 27 Nov 2006
Posts: 649
Location: India

PostPosted: Thu Jul 19, 2007 5:34 pm    Post subject:
Reply with quote

sandy_mcs
Please answer my question
Quote:
is that a run(current) date?
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: Thu Jul 19, 2007 8:37 pm    Post subject:
Reply with quote

sandy,

This seems to be a duplicate of your other thread at:

http://ibmmainframes.com/viewtopic.php?t=22868

Please don't post the same question more than once.

I'm closing this thread.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   This topic is locked: you cannot edit posts or make replies.    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 Data replication from multiple Db2 ta... kishpra DB2 1 Mon Mar 27, 2017 9:58 pm
No new posts Splitting of single report to seperat... abdulrafi TSO/ISPF 3 Mon Mar 27, 2017 3:59 pm
No new posts Record Not found in AlX but record re... mukun264 COBOL Programming 7 Fri Mar 24, 2017 9:28 am
No new posts Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts Append data from two files into a sin... Praveen04 DFSORT/ICETOOL 5 Thu Mar 16, 2017 7:29 pm


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