mainframe


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

Related Links

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

Categories

HOME
makefile
swift
dotnetrdf
crystal-reports
shopify
freepascal
aem
survival-analysis
vlc
defragmentation
google-spreadsheet-api
shipping
ipfs
rfid
react-leaflet
reduction
arm-template
pyyaml
off-canvas-menu
jpeg2000
jsonserializer
attask
multiple-columns
autolayout
azure-servicebus-queues
jquery-waypoints
myob
http-method
data-cleansing
cep
unpack
ab-initio
data-conversion
winscp
google-api-dotnet-client
encase
large-data
threshold
boilerplate
xen
freetts
wsadmin
onbackpressed
ssh.net
microdata
upsert
matlab-cvst
dojox.grid.datagrid
jtds
ideone
tuleap
tiddlywiki
pluck
instruction-set
nsfetchedresultscontrolle
inject
mongoose-populate
excon
achievements
mpeg-4
amazon-kcl
altbeacon
web-essentials
document-oriented-db
programming-paradigms
pyopengl
criteria-api
swift2.1
ember-cli-addons
stackframe
orientation-changes
java-collections-api
method-overriding
spdy
android-looper
map-force
visual-studio-addins
dllexport
google-closure-library
shiva3d
sharpmap
fortran77
fluidsynth
attachevent
continuous-testing
wcf-web-api
die
tcxgrid
coff
curljs
qtembedded
opengl-es-lighting
rubycas
nvelocity
clause
recordset
sitemappath
longjmp
data-entry
msf

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App