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
 

 

String and Unstring

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe Interview Questions
View previous topic :: :: View next topic  
Author Message
fawzy47
Currently Banned

New User


Joined: 22 Oct 2005
Posts: 42

PostPosted: Tue Feb 21, 2006 4:25 am    Post subject: String and Unstring
Reply with quote

I have some difficulty understanding how string and unstring works,
if someone can provides some examples that would be great
Thank you
Back to top
View user's profile Send private message

fawzy47
Currently Banned

New User


Joined: 22 Oct 2005
Posts: 42

PostPosted: Tue Feb 21, 2006 4:27 am    Post subject: Dynamic transaction backout
Reply with quote

what parameters you need to specify and in which CICS tables you need to add those entries
Thank you
Fawzy
Back to top
View user's profile Send private message
smiley
Warnings : 1

New User


Joined: 08 Feb 2006
Posts: 27

PostPosted: Tue Feb 21, 2006 10:21 am    Post subject:
Reply with quote

Quote:
I have some difficulty understanding how string and unstring works,if someone can provides some examples that would be great



A STRING statement may be used to combine several fields to one field.

eg:-
Code:

05   NAME.
10  LAST-NAME     PIC X(10) VALUE ?EDISON?.
10  FIRST-NAME     PIC X(10) VALUE ?THOMAS?.
10  MIDDLE-NAME    PIC X(10) VALUE ?ALVA?.
01   NAME-OUT      PIC X(33).

   STRING
      FIRST-NAME DELIMITED BY ? ?
      ? ? DELIMITED BY SIZE
      MIDDLE-NAME DELIMITED BY ? ?
      ? ? DELIMITED BY SIZE
      LAST-NAME DELIMITED BY ? ?
      ? ? DELIMITED BY SIZE
      INTO NAME-OUT.


Output

Code:

   
   NAME-OUT = THOMAS ALVA EDISON


UNSTRING:

The UNSTRING statement may be used to convert keyed data to a more
compact form for storing it on disk.

Code:
MOVE ?THOMAS,ALVA,EDISON? TO NAME-OUT.
UNSTRING NAME-OUT
   DELIMITED BY ?,?
   INTO FIRST-NAME
      MIDDLE-NAME
      LAST-NAME.


OUTPUT:

Code:


FIRST-NAME = THOMAS
MIDDLE-NAME = ALVA
LAST-NAME = EDISON
Back to top
View user's profile Send private message
fawzy47
Currently Banned

New User


Joined: 22 Oct 2005
Posts: 42

PostPosted: Tue Feb 21, 2006 10:35 am    Post subject:
Reply with quote

Thank you
That was helpful
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 -> Mainframe Interview Questions All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Checking wether a string starts from ... sundaram.naveen CLIST & REXX 9 Thu Oct 06, 2016 11:56 am
No new posts Random Password (in string format) ge... ezhavendhan COBOL Programming 10 Mon Aug 29, 2016 3:18 pm
No new posts How to insert a lengthy string havin... vidyaa DB2 7 Thu Aug 25, 2016 5:20 pm
No new posts Which function does the Ampersand (&a... Andi1982 PL/I & Assembler 3 Wed Aug 24, 2016 2:05 pm
No new posts Need a help how to replace a string i... gurunath82 CLIST & REXX 12 Tue Jul 26, 2016 11:43 pm


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