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

Equivalent command of UNSTRING in PL1


IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
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
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: 792
Location: Chennai, India

PostPosted: Fri Feb 20, 2009 9:44 am
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
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

Moderator Emeritus


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

PostPosted: Fri Feb 20, 2009 10:19 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> PL/I & Assembler

 


Similar Topics
Topic Forum Replies
No new posts RACF - Rebuild SETROPTS command which... All Other Mainframe Topics 3
No new posts Routing command Address SDSF to other... TSO/ISPF 2
No new posts DTL - how to define key with stacked ... TSO/ISPF 3
No new posts LTJ command CA Products 4
No new posts Query on edit primary command CLIST & REXX 5
Search our Forums:

Back to Top