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

DIsplay comp-3 variable


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Amit tandon
Warnings : 1

New User


Joined: 29 Jul 2010
Posts: 6
Location: mumbai

PostPosted: Mon Dec 20, 2010 10:10 am
Reply with quote

I hav

01-APPLICATION-DATE.
10 -APPLICATION-YEAR PICTURE S9(3)
COMPUTATIONAL-3.
10 -APPLICATION-DAY PICTURE S9(3)
COMPUTATIONAL-3.

I want to these variable in to my working storage and how to display what is year?

plz help me out from these ASAP
Back to top
View user's profile Send private message
sriram.mukundan

New User


Joined: 20 Nov 2007
Posts: 28
Location: chennai

PostPosted: Mon Dec 20, 2010 10:19 am
Reply with quote

Hi Amit,

Welcome to the forum.

Refer the below example.

05 WK-1 PIC S9(05)V9(02) COMP-3.

05 WK-2 PIC 9(6)V99.

MOVE WK-1 TO WK-2.

Will does your job. put a display for Wk-2.
Back to top
View user's profile Send private message
Amit tandon
Warnings : 1

New User


Joined: 29 Jul 2010
Posts: 6
Location: mumbai

PostPosted: Mon Dec 20, 2010 10:24 am
Reply with quote

Thanks... Buddy,

But here i want to display only year and it will give me date and year value combine.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Dec 20, 2010 10:36 am
Reply with quote

Hello and welcome to the forum,

Quote:
plz help me out from these ASAP
If you believe you need ASAP, the forum is the wrong place to look - we don't do asap. . .

We also do not respond well to "requirements" that are not clearly posted. You know what you are talking about, but few others will. You need to provide sufficient information for somone to be able to provide a useful reply.

Quote:
I want to these variable in to my working storage
What does this mean . . . ?

If you clearly show what you "have" and what you want to accomplish, someone will have a suggestion.
Back to top
View user's profile Send private message
Amit tandon
Warnings : 1

New User


Joined: 29 Jul 2010
Posts: 6
Location: mumbai

PostPosted: Mon Dec 20, 2010 10:41 am
Reply with quote

Thanks,

Actually this is copybook varibale.And i need these into my PS file.
With year i need to perform some operation. so before performing any operation i need to display wether i m getting right year(Ex 2010) or not.

is it sufficeint or ned more infomation on that.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Dec 20, 2010 10:53 am
Reply with quote

Hello,

If the variables posted are correct, all you need to do is compare the value in the year variable against the "year" (Ex 2010) and do "whatever" acordingly.

If you are looking for more of an answer, you need to provide more of an explanation. . .
Back to top
View user's profile Send private message
Kjeld

Active User


Joined: 15 Dec 2009
Posts: 365
Location: Denmark

PostPosted: Mon Dec 20, 2010 3:01 pm
Reply with quote

Amit tandon wrote:
I hav

01-APPLICATION-DATE.
10 -APPLICATION-YEAR PICTURE S9(3)
COMPUTATIONAL-3.
10 -APPLICATION-DAY PICTURE S9(3)
COMPUTATIONAL-3.

I want to these variable in to my working storage and how to display what is year?

plz help me out from these ASAP

If your structure has defined only 2 bytes (3 packed decimal digits) for year value, you cannot expect to get 4 digits into it, as the value 2010.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Mon Dec 20, 2010 9:05 pm
Reply with quote

Hi Kjeld,

Yup, as posted it is a mystery. . .

I wasn't sure how 2010 was to be compared against 3 digits, but if that was the example, i was willing to "go with it . . ." icon_confused.gif

Maybe there will be some clarification posted. . .

d
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 Extracting Variable decimal numbers f... DFSORT/ICETOOL 17
No new posts Variable Output file name DFSORT/ICETOOL 8
No new posts COBOL - Move S9(11)v9(7) COMP-3 to -(... COBOL Programming 5
No new posts Moving Or setting POINTER to another ... COBOL Programming 2
No new posts parsing variable length/position data... DFSORT/ICETOOL 5
Search our Forums:

Back to Top