IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

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


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   This topic is locked: you cannot edit posts or make replies.
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
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
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
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
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 Developer


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

PostPosted: Thu Jul 19, 2007 8:37 pm
Reply with quote

sandy,

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

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. View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts SFTP Issue - destination file record ... All Other Mainframe Topics 2
No new posts Write line by line from two files DFSORT/ICETOOL 7
Search our Forums:

Back to Top