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

Dynamic MAP in CICS to capture teh data from Screen


IBM Mainframe Forums -> CICS
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
thesumitk

Active User


Joined: 24 May 2013
Posts: 156
Location: INDIA

PostPosted: Fri Feb 21, 2014 5:11 pm
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: 2501
Location: Atlanta, Georgia, USA

PostPosted: Fri Feb 21, 2014 5:38 pm
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 -

www.mackinney.com

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

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Feb 21, 2014 5:42 pm
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: 8696
Location: Dubuque, Iowa, USA

PostPosted: Fri Feb 21, 2014 6:01 pm
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: 156
Location: INDIA

PostPosted: Fri Feb 21, 2014 6:04 pm
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

Global Moderator


Joined: 21 Sep 2010
Posts: 3051
Location: NYC,USA

PostPosted: Sat Feb 22, 2014 1:15 am
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> CICS

 


Similar Topics
Topic Forum Replies
No new posts Store the data for fixed length COBOL Programming 1
No new posts Using API Gateway from CICS program CICS 0
No new posts Data set Rec-Cnt and Byte-Cnt Testing & Performance 2
No new posts SCOPE PENDING option -check data DB2 2
No new posts Using Dynamic file handler in the Fil... COBOL Programming 2
Search our Forums:

Back to Top