{"id":102,"date":"2011-11-21T11:23:15","date_gmt":"2011-11-21T18:23:15","guid":{"rendered":"http:\/\/www.petesworkshop.com\/blog_wp\/?p=102"},"modified":"2011-11-21T11:26:36","modified_gmt":"2011-11-21T18:26:36","slug":"mobile-application-development-and-ibm-i-part-deux","status":"publish","type":"post","link":"https:\/\/www.petesworkshop.com\/blog_wp\/?p=102","title":{"rendered":"Mobile application development and IBM i (part Deux)"},"content":{"rendered":"<p>Running a little later on this second post because I had to write a 5250 green screen version of our timeclock punch program.\u00a0 Like most new things I do, I try to actually learn something new when I go forward with a new project.\u00a0 ALWAYS!\u00a0 So there is rarely any same ol, same ol when I write code.\u00a0 If you are writing the same code over and over for every application you create you are just a programmer.\u00a0 If you try a new approach or a new language feature every time you write an application then you are a developer.\u00a0 If you try new approaches and new language features and wholly new languages every time you develop an application, well, you are a nutcase like I am.\u00a0 But I thrive on new stuff so&#8230;..<\/p>\n<p>OK!\u00a0 So here is what the application does:<\/p>\n<p>When you run the app you see a screen with a Punch In, Punch Out, and Exit button (Using MOUBTN was the &#8220;new&#8221; thing for me).\u00a0 The screen displays the time, the date and the last punch on the clock.\u00a0 If you click on the &#8216;Punch IN&#8217; button OR Press F6, an IN punch is recorded and the program exits.\u00a0 If you click on the &#8216;Punch OUT&#8217; button OR press F7, an OUT punch is recorded and the program exits.\u00a0 If you click on the &#8216;Exit&#8217; button OR press F3, the program exits.<\/p>\n<p>The application screen looks like this:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone\" title=\"Punch Clock\" src=\"http:\/\/www.petesworkshop.com\/images\/punchclock.jpg\" alt=\"\" width=\"725\" height=\"272\" \/><\/p>\n<p>MOUBTN may not be supported on your 5250 emulator and that is why I include the function keys as well.\u00a0 Also, you may say, &#8220;Where is the security here? Anyone who can run the program can punch in as employee 55&#8221;! Yep. You didn&#8217;t think I was going to do ALL the work for you did you?\u00a0 Besides that is a trivial plumbing job and would have to be adapted to your employee master file anyway.<\/p>\n<p>So, where is the code?\u00a0 You can download the zip that contains the save file <a title=\"Punch save file\" href=\"http:\/\/www.petesworkshop.com\/downloads\/punch.zip\">here<\/a>:<\/p>\n<p>The source is included in the save file and it was saved at V5R4M0 ( I am running 6.1 and 7.1 in two partitions).\u00a0 The text version of the program source can be found <a title=\"Punch program source\" href=\"http:\/\/www.petesworkshop.com\/Projects\/Mobile_Punch\/PunchPGM.txt\" target=\"_blank\">here<\/a> and the text version of the DDS can be found<a href=\"http:\/\/www.petesworkshop.com\/Projects\/Mobile_Punch\/PunchDDS.txt\" target=\"_blank\"> here<\/a>. It ain&#8217;t the prettiest code but the FBU\u00a0 (functional but ugly) approach always works for me.<\/p>\n<p>Go ahead and run the program a few times to get the gist of it.\u00a0 It&#8217;s pretty simple and I plan to follow the KISS pattern for the remaining steps that take that 5250 stuff to the web and then mobile web world.<\/p>\n<p>So you are still chomping at the bit to write some Mobile app code?\u00a0 Ok, Ok, I hear you. The next installment will be a web version of our 5250 Punch Clock program and from then on it just gets easier and easier&#8230;.(honest).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Running a little later on this second post because I had to write a 5250 green screen version of our timeclock punch program.\u00a0 Like most new things I do, I try to actually learn something new when I go forward &hellip; <a href=\"https:\/\/www.petesworkshop.com\/blog_wp\/?p=102\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-102","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.petesworkshop.com\/blog_wp\/index.php?rest_route=\/wp\/v2\/posts\/102","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.petesworkshop.com\/blog_wp\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.petesworkshop.com\/blog_wp\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.petesworkshop.com\/blog_wp\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.petesworkshop.com\/blog_wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=102"}],"version-history":[{"count":5,"href":"https:\/\/www.petesworkshop.com\/blog_wp\/index.php?rest_route=\/wp\/v2\/posts\/102\/revisions"}],"predecessor-version":[{"id":110,"href":"https:\/\/www.petesworkshop.com\/blog_wp\/index.php?rest_route=\/wp\/v2\/posts\/102\/revisions\/110"}],"wp:attachment":[{"href":"https:\/\/www.petesworkshop.com\/blog_wp\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=102"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.petesworkshop.com\/blog_wp\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=102"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.petesworkshop.com\/blog_wp\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=102"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}