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

STRING function for COMP-3 fields


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

New User


Joined: 29 Aug 2008
Posts: 8
Location: bhubaneswar

PostPosted: Sat Aug 30, 2008 9:30 pm
Reply with quote

I have three fields,and i want to apply STRING function.But the problem is one of the field is defined datatype as COMP-3. Is it possible to apply STRING function to those fields.
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2146
Location: At my coffee table

PostPosted: Sat Aug 30, 2008 9:49 pm
Reply with quote

When a sending field or any of the delimiters is an elementary numeric item, each numeric item must be described as an integer and its PICTURE character-string must not contain the symbol P.
Looks kind of like you can, but I think as a group, you will not be able to delimit on digits, only full bytes.......
Back to top
View user's profile Send private message
Craq Giegerich

Senior Member


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

PostPosted: Sat Aug 30, 2008 10:13 pm
Reply with quote

CICS Guy wrote:
each numeric item must be described as an integer and its PICTURE character-string must not contain the symbol P.


??
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: Sat Aug 30, 2008 10:28 pm
Reply with quote

publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/handheld/Connected/BOOKS/igy3lr10/6.2.37?

publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/handheld/Connected/BOOKS/igy3lr10/5.3.11.1?
Back to top
View user's profile Send private message
NB Gautam

New User


Joined: 29 Aug 2008
Posts: 8
Location: bhubaneswar

PostPosted: Thu Sep 04, 2008 4:37 pm
Reply with quote

The exact situation is like
There are 3 variables defined as:

77 ws-var1 pic 9(3).
77 ws-var2 pic s9(11) COMP-3.
77 ws-var3 pic x(12).

procedure division.

Move 23 to ws-var1.
Move 34 to ws-var2.
Move 'GAUTAM' to ws-var3.

Now i want to implement STRING function. Is it possible? If yes, please provide me syntax for that.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Thu Sep 04, 2008 5:22 pm
Reply with quote

Have you tried to do the STRING yourself, using the manual as a guide? If not, please do so and then report any problem(s) you encounter.
Back to top
View user's profile Send private message
mmwife

Super Moderator


Joined: 30 May 2003
Posts: 1592

PostPosted: Fri Sep 05, 2008 9:14 pm
Reply with quote

What do you want the result of the STRING to look like?
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 Replace each space in cobol string wi... COBOL Programming 2
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts Calling an Open C library function in... CICS 1
No new posts DATE2 function SYNCSORT 15
Search our Forums:

Back to Top