View previous topic :: View next topic
|
Author |
Message |
Guru Nandu
New User
Joined: 16 Jul 2009 Posts: 6 Location: India
|
|
|
|
Hi,
If input file in variable length record as shown below
12073
12083
1208345
120834
Using DFSORT/ICETOOL, Can we format as sample provided below
AAA
BBB
CCC:YYMMDD001
XXX12073YY
XXX12073YY
XXX1208345YY
XXX120834YY
zzz
ggg04
Line 1: where AAA is a static header 1
Line 2: Where BBB is static header 2
Line 3: where CCC is static and YY is year, MM is month and DD is date and 999 is static number - This is header 3
Line 4:
where XXX is static value.
include the record 12073
YY is picked from that record(12073) 3:2 (07)
All the remaining records in input file will use the above logic stated in Line 4
Line 8: Trailer1 must contain static value zzz
Line 9: Trailer1 must contain static value ggg and 04 is the total count |
|
Back to top |
|
|
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2455 Location: Hampshire, UK
|
|
|
|
Please use the code tags. It is a data set not a 'file'.
I believe that it can be done - what have your tried so far? |
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2010 Location: USA
|
|
|
|
This forum is not supposed for you to place YOUR OWN TASK here, expecting to get the solution of YOUR TASK from others.
This forum is supposed for you to place the results of YOUR OWN ATTEMPT to do your own job - in case the received results are somehow not what is expected. |
|
Back to top |
|
|
magesh23586
Active User
Joined: 06 Jul 2009 Posts: 213 Location: Chennai
|
|
|
|
Guru Nandu,
What is the maximum record length of your variable file.
I assumed it as 16 and developed the code UNTESTED, you may need to modify according to your requirements.
Code: |
//STEP01 EXEC PGM=SORT
//SYMNAMES DD *
HDATE,S'&LYR2.&LMON.&LDAY.'
//SORTIN DD DISP=SHR,DSN=INPUT.FILE
//SORTOUT DD DISP=(,CATLG,DELETE),
// SPACE=(CYL,(10,10),RLSE),
// DSN=OUTPUT.FILE
//SYSOUT DD SYSOUT=*
//SYSIN DD *
OPTION COPY
INREC OVERLAY=(08:5,16,
05:C'XXX',
21:10,2,
05:5,21,SQZ=(SHIFT=LEFT))
OUTFIL HEADER1=(C'AAA',/,
C'BBB',/,
C'CCC:',HDATE,C'001'),
TRAILER1=(C'ZZZ',/,
C'GGG',
COUNT=(EDIT=(TT))),
REMOVECC
|
|
|
Back to top |
|
|
sergeyken
Senior Member
Joined: 29 Apr 2008 Posts: 2010 Location: USA
|
|
|
|
//SYMNAMES DD cannot handle parameters, except exported JCL SET-variables
Without any demonstrated results produced by your own code, either correct or incorrect ones, nobody in this forum is going to do your own job instead of yourself. Period. |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3048 Location: NYC,USA
|
|
|
|
Similar post(s) are discussed before over internet, why is self research missing here? You wait till someone do the work for you and you just don't learn? |
|
Back to top |
|
|
|