1.1.10.3 Description
prepro-ims.pl
is used to transfer C programs on
z/OS to a format that can be run in Tuxedo ART for IMS. When file
conversion fails, the failure information and lines of source file
leading to failure are printed to the stderr
.When
complete, a summary is reported to stdout
.
Processing rules are as follows:
- Delete
Comment the "
#pragma runopts
" line and other pragma directives.The
env(IMS)
establishes the correct operating environment andplist(IMS)
establishes the correct parameter list when invoked under IBM IMS. They are not necessary in Tuxedo ART for IMS Runtime and should be removed. - Re-construct
Functions
ctdli()
/aibtdli()
are reconstructed by adding additional trailingNULL
to the argument list. ThisNULL
is used to mark the end of the Tuxedo ART for IMS argument list. Foraibtdli()
, theparmcount
parameter is removed.The function
main()
argument list is eliminated (including "argc
", "argv
" and "envp
"). On mainframes, IMS uses a global list and a macro to define the list. On Tuxedo ART for IMS, the__getcb(int)
function is implemented asGET
method to obtain the PCB list.The
exit()
function is renamed to__art_ims_return ()
. According to IBM IMS documentation, when there are no messages for the program to process, the program returns control to IMS by returning from main or by callingexit()
. To avoidexit()
unexpectedly exiting the container server, The__art_ims_return ()
function is used and helps to return control to container server.The following table shows processing rules examples.
Table 1-3 Processing Rules Examples
Rules Source Destination Delete #pragma runopts(env(IMS), plist(IMS))
/*#pragma runopts(env(IMS), plist(IMS))*/
Re-construct ctdli(func_GU, io_pcb, msg_seg_io_area);
ctdli(func_GU, io_pcb, msg_seg_io_area, NULL);
aibtdli(parmcount, func_GU, io_pcb, msg_seg_io_area);
aibtdli(func_GU, io_pcb, msg_seg_io_area, NULL);
main(/* if any argument */)
main()
exit(val)
__art_ims_return(val);
Note:
prepro-ims.pl
cannot handle all generic C porting from mainframes to open systems.
Parent topic: prepro-ims.pl