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
 

 

DIsplay comp-3 variable

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: DIsplay comp-3 variable
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    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Mon Dec 20, 2010 10:36 am    Post subject:
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    Post subject:
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

Site Director


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

PostPosted: Mon Dec 20, 2010 10:53 am    Post subject:
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    Post subject: Re: DIsplay comp-3 variable
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

Site Director


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

PostPosted: Mon Dec 20, 2010 9:05 pm    Post subject: Reply to: DIsplay comp-3 variable
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    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 Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm
No new posts Getting error while opening a variabl... apandey1 COBOL Programming 5 Fri May 05, 2017 12:22 pm
No new posts Count the length of the record & ... sreekusr DFSORT/ICETOOL 4 Thu Mar 23, 2017 7:52 pm
No new posts Display FTP Session Count within TSO Yolanda Harvey TSO/ISPF 3 Fri Mar 10, 2017 10:31 pm
No new posts To display values of multiple rows in... vinu78 DB2 2 Thu Mar 09, 2017 1:20 pm


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