Post by shawnturner12 on Jan 8, 2018 0:04:59 GMT -5
My program (fmtest3.txt) at this moment can detect in which copybook to write based on the attribute given. I've made sections vul-fm001 and vul-fm002 to fill the appropriate copybooks. But now this is the problem. How can I write a move statement that uses the tagname as fieldname. Idealy I would have something like MOVE XML-text to 'field-name' in FM00x.
I could, of course use an IF-statement and use hard-coded field-names, but I want to make this more flexiable by using a variable for the field-name (and maybe also for the copybook-name) so I could code one MOVE-statement.
Seems to me that you are going to have to create a generic copy/move procedure, and then pass arguments, or pointers to an array of arguments, that provide source and target variables and well as a copy/move switch.
The actual statement constructs should be easy to figure out if you google them. Any programmer who doesn't have a google window or windows open all the time is either really good or really bad.
You should also find the Stack Overflow website and ask these kinds of questions there. I reference them quite a bit.
rskin72: Wonder who else was injured today. Schreff….
Oct 14, 2018 15:08:09 GMT -5
Carnack: Dunbar lost his mind
Oct 14, 2018 15:08:20 GMT -5
Carnack: still very much a WIP
Oct 14, 2018 15:08:44 GMT -5
rskin72: Yep....we are. But we need to beat Dullass and NY. The Fecals will be a tough nugget.
Oct 14, 2018 15:08:54 GMT -5
Carnack: we match up wel and play the eaglestough every year. Its teh Cowboys we have a hard time getting by
Oct 14, 2018 15:09:19 GMT -5
rskin72: AS still has some growing pains with his receivers. Just not totally in synch. And God only knows it seems like every team musters a rush against us
Oct 14, 2018 15:10:04 GMT -5
rskin72: Yea, I will agree with you about the fecals and turds....the Gits also seem to have our number
Oct 14, 2018 15:10:34 GMT -5
rskin72: Or KC's number to be specific
Oct 14, 2018 15:10:44 GMT -5
Carnack: we will at the least split with the boys and the giants this year, though I think we will sweep the giants..the Eagles are the best team in the division and we will have to bring our A game to beat them.
Oct 14, 2018 15:11:50 GMT -5
rskin72: And hopefully have some folks back from injury. Need to be at full strength....or close to it
Oct 14, 2018 15:12:33 GMT -5
Carnack: we just need to get this secondary some experience without losing....its obvious they are very raw
Oct 14, 2018 15:13:34 GMT -5
rskin72: we should sweep the Gits. Manning has looked bad. But he does have OBJ...and their rookie RB looks very good
Oct 14, 2018 15:13:35 GMT -5