View previous topic :: View next topic
|
Author |
Message |
sandy_mcs
New User
Joined: 01 Apr 2006 Posts: 17 Location: Pune
|
|
|
|
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 |
|
|
krisprems
Active Member
Joined: 27 Nov 2006 Posts: 649 Location: India
|
|
|
|
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 |
|
|
sandy_mcs
New User
Joined: 01 Apr 2006 Posts: 17 Location: Pune
|
|
|
|
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 |
|
|
krisprems
Active Member
Joined: 27 Nov 2006 Posts: 649 Location: India
|
|
|
|
sandy_mcs
Please answer my question
Quote: |
is that a run(current) date?
|
|
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
Back to top |
|
|
|