View previous topic :: View next topic
|
Author |
Message |
jeyaseelan347 Warnings : 1 New User
Joined: 05 Sep 2008 Posts: 37 Location: Chennai
|
|
|
|
I am creating a file in second step . In that file I need to put '00000000' in position 9,8 in next step. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
You need to better describe your request.
Post some input and the output you want to be created when that input is processed.
Mention the recfm and lrecl of both files. |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
Jeya,
Quote: |
In that file I need to put '00000000' in position 9,8 in next step. |
After the second step, add a SORT step to OVERLAY the data from col 9 of length 8.
As suggested, post few more details of the file. Is that a VB or FB? What actually are you doing with that file in the 3rd step? |
|
Back to top |
|
|
jeyaseelan347 Warnings : 1 New User
Joined: 05 Sep 2008 Posts: 37 Location: Chennai
|
|
|
|
Hi,
I am creating one new file. I need to add below record to that file,
' 00000000 '
The LRECL is 24 and recfm is VB. I will read the file in the next step which will execute a application program.
I need to avoid 'file is empty' error that's the reason I need to a record.
Thanks, |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Chennai,
Here's a DFSORT job that will do what I think you asked for. You said you wanted the constant in position 9, but I assumed you were not counting the RDW, so it would really be position 13. (If you were counting the RDW, then change 9: to 5:).
Code: |
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file (VB/24)
//SORTOUT DD DSN=... output file (VB/24)
//SYSIN DD *
OPTION COPY
OUTFIL REMOVECC,
TRAILER1=(9:C'00000000')
/*
|
|
|
Back to top |
|
|
jeyaseelan347 Warnings : 1 New User
Joined: 05 Sep 2008 Posts: 37 Location: Chennai
|
|
|
|
Thanks Frank.
This is working fine. But both my input file and output file are same. So is there any way to use Dummy file in SORTIN and use this file in sortout?
I tried the same but i am getting below error
ICE043A 3 INVALID DATA SET ATTRIBUTES SPECIFIED SORTIN RECFM
I suppose, I am getting this because of no DCB attributes in Dummy file. Is there any way to fix it up? |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
I don't understand. You say the input file and output file are the same, but then you ask if you can use a DUMMY file for SORTIN. That makes no sense. What does your input file look like? What do you want the output file to look like? Using the same file for input and output is NOT a good idea. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hi Frank,
I believe the requirement is to generate a single-record output file with the zeros as the only record. . . |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
I believe the requirement is to generate a single-record output file with the zeros as the only record. . . |
Well, if there's no input file, and we just have to generate an output file containing one record with zeros, this would do it:
Code: |
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DUMMY,RECFM=VB,LRECL=24,BLKSIZE=28
//SORTOUT DD DSN=... output file (VB/24)
//SYSIN DD *
OPTION COPY
OUTFIL REMOVECC,
TRAILER1=(9:C'00000000')
|
|
|
Back to top |
|
|
jeyaseelan347 Warnings : 1 New User
Joined: 05 Sep 2008 Posts: 37 Location: Chennai
|
|
|
|
Thanks Frank |
|
Back to top |
|
|
|