View previous topic :: View next topic
|
Author |
Message |
ibmmainframesyntel
Active User
Joined: 26 Feb 2007 Posts: 126 Location: Chennai
|
|
|
|
Hi,
Iam having a input file with structure
Code: |
01 T-CUR-DAY-RCD.
05 FILLER PIC X(04).
05 T-CUR-DATE PIC 9(06) COMP-3.
05 T-JLN-DAY PIC S9(03) COMP-3.
05 FILLER PIC X(09).
05 T-CYCL PIC 9(05) COMP-3.
05 FILLER PIC X(46).
05 T-ABSENDEGRUPPE PIC 9(02).
05 FILLER PIC X(05).
05 T-PROC-CTR PIC X(01).
05 FILLER PIC X(09).
05 T-REPT-DATE PIC X(08).
05 FILLER PIC X(02).
05 T-ABRG-MONAT-YYYYMM PIC X(06). |
In the above structure,
I have to give a data in the variable with display comp-3.
how to give the corresponding PD data in the input file.
Example:i need a PD data for the date 20070115 in T-CUR-DATE position
Thanks |
|
Back to top |
|
|
agkshirsagar
Active Member
Joined: 27 Feb 2007 Posts: 691 Location: Earth
|
|
|
|
I guess you are trying to create data/file manually for your use.
You can code a separate program with the same record strucure and write it to a file after moving desired values.
Or use FILEAID edit option to add records in file.
Or
Manually change the file by opening it in edit mode-
HEX ON
and last nibble is sign for comp-3 so give F there as your number is unsigned.
then follow 2 digits in 1 byte-
ex:
Code: |
,----+----1----+----2
,********************
, ,,¬
,44444444444444135444
,0000000000000024F000 |
from column 15 starts number 12345 in COMP-3 format.
Please let us know which of these works out for you. |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
The field is defined as 9(06) COMP-3.
Code: |
05 T-CUR-DATE PIC 9(06) COMP-3 |
As this is comp-3, the total no of bytes occupied is 4 bytes. So is it possible to move 20070115 into this field without trucncation?
Please advise as am not sure. |
|
Back to top |
|
|
Craq Giegerich
Senior Member
Joined: 19 May 2007 Posts: 1512 Location: Virginia, USA
|
|
|
|
Aaru wrote: |
The field is defined as 9(06) COMP-3.
Code: |
05 T-CUR-DATE PIC 9(06) COMP-3 |
As this is comp-3, the total no of bytes occupied is 4 bytes. So is it possible to move 20070115 into this field without trucncation?
Please advise as am not sure. |
NO you can not move an 8 digit number to a 6 digit number without truncation. If it really is 9(6) then the date may be YYMMDD 070115. |
|
Back to top |
|
|
Aaru
Senior Member
Joined: 03 Jul 2007 Posts: 1287 Location: Chennai, India
|
|
|
|
Craq,
Thanks.
ibmmainframesyntel,
Please check whether the field is 9(8) as declaring it as 9(6) comp-3 would lead to truncation. |
|
Back to top |
|
|
|