Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

need PD data for the field with display comp-3

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: need PD data for the field with display comp-3
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: 686
Location: Earth

PostPosted: Fri Oct 26, 2007 3:57 pm    Post subject:
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: 1288
Location: Chennai, India

PostPosted: Fri Oct 26, 2007 5:40 pm    Post subject: Reply to: need PD data for the field with display comp-3
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    Post subject: Re: Reply to: need PD data for the field with display comp-3
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: 1288
Location: Chennai, India

PostPosted: Fri Oct 26, 2007 8:04 pm    Post subject: Reply to: need PD data for the field with display comp-3
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Replace values in the input data Vikas Maharnawar DFSORT/ICETOOL 10 Thu May 11, 2017 2:18 pm
No new posts READ A PACKED "NEGATIVE" FI... jdesouza CA Products 3 Tue May 02, 2017 11:43 pm
No new posts Group Data based on a key Arun Raj DFSORT/ICETOOL 7 Thu Apr 27, 2017 11:29 pm
No new posts Alter &DATENS field in HEADER1 Angad DFSORT/ICETOOL 4 Mon Apr 24, 2017 11:49 am
No new posts unload data from table with lob columns farhad_evan DB2 0 Sat Apr 22, 2017 1:32 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us