a) I have to replace RRRRRR, with last four digits from PARA1 and two first digits from PARA2, so I would obtain '730240'. What is the correct way to do this?
b) I have to replace SSSSSS with PARA3. Thatīs no problem, I will just use JP3, "as is". PARA3 is 6 bytes long.
c) And I have to replace FECH with X'DDMMYYYY' , Using &DATENS=(DM4) is ok, but I.m not able to "pack" it. Can I use some value of TRAN= ?
I promise I have been looking for the answer in DFSORT manuals
Thanks a lot.
Perhaps it wuold be better two steps, using a temporal file?
COPY FROM(IN) TO(TMP) USING(CTL1)
COPY FROM(TMP) TO(OUT) USING(CTL1)
Edit: I could append PARA1+PARA2 in the first sort. In the second one , I would use BUILD to pick the correct bytes.
Packing the date, I can't see any path to do that, please, help me with this.
Joined: 18 Feb 2006 Posts: 812 Location: San Jose, CA
Posted: Thu Mar 01, 2012 11:42 pm Post subject:
You can use 19,8,TRAN=UNHEX to convert from 'ddmmyyyy' to X'ddmmyyyy'.
Of course, you don't need two passes to do what you want to do. You can just use multiple IFTHEN clauses, or INREC, OUTREC and/or OUTFIL in the same pass.
Note that X'ddmmyyyy' is NOT PACKED - it is binary. PACKED would be X'0ddmmyyyyC'. _________________ Frank Yaeger - DFSORT Development Team (IBM) - email@example.com
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum