View previous topic :: View next topic
|
Author |
Message |
Thabi
New User
Joined: 20 Jun 2008 Posts: 3 Location: Sandton,South Africa
|
|
|
|
Hi,
I am trying to add a trailer record that has the first 7 characters as high values and the next 8 characters as a count of records in the file and the last character as anything.
I have tried using the following but it brings up an error:
//SYSIN DD *
OPTION COPY
OUTFIL REMOVECC,
OMIT=(1,2,ZD,EQ,99),
BUILD=(1,16),
TRAILER1=(X'FFFFFFF',COUNT-1=(TO=ZD,LENGTH=9))
/*
My output file trailer record needs to look like this:
00000167N
FFFFFFFFFFFFFFFD
FFFFFFF000001675
Thanks in advance. |
|
Back to top |
|
|
Garry Carroll
Senior Member
Joined: 08 May 2006 Posts: 1193 Location: Dublin, Ireland
|
|
|
|
Quote: |
the first 7 characters as high values and the next 8 characters as a count of records |
The first issue is that you have coded for 3.5 bytes. To set high-values in 7 bytes you need X'FFFFFFFFFFFFFF' - 2 Fs for each byte. You then have LENGTH=9 for your eight-byte count field.
For readability you should show your job as "code".
Regards,
Garry |
|
Back to top |
|
|
Thabi
New User
Joined: 20 Jun 2008 Posts: 3 Location: Sandton,South Africa
|
|
|
|
Hi Gary,
Thank you so much, I changed the X'FFFFFFF' TO X'FFFFFFFFFFFFFF' and it worked fine, I have changed LENGTH to 8 but Im not sure if I should mention anything about the last character. With regards to showing my job as code,Im not sure I quite understand.
Again thanks. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Code: |
If you click the code button your typing gets put into VB code state,ents like this |
And when you click the code button again, you return to normal text. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
In addition to what Expat said, you can also highlight a block of text/code and click on the "Code" tag and the highlighted text will be "Code"ed.
Also, and quite helpful, you can Preview your post and see what it will look like to the forum before actually posting - the forum appears quite different than the Reply Editor.
When you are satisfied with the way your post will appear, then click Submit - do not forget to do this - if Submit is not clicked, the post is discarded |
|
Back to top |
|
|
Thabi
New User
Joined: 20 Jun 2008 Posts: 3 Location: Sandton,South Africa
|
|
|
|
Thanks so much, will do so next time I post something. |
|
Back to top |
|
|
|