I have to introduce one DFSORT step in my production JCL, which reads the counter file from the latest GDG and writes to +1 of the same GDG after adding +1with the counter file ...
Ex:
My input file has just one line as below:
Code:
20081006_____000005000*counter
Output file:
Code:
20081006_____000005001*counter
counter file starts from the 17theh position . record format is VB of length 80.
I have tried your solution, but what i got in the output as shown below, instead of getting 4508 , i got 450I . i tried with input 4508, that time i got 450H. Please let me know , whats wrong with this?
input :
Your solution is adding the counter perfectly. But i am loosing the rest of fields after the counter and i am getting low-values in that, instead of spaces. Please let me know, how to correct it?
Why i made changes to this is till 49 position i have some values. I can able to retain the values till that position. But after that i am getting LOW-VALUES , which i don't want. (from 50th to 80)
output:
Code:
----+----1----+----2----+----3----+----4----+----5----+----6----+----7--
2008100702071006000004508*0000COUNTER in sequence............................
Please help me in removing the low values?
Also, as i told early , i have tried frank's solution but i am getting characters in the last field. (ex 450I or 450H )
also, as i told early , i have tried frank's solution but i am getting characters in the last field. (ex 450I or 450H )
usually people having issues with Frank' solution have not described properly their problem
You should review Your understanding of zoned number representation ...
the 450i and 450h are the signed zoned decimal representation
with a proper high nibble sign c/f for positive d for negative
c being the preferred nibble as in this case
Code:
450i = "f4f5f0c9"x which means a positive 4509
450h = "f4f5f0c8"x which means a positive 4508
so after all what You see are not chars in se but the representation of a signed digit
As you suggested, i have changed that to 81. this time the job went fine
Good to know that you have come out of SOC7
Quote:
but still i am getting the low-values from 50 to 80th position.
That is because you are only writing 49 char in output. You have to write all 80 chars.
as below
INREC OVERLAY=(1,49,81:C'01')
OUTREC FIELDS=(1,16,(17,9,ZD,ADD,81,02,ZD),EDIT=(TTTTTTTTT),26,55)
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
Guru,
Did you notice that Frank's solution did not pad the input file at the end whereas Sambaji's solution did. Padding at the end should NOT be done for VB files. By doing so one's just ignoring the very purpose of using a VB file.
Joined: 17 Oct 2006 Posts: 2481 Location: @my desk
Guru Prasath wrote:
Hi,
I caught with this case in production..
.............................
.............................
counter file starts from the 17theh position . record format is VB of length 80.
Thanks,
Guru.
This is what your initial post says. This topic has grown to the next page and you never mentioned your requirement got changed !!!. I believe these are some of the critical info. that you should mention clearly.