|
|
| Author |
Message |
rguhanath
New User
Joined: 16 Oct 2006 Posts: 45 Location: chennai
|
|
|
|
Hi All,
i have one more problem.
i have input file like...
(record max length is 450, fileds are seperated by '|' symbol,
First field Max length is 8
then '|'
second field Max length is 7
then '|'
third field Max length is 7
then '|'.... like...
RECFM=VB)
| Code: |
1-----------------------------------300---------------------450
AAAAAAA|761|9999|200805|.............
AAAAAAA|463|99990|200805|............
AAAAAAA|1104|1|200805|...............
BBBBBBB|1104|10|200805|..............
AAAAAAA|1104|100|200805|.............
AAAAAAA|110|1000|200805|.............
AAAAAAA|1|1001|200805|...............
|
i want output file like below (here 'S' is spaces,RECFM=VB,and length of rec is same as input file)
i want First field length 8
after no '|'
second field length 7
after no '|'
third field length is 7
then '|'.... like...
| Code: |
AAAAAAAS761SSSS9999SSS|200805|......
AAAAAAAS463SSSS99990SS|200805|......
AAAAAAAS1104SSS1SSSSSS|200805|.......
BBBBBBBS1104SSS10SSSSS|200805|........
AAAAAAAS1104SSS100SSSS|200805|......
AAAAAAAS110SSSS1000SSS|200805|.....
AAAAAAAS1SSSSSS1001SSS|200805|...
|
Please let me know the way of the writing jcl to get required output file. please help me.
Thanks and Regards,
Nath R |
|
| Back to top |
|
 |
References
|
Posted: Fri May 16, 2008 2:32 pm Post subject: Re: Formating the file using DFSORT |
 |
|
|
 |
rguhanath
New User
Joined: 16 Oct 2006 Posts: 45 Location: chennai
|
|
|
|
Hi All,
little change in my requirement... sorry for inconvi.
i want the output file like below
| Code: |
AAAAAAAS00007610009999|200805|......
AAAAAAAS00004630099990|200805|......
AAAAAAAS00011040000001|200805|.......
BBBBBBBS00011040000010|200805|........
AAAAAAAS00011040000100|200805|......
AAAAAAAS00001100001000|200805|.....
AAAAAAAS00000010001001|200805|...
|
(Here 'S' is the spaces for first field and remaining two fileds are leading with zeros)
Thanks and regards,
Nath R |
|
| Back to top |
|
 |
rguhanath
New User
Joined: 16 Oct 2006 Posts: 45 Location: chennai
|
|
|
|
Hi All,
i got the solution for this... below is the code...
| Code: |
//STEP EXEC PGM=ICEMAN
//*
//SYSOUT DD SYSOUT=*
//*
//SORTIN DD DSN=AA.BB.CC,
// DISP=SHR
//*
//SORTOUT DD DSN=A.B.C,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,SPACE=(TRK,(100,200),RLSE),
// DCB=(RECFM=VB,LRECL=454,BLKSIZE=0)
//*
//SYSIN DD *
OPTION COPY
INREC PARSE=(%00=(ENDBEFR=C'|',FIXLEN=8),
%01=(ENDBEFR=C'|',FIXLEN=7),
%02=(ENDBEFR=C'|',FIXLEN=7)
%03=(FIXLEN=428),
BUILD=(1,4,5:%00,13:%01,UFF,EDIT=(TTTTTTT),
20:%02,UFF,EDIT=(TTTTTTT),27:%03)
//*
|
In "BUILD=(1,4" posion is reserved for VB file because of we need to copy the fixed parsed fields after the 4-byte RDW rather than at the end of the records. so thats why i declared the LRECL as 454. but if you are look at the output file the record length is 450 only.
I hope this will work... for mine its working fine.
Thanks and regards,
Nath R. |
|
| Back to top |
|
 |
Frank Yaeger
DFSORT Moderator
Joined: 15 Feb 2005 Posts: 4236 Location: San Jose, CA
|
|
|
|
I'm glad you figured this out yourself.
Not sure why you thought you needed LRECL=454 for the output file instead of LRECL=450. Since the input file is RECFM=VB, it includes the RDW in the LRECL of 450 as would the output file. |
|
| Back to top |
|
 |
rguhanath
New User
Joined: 16 Oct 2006 Posts: 45 Location: chennai
|
|
|
|
Thanks Frank,
i didnt try with LRECL=450. what i thought is that we need to reserve 4 bytes for VB format. so thats why i put 454.
Thanks and Regards,
Nath R |
|
| Back to top |
|
 |
|
|
|