Difference between PICIN and PICOUT



Support for CICS/ESA, CICS/TS & Transaction Gateway, CICS Configuration Manager and CICS Performance Analyzer

Difference between PICIN and PICOUT

Postby ankita awasthi » Mon Apr 18, 2011 7:20 pm

Hi,
Both PICIN and PICOUT contain same value (Picture clause of the field variable) then what is the difference in those?
ankita awasthi
 
Posts: 3
Joined: Mon Apr 18, 2011 7:14 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Difference between PICIN and PICOUT

Postby Robert Sample » Mon Apr 18, 2011 7:48 pm

PICIN and PICOUT do not have to be the same. One applies to the data field being input and one applies to the data field being output.
Robert Sample
Global moderator
 
Posts: 3719
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: Difference between PICIN and PICOUT

Postby mongan » Tue Apr 19, 2011 11:34 am

For example your picout may be a formatted field like zz.zz9,99-.
User avatar
mongan
 
Posts: 211
Joined: Tue Jan 11, 2011 8:32 pm
Has thanked: 1 time
Been thanked: 5 times

Re: Difference between PICIN and PICOUT

Postby ankita awasthi » Wed Apr 20, 2011 9:00 pm

Thanks for your reply but can you please explain it with example?
ankita awasthi
 
Posts: 3
Joined: Mon Apr 18, 2011 7:14 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Difference between PICIN and PICOUT

Postby NicC » Wed Apr 20, 2011 9:09 pm

MOVE PICIN TO WS-SOMETHING
MOVE WS-SOMETHING-ELSE TO PICOUT

What else? Or explain yourself more clearly.
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: Difference between PICIN and PICOUT

Postby Robert Sample » Wed Apr 20, 2011 9:19 pm

A COBOL example:
PICOUT='Z,ZZ9.99',PICIN='X(08)'
You've got a field that has two decimal places and 4 digits before the decimal. When your program puts the data into the map, it'll be right justified with a decimal point and comma. When you read that field back, the user may have the data left justified with no comma -- so if you read it as 'Z,ZZ9.99' you're going to get an abend code in CICS. You'll take the PICIN variable and convert the value to a number (either yourself or through a function or CICS call).
Robert Sample
Global moderator
 
Posts: 3719
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: Difference between PICIN and PICOUT

Postby Suny » Thu Apr 21, 2011 6:38 pm

Whats the significance of PIC Z,ZZ9.99 ? The comma here has no significance except the display element. so if you move on a variable with 9(4)V99 to this variable , Lets suppose you move 1234.56 to PIC Z,ZZ9.99, it would be displayed as 1,234.99.

Now your PIC in is X(08). So the program will accept this a PIC X(08) only whatever you put in it. You cannot move PICIN to PICOUT directly since the format does not support. therefore you need to do some data manipulation in your program. Of course if you do nothing with the data, and MDT is on so that program receives the data and then send the data back, it will abend if you have a comma as input in x(08).
Suny
 
Posts: 8
Joined: Thu Apr 21, 2011 3:57 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Difference between PICIN and PICOUT

Postby ankita awasthi » Sat Apr 23, 2011 3:14 pm

Hey thnx to all now it is very much clear:)
ankita awasthi
 
Posts: 3
Joined: Mon Apr 18, 2011 7:14 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Difference between PICIN and PICOUT

Postby Robert Sample » Sat Apr 23, 2011 6:30 pm

Suny, I think it would behoove you to learn something about CICS before posting in a CICS forum.

You never need to move PICIN to PICOUT -- or PICOUT to PICIN -- since they are the same field and occupy the same bytes of memory. If you are writing CICS programs that do things like this, you completely wasted whatever money you spent to learn CICS.

Stating a program will abend due to a comma in a PIC X variable indicates you know nothing about COBOL, either. A PIC X variable can contain numeric, alphabetic, special character, and even non-printing characters -- any of the possible 256 EBCDIC bytes can be placed in a PIC X variable. A CICS program will not abend just because a comma is in a PIC X(08) variable.

Also, research BIF DEEDIT in a CICS Application Programming Reference manual or NUMVAL in a COBOL Language Reference manual. Both of these can be used to process the PICIN X(08) variable -- or reference modification could be used, not to mention an array to handle each byte seperately.

And I explicitly stated processing of the PICIN variable would be needed. The original question was when would different PICIN and PICOUT be used and I gave an example. The original question did not mention MDT so your adding it the equation changes the original question to something different.
Robert Sample
Global moderator
 
Posts: 3719
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: Difference between PICIN and PICOUT

Postby Suny » Sat Apr 23, 2011 11:53 pm

Hi,
i know that PICIN and PICOUT would be the same memory (variable) in the symbolic map. What I was trying to explain is if your field is defined as alphnumeric and numeric-edited both (in this case as well as redefines), it will throw out error if try inserting some characecter not supported by numeric and then read it using numeric field (as in your example of PICIN and PICOUT). You only need to make them compatible in your program.

and thanks for pointing out some info.. i will surely go thru them :)
Suny
 
Posts: 8
Joined: Thu Apr 21, 2011 3:57 pm
Has thanked: 0 time
Been thanked: 0 time

Next

Return to CICS

 


  • Related topics
    Replies
    Views
    Last post