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
 

 

Assmebler code for converting STRING Format into TABLE

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
ram2009
Warnings : 1

New User


Joined: 04 May 2009
Posts: 14
Location: chennai

PostPosted: Mon Feb 08, 2010 4:08 pm    Post subject: Assmebler code for converting STRING Format into TABLE
Reply with quote

PRINT NOGEN
FILEASM CSECT
STM 14,12,12(13)
BALR 12,0
USING *,12
ST 13,SAVE+4
LA 13,SAVE
OPEN (OUTDCB,(OUTPUT))
STRING DC X'03020100'
TABLE DC X'FF01AABB00'
TR STRING,TABLE
MVC 2,STRING
PUT OUTDCB,2
CLOSE OUTDCB
L 13,SAVE+4
LM 14,12,12(13)
OUTDCB DCB DSORG=PS,MACRF=(PM),DDNAME=OUTDISK, *
RECFM=FB,LRECL=80,BLKSIZE=800
SAVE DS 18F
END



This was my assmebler code for converting the STRING Format into TABLE format. I compiled the program successfully. But when i tried to run it I ended it in a s0c1 abend.
Pls guide me to sort it out..
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10254
Location: italy

PostPosted: Mon Feb 08, 2010 4:12 pm    Post subject: Reply to: s0c1 abend
Reply with quote

You should remember that execution is sequential...
the open statement generates some machine code instructions...
after that other machine code instructions are expected,
You put Your constants in the wrong place and the CPU tries to execute them
as machine instructions
Back to top
View user's profile Send private message
ram2009
Warnings : 1

New User


Joined: 04 May 2009
Posts: 14
Location: chennai

PostPosted: Mon Feb 08, 2010 5:52 pm    Post subject: Reply to: s0c1 abend
Reply with quote

even i rearrange, i get the same error...
Is there any error in the logic?
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10254
Location: italy

PostPosted: Mon Feb 08, 2010 6:00 pm    Post subject: Reply to: s0c1 abend
Reply with quote

Code:
MVC 2,STRING

review the pop for the MVC instruction format

and the listing to see what the MVC has expanded to,
a move to absolute location 2...
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Mon Feb 08, 2010 7:16 pm    Post subject: Reply to: s0c1 abend
Reply with quote

Beside Enrico's suggestion about reviewing the MVC, I think the Assembler believes that STRING is an instruction. After the OPEN Macro expansion, the logic falls right into this label. When the Assembler tries to interpret a X'03' as an OP CODE, it can't, because it doesn't exist. So, you wind up with an invalid OP CODE (IE: SOC1).

You should move your DS and DC definitions out of the execution path and place them after the the 18-WORD register-savearea, but still, the MVC syntax is way off.

Download the latest/greatest Reference Summary and save as a favorite -

http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/download/DZ9ZS004.pdf?DT=20080216193251&XKS=DZ9ZBK08

Bill
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Job failing with USER = 4093 REASON C... Pradeepa S ABENDS & Debugging 1 Wed May 17, 2017 3:35 pm
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 11 Tue May 16, 2017 2:20 pm
No new posts Fileaid Update Replace with null string descann Compuware & Other Tools 4 Mon May 15, 2017 3:00 pm
No new posts COBOL Code Parsers and Lineage Establ... balimanja COBOL Programming 2 Tue May 02, 2017 3:30 am
No new posts Cobol upgrade - source code missing f... gthmrj IBM Tools 1 Wed Apr 26, 2017 6:04 pm


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