IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

need PD data for the field with display comp-3


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ibmmainframesyntel

Active User


Joined: 26 Feb 2007
Posts: 126
Location: Chennai

PostPosted: Fri Oct 26, 2007 3:40 pm
Reply with quote

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
View user's profile Send private message
agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 691
Location: Earth

PostPosted: Fri Oct 26, 2007 3:57 pm
Reply with quote

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
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Fri Oct 26, 2007 5:40 pm
Reply with quote

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
View user's profile Send private message
Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Fri Oct 26, 2007 7:59 pm
Reply with quote

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
View user's profile Send private message
Aaru

Senior Member


Joined: 03 Jul 2007
Posts: 1287
Location: Chennai, India

PostPosted: Fri Oct 26, 2007 8:04 pm
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts How to save SYSLOG as text data via P... All Other Mainframe Topics 2
No new posts Store the data for fixed length COBOL Programming 1
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts Replace Multiple Field values to Othe... DFSORT/ICETOOL 12
No new posts SCOPE PENDING option -check data DB2 2
Search our Forums:

Back to Top