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

How to write online programs in Assembler?


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

New User


Joined: 18 Mar 2005
Posts: 48
Location: india

PostPosted: Tue Sep 12, 2006 11:25 am
Reply with quote

Hi,

How to write online programs in Assembler ? -- I am using CICS as my online system. Now I want to write a program using CICS in assembler. So, Can any one help me on how to establish addressbility to CICS region in Assembler.

Thanks in advance.

REgards,
Gokuldass
Back to top
View user's profile Send private message
parikshit123

Active User


Joined: 01 Jul 2005
Posts: 269
Location: India

PostPosted: Tue Sep 12, 2006 4:44 pm
Reply with quote

Hi,

I don't think you need to do anything special. CICS command level is same for every language it support. All you have to do is to ASSEMBLE your code in stead of compile and link.icon_smile.gif
Back to top
View user's profile Send private message
ap_mainframes

Active User


Joined: 29 Dec 2005
Posts: 181
Location: Canada

PostPosted: Tue Sep 12, 2006 4:54 pm
Reply with quote

Yes, You dont need to do anything special for using CICS in Assembler.
Back to top
View user's profile Send private message
gokuldass

New User


Joined: 18 Mar 2005
Posts: 48
Location: india

PostPosted: Wed Sep 13, 2006 11:28 am
Reply with quote

Hi Guys,

I need to know how to use commarea, eibblock in assembler program to do programming with CICS. Also, which is the utility that I need to use to run the JCL.

regards,
Gokuldass
Back to top
View user's profile Send private message
ap_mainframes

Active User


Joined: 29 Dec 2005
Posts: 181
Location: Canada

PostPosted: Wed Sep 13, 2006 12:25 pm
Reply with quote

well here is a syntax of CICS used in assembler

EXEC CICS LINK PROGRAM('XXXX') COMMAREA(AAAA) X
LENGTH(4090)

And the JCL remains the same as COBOL.
Back to top
View user's profile Send private message
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 771
Location: Germany

PostPosted: Wed Sep 13, 2006 2:00 pm
Reply with quote

Hi !

First of all, there is no JCL needed. CICS-Pgms are started as Tasks within a CICS-Region. Therefore they have to be defined in several CICS-Tables.

Second, you can use all AssInstructions in normal way.

Third, to communicate with CICS-Services you have to use CicsCommandLevel Instructions like EXEC CICS SEND MAP... for displaying a Mapset on Terminal and EXEC CICS RECEIVE MAP... for reading the displayed Map to verify the users Inputdata.
Or EXEC CICS STARTBR... or EXEC CICS READ DATASET... to read data from a Dataset.

The CommArea is a kind of WorkingStorage availiable to your programm.
Allways Remember: CicsProgramms are reent !!!

The EibBlock is a CICS SystemArea where you can verify the execution of your CICS-Commands or check status-Flags.

So i think, first off all, you have to get a little bit more familar to CICS.
Study some simple CICS-Programms.

So good luck, greetings, UmeySan
Back to top
View user's profile Send private message
gokuldass

New User


Joined: 18 Mar 2005
Posts: 48
Location: india

PostPosted: Wed Sep 13, 2006 5:17 pm
Reply with quote

Hi Guys,

I am asking about what is DFHEICAP? why it is needed in assembler -- cics program? how to get the data from eibblock in assembler- cics program? how to use dfheicap in assembler program?

Normally, in cobol -- cics program we will be defining the dfhcommera in linkage section.. right ? Similarly how will do it in assembler -- cics program ?

Please let me know if you have queries with my questions..

REgards,
Gokuldass
Back to top
View user's profile Send private message
UmeySan

Active Member


Joined: 22 Aug 2006
Posts: 771
Location: Germany

PostPosted: Fri Sep 15, 2006 12:57 pm
Reply with quote

@gokuldass:


Sorry, but you have to specify your questions a little bit more clearly.

The need of EICAP is the same as in Cobol.

So if you are used to programm CicsCobol, your are familiar with most recent cics funktions.

In Assembler you only have to allocate/asstablish cics-adressability at
programm-start.

Start of coding
*********************************************************************
COPY DFHBMSCA ...for BasicmappingSupportFeature
COPY DFHAID ...for allocating the EIB-Block
*
DFHEISTG DSECT
*
TITLE 'D E F I N I T I O N E N'
*********************************************************************
*----* DIVERSE DEFINITIONEN *----*
*********************************************************************
SAVEAREA DS 18F


COMBER DS 0CL300 ...Define your CommArea
COMWO DS CL4 ...where I'm comming from
COMWA DS CL6 ...what to do

...and so on


After the definitions code your main-programm-section and first astablish
cics adressability

TITLE 'Main- Programm Section '
*************************************************************HUGO DFHEIENT CODEREG=(R5,R6,R7,R10),
DATAREG=(R3,R4),EIBREG=(R2)

Start DS 0H
EXEC CICS HANDLE ABEND LABEL(ABEND)
...what to do when abend occurs

CLC EIBCALEN,=H'0' Test COMMAREA zero
BE ZZ10 Yes, no XCTL/LINK from another Pgm


You use the EIB to check what's going on, perhaps which key was pressed

CLI EIBAID,DFHCLEAR CLEAR was pressed by user
BE
CLI EIBAID,DFHPF9 PF9 was pressed


You can Test CursorPosition within a Map when Key is pressed

CLC 0(2,R14),EIBCPOSN Check CURSOR-POS.
BH AN16055
CLC 2(2,R14),EIBCPOSN
BNL AN16054

Best is, to study a simple Ass-CICS-Programm.

Regards, UmeySan
Back to top
View user's profile Send private message
munna_ibm

New User


Joined: 23 Apr 2005
Posts: 13
Location: chennai

PostPosted: Mon Sep 18, 2006 4:49 pm
Reply with quote

Hi Umeysan,

Can u pls fwd few sample Ass-cics pgms, with the description of what those pgms r going to do.

Rgds,
Munna.
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 Compare 2 files(F1 & F2) and writ... JCL & VSAM 8
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Fetch data from programs execute (dat... DB2 3
No new posts Passing Parameters to Programs Invoke... PL/I & Assembler 5
This topic is locked: you cannot edit posts or make replies. How To Write, Compile and Execute Cob... COBOL Programming 5
Search our Forums:

Back to Top