Swap Date around on a Natural Programming language variable?
I am trying to find a way to flip a date around in the natural programming language. What I have is a #DOB which is equal to 19700830 yyyymmdd and I need it to be mmddyyyy. Is there an easy way to do this in Natural? Question: How can I flip the date around to my specific format the easiest and most efficient way in Natural? Code: RESET #NAME(A21/25) #ROLE(A7/25) #DOB(A10) #I(P3) #ADC(A1/25) #SSN(A9) I have tried using the FOR loop to get my results, but it is bulky and won't compile as of yet.. It is bulky at best. FOR INDEX(P3) FROM 1 TO 8 IF INDEX >= 1 AND INDEX <= 4 #YYYY = #DOB(INDEX) IF INDEX >= 5 AND INDEX <= 6 #MM = #DOB(INDEX) IF INDEX >= 7 AND INDEX <= 7 #DD = #DOB(INDEX) LOOP This is what I would like to do but I am not completely certain that it will work. I think there is a better way but I do not have any real great books on the language and it is something that I do not do all that often. Once or twice a year so it is new to me.
The easiest way to do this is two redefine your variable and them just move and use the pieces of the redefine. DEFINE #DOB(A10) REDEFINE #DOB(#Y(A4) #M(A2) #D(A2)) Then you can just use the piece and move them around the way that you want. WRITE WORK FILE 2 #M ',' #D ',' #Y
Best Practice for Mainframe Testing Environment to create QA, UAT [closed]
z/OS Partitioned dataset access of JCL jobs through Notepad++/any other editors in windows
SORT to replace a column in JCL
point statement in easytrieve
JCL job with java source code within SYSIN DD *
Running JConsole on MainFrame
Splitting of Mainframe datasets based on header
JCL what is wrong with this?
Find and delete dynamic string using JCL
Compare two files and include both match and non match records
How to get a notification ( by an email ) of mainframe job completion
Passing input for COND through a file
How to compare two totals from different datasets
z/VSE sample jcl to print sequential file to spool
How to remove these duplicates?
How to debug JCL internal error while submitting RUNJCL