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

Dynamic program name for CREATE TRANSACTION


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

Active User


Joined: 18 Jun 2009
Posts: 407
Location: Nashville, TN

PostPosted: Tue Aug 17, 2010 1:45 pm
Reply with quote

Hi All,

Is it possible to dynamically change the program name when we use the CREATE TRANSACTION statement ?

Suppose say currently I have my base program in Assembler and the program name is available in a variable. We did some testing but could not assign the value in the variable to the program attribute. This is how i have coded.
Code:
PG12001  EQU   *                                                       
         MVC   NEWTRANS,=C'C001'    NEW TRANSACTION                     
         MVC   NEWPROG,=C'CHECK001' NEW PROGRAM                         
*                                                                       
         EXEC CICS CREATE TRANSACTION ( NEWTRANS ),                    -
               ATTRIBUTES ('PROGRAM (NEWPROG)'),                       -
               RESP ( RESPCODE ),                                      -
               RESP2 ( RESPCOD2 )                                       
When I am running the above code and new transaction C001 is created but with a program name NEWPROG instead of CHECK001.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Tue Aug 17, 2010 2:11 pm
Reply with quote

the manual is a little confusing without the benefit of experiment.
a guess:
the manual mentions Atrributes and literals and strings and values.

have you attempted
ATTRIBUTES ('PROGRAM' (NEWPROG))
instead of
ATTRIBUTES ('PROGRAM (NEWPROG)')

no idea if it will work.
Back to top
View user's profile Send private message
Binop B

Active User


Joined: 18 Jun 2009
Posts: 407
Location: Nashville, TN

PostPosted: Tue Aug 17, 2010 2:44 pm
Reply with quote

Hi dbz,

Thanks a lot for the response... icon_smile.gif

Quote:
have you attempted
ATTRIBUTES ('PROGRAM' (NEWPROG))
instead of
ATTRIBUTES ('PROGRAM (NEWPROG)')
Hadn't tried before... Tried the statement in a couple of ways and am getting an error messages as below...

CICS Precompiler is going okay but with an error in Assembler compiler..
Code:
*        EXEC CICS CREATE TRANSACTION ( NEWTRANS ),                     
*              ATTRIBUTES ('PROGRAM'( NEWPROG )),                       
*              RESP ( RESPCODE ),                                       
*              RESP2 ( RESPCOD2 )                                       
         DFHECALL =X'3008C00028C000000000000000',(CHA4,NEWTRANS),'PROGR*
               AM'( NEWPROG )                                           
** ASMA088E Unbalanced parentheses in macro call operand - DFHEC/'PROGRAM'(
** ASMA435I Record 221 in CICSTS32.SDFHMAC(DFHECALL) on volume: SYS026     



This error is during the CICS Precompiler ..
Code:
*        EXEC CICS CREATE TRANSACTION ( NEWTRANS ),                     
*              ATTRIBUTES ('PROGRAM'( NEWPROG ),                       
*              RESP ( RESPCODE ),                                       
*              RESP2 ( RESPCOD2 )                                       
         DFHECALL =X'3008C00008C000000000000000',(CHA4,NEWTRANS),'PROGR*
               AM'( NEWPROG )                                           
*DFH7200I E  TOO MANY ARGUMENTS FOR 'ATTRIBUTES'. EXCESS ARGUMENTS     
*            IGNORED.                                                   
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 Using API Gateway from CICS program CICS 0
No new posts How to create a list of SAR jobs with... CA Products 3
No new posts Using Dynamic file handler in the Fil... COBOL Programming 2
No new posts DB2 Event passed to the Application P... DB2 1
No new posts How to pass the PARM value to my targ... COBOL Programming 8
Search our Forums:

Back to Top