I am relatively new to IMS TM and trying to create a new program that uses Scratch Pad Area to communicate with the terminal. I am using a screen that accepts user input and initiates a transaction triggered MPP which then retrieves information related to the data & the function key entered by the user. The MPP routes the output to one of the screens depending on the PF Key. when the user hits another function key, the MPP reads data from SPA for the corresponding screen and throws that screen to the terminal. It's a very simple program and I was able to achieve the same functionality without using a Scratch Pad area in a non-conversational approach. I need to do this using a conversational program(that uses Scratch Pad) and expand upon it.
I have a GU call using the Scratch Pad IO area followed by a GN call using Input Message IO Area. The program just doesn't seem to be doing anything. However when I change things here and there a bit, the screen displays random data which consists of few bytes from the transaction ID and few bytes from the data entered on the input field and the value corresponding to the function keys in the MFS. In short, whatever is displayed on the screen consists of a jumbled up mix of what I enter as input including the function keys. It looks like there is a problem with the input messages read in the GU and the GN calls. Am I missing anything while issuing these two calls back to back. Do I need to take care of anything in the GN call - I have coded a condition to check if the message read by GN call has a shorter length because the transaction code would have been removed. Not really sure what else I am missing. can you please provide a pseudo sample of how should I place my calls to read a simple message (just one field) in a conversational program that uses Scratch Pad.