Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 788
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 MQ command in option 6 of ISPF! Vignesh Sid All Other Mainframe Topics 3 Tue Sep 26, 2017 6:01 pm
No new posts How to change a string containing the... chong.zhou TSO/ISPF 6 Tue Aug 29, 2017 4:54 pm
No new posts Failure after DIR command Hank Watson All Other Mainframe Topics 2 Tue Aug 29, 2017 3:14 am
No new posts Command to find TMEMBER name for a TPIPE Siva NKK Kothamasu IMS DB/DC 0 Wed Aug 16, 2017 6:08 pm
This topic is locked: you cannot edit posts or make replies. rexx to create a tso command Bharath Vikraman CLIST & REXX 1 Tue Aug 08, 2017 3:32 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us