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
 

 

Equivalent command of UNSTRING in PL1

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> PL/I & Assembler
View previous topic :: :: View next topic  
Author Message
nehrujee

New User


Joined: 25 Oct 2007
Posts: 8
Location: Kolkata

PostPosted: Fri Feb 20, 2009 3:54 am    Post subject: Equivalent command of UNSTRING in PL1
Reply with quote

Hi,

I need to convert cobol program to PL1 program.

Can anyone help me what will be pl1 equivalent for below code snippet.

unstring Input_var delimited by ' ' or '/'
into var1, var2, var3, var4, var5
on overflow go exit-pgm

exit-pgm:
Exit

Thanks in advance.

Regards
Nehru
Back to top
View user's profile Send private message

Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 785
Location: Chennai, India

PostPosted: Fri Feb 20, 2009 9:44 am    Post subject:
Reply with quote

Please look at String Handling Functions like SUBSTR, INDEX, etc
Back to top
View user's profile Send private message
donateeye
Warnings : 2

New User


Joined: 01 Jun 2007
Posts: 62
Location: chennai

PostPosted: Fri Feb 20, 2009 3:54 pm    Post subject: Reply to: Equivalent command of UNSTRING in PL1
Reply with quote

You cannot unstring it as in COBOL,
You got to use the builtin functions INDEX, SUBSTR and use some logic to load it into those variables.
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: Fri Feb 20, 2009 10:19 pm    Post subject:
Reply with quote

Hello,

Depending on how complex the various unstring requirements of the system, you might consider creating a common "unstring" subroutine that is called from various pl/i code that needs to unstring delimited data.

This may be preferable to including the complete code to parse out the values in each place it is needed in pl/i. The called routine might even be coded in cobol. . . Once a cobol version was working as needed, consideration could be given to converting this called routine to pl/i.
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 -> PL/I & Assembler All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 7 Fri Nov 18, 2016 1:48 pm
No new posts SDSF Command Avtrix CLIST & REXX 4 Fri Sep 30, 2016 11:13 am
No new posts How to find a CICS resource used in C... Arunkumar Chandrasekaran CICS 8 Thu Sep 29, 2016 1:45 pm
No new posts COMPARE command sivatechdrive TSO/ISPF 7 Fri Sep 16, 2016 4:31 pm
No new posts I am unable to use SWAPBAR ON command... mrsidhu12 TSO/ISPF 3 Thu Sep 01, 2016 1:10 pm


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