--- title: "system.secsgem.getToolProgram" description: "Returns a process program from the Gateway that was previously sent by a a tool in an S7F3 message." --- # system.secsgem.getToolProgram > Returns a process program from the Gateway that was previously sent by a a tool in an S7F3 message. This function is used in **Python Scripting**. ## Description ## Client Permission Restrictions This scripting function has no [Client Permission](../../../ignition-modules/vision/vision-project-properties/vision-project-properties.md#vision-permissions-properties) restrictions. ## Syntax `system.secsgem.getToolProgram(ppid)` ### Parameters Type | Parameter | Description ------- | ------- | ------ String | `ppid` | The PPID that was sent from the tool when the S7F3 message was saved. ### Returns **Dictionary** - A Python Dictionary containing the following keys: [editDate, ppbody, bodyFormat]. - `editDate` - holds the last date the program was saved. - `ppbody` - holds the actual program. - `bodyFormat` - holds the format ('A', 'B', 'I', etc) of the original message PPBODY. ### Scope Vision Client ## Code Examples ```python title="Code Snippet" # Retrieve information on all programs. results = system.secsgem.getToolProgramDataset() for program in results: # If the format of the program is ASCII... if program[2] == "A": ppid = program[0] # Retrieve more information on the program. programData = system.secsgem.getToolProgram(ppid) # Print the program. Writing to a file would most # likely be a better practice here. print "Program %s: %s" % (ppid, programData[1]) ```