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

Parsing a line for commas using assembly language


IBM Mainframe Forums -> PL/I & Assembler
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rashmi123

New User


Joined: 04 Jun 2007
Posts: 25
Location: Pune

PostPosted: Sat Feb 14, 2009 12:54 am
Reply with quote

Hi,

Is it possible to parse a line, 80 bytes in length, for commas using assembly language?
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 Feb 14, 2009 1:07 am
Reply with quote

YES
Back to top
View user's profile Send private message
rashmi123

New User


Joined: 04 Jun 2007
Posts: 25
Location: Pune

PostPosted: Sat Feb 14, 2009 1:16 am
Reply with quote

Can you pls eleborate how that can be done?
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 Feb 14, 2009 1:44 am
Reply with quote

Hello,

One oversimplified way (via pseudo code):

Code:

point to the first byte - load the address into a register
loop:
  is the current byte a comma?
     yes - do whatever you want when you find a comma
     no  - increment the value in the register and check for end
endloop
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 Write line by line from two files DFSORT/ICETOOL 7
No new posts Reading dataset in Python - New Line ... All Other Mainframe Topics 22
No new posts Parsing Large JSON file using COBOL COBOL Programming 4
No new posts rewrite same SAY line CLIST & REXX 8
No new posts parsing variable length/position data... DFSORT/ICETOOL 5
Search our Forums:

Back to Top