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
 

 

Dynamic MAP in CICS to capture teh data from Screen

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CICS
View previous topic :: :: View next topic  
Author Message
thesumitk

Active User


Joined: 24 May 2013
Posts: 129
Location: INDIA

PostPosted: Fri Feb 21, 2014 5:11 pm    Post subject: Dynamic MAP in CICS to capture teh data from Screen
Reply with quote

Hi All, Good Day

I am having the below requirement and workign on it

Create a online screen in an existing menu , Capture the data from it write it in a file and submit a batch job thru the online program ..

I used CICS a long ago when I started my job icon_smile.gif and then Never got a chance to work on it.

I am trying to code it but was wondering if any one of you canhelp me i this regard like below

1- If you have ever done this earlier please show a sample if possible , And please dont think that I am asking you to do my job icon_smile.gif I am just trying to see an approach if possible
2- If you have an idea to do this please suggest


Let me know for any questiosn or If I am not clear in my above requirement.

Thanks
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: Fri Feb 21, 2014 5:38 pm    Post subject: Reply to: Dynamic MAP in CICS to capture teh data from Scree
Reply with quote

So, you need to capture the screen buffer of a target screen, parse this captured screen data and build and submit a Batch Job from CICS?

I think you can capture the screen buffer via the CICS native 3270 interface (I believe it's callled LINK3270), although, you could write what's called a pre-emptive transaction, which starts against a target terminal (whose program is dormat and has issued a RETURN TRANSID COMMAREA), receives the screen buffer, writes the screen buffer to a TSQ (like a screen scraper) and returns the transid and commarea to the target terminal as if nothing has occurred.

When you receive the screen buffer via the TSQ Read, then parse the data and build and submit your JCL via the SPOOLOPEN, SPOOLWRITE's (successive) and SPOOLCLOSE API's or via the Internal Reader (old style) via successive WRITEQ TD's.

Years ago, I wrote one of these beasts (somewhat crude compared to today's technology) and named my transid's ICU2 (my initial screen) and ICUX (which is started against the target terminal).

It can be a little dicey.... icon_wink.gif

In addition, review the SPY product (or perhaps a facsimile) from MacKinney Systems -

http://www.mackinney.com

HTH....
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Fri Feb 21, 2014 5:42 pm    Post subject: Reply to: Dynamic MAP in CICS to capture teh data from Scree
Reply with quote

I guess that there is a small language barrier here

Quote:
Create a online screen in an existing menu , Capture the data from it write it in a file and submit a batch job thru the online program ..


I understand it as ...
add a new option to an existing menu which takes to a
program ..
that displays something,
reads some fields
and processes them to
submit a JCL stream to the internal reader

not a screen scraping thing

but I might be wrong
icon_wink.gif
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7913
Location: Bellevue, IA

PostPosted: Fri Feb 21, 2014 6:01 pm    Post subject:
Reply with quote

The specifics will depend upon your site -- you need to talk to coworkers, your team leader, or your site support group. If your site has a tool to develop maps, for example, you would need to use that tool. But if your site does not have such a tool, you would need to code up the BMS map yourself (using the appendix to the Application Programming Reference manual for the map macros). You need to change the menu map to include your option, change the menu program to XCTL to your program when the menu option is selected, and code your program to send the map / receive the map / process the fields / submit the JCL. And your site support group MUST be involved since only they (or someone working at your site) will know the name of the TD queue that points to the internal reader for job submission (the name varies from site to site).

The bottom line is that you REALLY need to spend time talking to people working at your site rather than wasting time posting on this forum.
Back to top
View user's profile Send private message
thesumitk

Active User


Joined: 24 May 2013
Posts: 129
Location: INDIA

PostPosted: Fri Feb 21, 2014 6:04 pm    Post subject:
Reply with quote

Hi enrico-sorichetti,

Yes you are right . I have an menu where I have added an option and now when that option will be selected then my program will come in to picture like below

When option 4 then

Call XXXX program

And in the XXXX program I will be displaying my screen which will allow user to enter data in some fields and once user finished and hit enter it will come back to my program and then we can write it in a file ,, But I am planing to have tis screen with backword and forward facility so that if user has to enter more dat then he/she can press PF8 to scroll down.

Thanks
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1610
Location: NY,USA

PostPosted: Sat Feb 22, 2014 1:15 am    Post subject:
Reply with quote

I would think of below design,
1) Create your new screen and a new file as per the requirements
2) Use TSQ to get all the data from screen 1 ( Screen 2,3,4..by PF8)
3) Once user say "Done addting/updating the date" then use the TSQ and write it to a new file
4) Use the below sample statements to start with a batch job

Code:
EXEC CICS                             
      SPOOLOPEN                         
      OUTPUT                             
      NODE('LOCAL')                     
      USERID('INTRDR')                   
      CLASS('X')                         
      NOCC                               
      PRINT                             
      RECORDLENGTH(80)                   
      TOKEN(TEMP-TOKEN)                   
      RESP(RESP-CODE)                   
      RESP2(RESP2-CODE)                 
  END-EXEC.                             



   EXEC CICS                                           
       SPOOLWRITE                                     
       TOKEN(TM-TOKEN)                                 
       FROM(JCL-LINE(INDEX))               
       RESP(RESP-CODE)                                 
       RESP2(RESP2-CODE)                               
   END-EXEC.                                           



     EXEC CICS                               
         SPOOLCLOSE                         
         TOKEN(TM-TOKEN)                     
         RESP(RESP-CODE)                     
         RESP2(RESP2-CODE)                   
     END-EXEC.
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 -> CICS All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts CICS START AND CANCEL blayek CICS 1 Wed Dec 07, 2016 3:27 am
No new posts Is the 'prompt' data for the DSLIST p... Willy Jensen TSO/ISPF 2 Tue Dec 06, 2016 4:38 am
This topic is locked: you cannot edit posts or make replies. How to move a long alphanumeric data ... lind sh COBOL Programming 8 Mon Dec 05, 2016 7:51 pm
No new posts How does a called pgm know if its cal... Graeme Westerman COBOL Programming 4 Tue Nov 29, 2016 9:25 pm
No new posts IMS DC screen Access sivasaras IMS DB/DC 3 Fri Nov 18, 2016 6:38 pm


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