|
View previous topic :: View next topic
|
| Author |
Message |
f1org
New User
Joined: 14 Sep 2015 Posts: 6 Location: greece
|
|
|
|
Hi
i need your help for this:
cola is the key and i need to put in colb(subkey) if it has spaces with the same value of previeus records
here is a example:
input file(fb)
cola(1,7) colb (8,3)
| Code: |
1234567aaa...................
1234567aaacccccccccccc
1234567 bbbbbbbbbb
2222222wwwfffffffffffffff
2222222 ddddddddd |
output file :
| Code: |
1234567aaa...................
1234567aaacccccccccccc
1234567aaabbbbbbbbbb
2222222wwwfffffffffffffff
2222222wwwddddddddd |
Thanks a lot.
[coded] |
|
| Back to top |
|
 |
Nic Clouston
Global Moderator
Joined: 10 May 2007 Posts: 2454 Location: Hampshire, UK
|
|
|
|
Please use the code tags when presenting code and data - they retain the spacing that the browser would otherwise remove and makes you code/data stand out from your requirement text.
This is similar to many other requests - have you looked through this section of the forum? |
|
| Back to top |
|
 |
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Nic, not sure (yet) that it is so similar.
f1org, can your data be like this?
| Code: |
1234567aaa...................
1234567bbbcccccccccccc
1234567 bbbbbbbbbb
2222222wwwfffffffffffffff
2222222 ddddddddd
3333333 effffffffffffff
3333333 fdddddddd |
|
|
| Back to top |
|
 |
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
If your data can be the more exotic example:
| Code: |
OPTION COPY
INREC IFOUTLEN=80,
IFTHEN=(WHEN=GROUP,
BEGIN=(8,3,CH,NE,C' '),
PUSH=(81:8,3,1,7)),
IFTHEN=(WHEN=(8,3,CH,EQ,C' ',
AND,
1,7,CH,EQ,84,7,CH),
OVERLAY=(8:81,3)) |
If you really want the sub-key value from the first record of the key:
| Code: |
OPTION COPY
INREC IFTHEN=(WHEN=GROUP,
KEYBEGIN=(1,7),
PUSH=(8:8,3)) |
|
|
| Back to top |
|
 |
f1org
New User
Joined: 14 Sep 2015 Posts: 6 Location: greece
|
|
|
|
ok Nic
i am looking from other request of this forum...
Thanks for your reply |
|
| Back to top |
|
 |
f1org
New User
Joined: 14 Sep 2015 Posts: 6 Location: greece
|
|
|
|
Bill you are the best
Thanks a lot |
|
| Back to top |
|
 |
f1org
New User
Joined: 14 Sep 2015 Posts: 6 Location: greece
|
|
|
|
| Bill can you suggest another method without WHEN=GROUP as we don't have the PTF's of DFSORT 1.5 ...... |
|
| Back to top |
|
 |
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Can you run this and paste the sysout from the step please, so that we can see exactly what you do have?
| Code: |
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD *
RECORD
/*
//SORTOUT DD DUMMY
//SYSIN DD *
OPTION COPY
/* |
Any chance of an upgrade in the near future? You are way, way, way out of IBM support, even not knowing exactly what you have. |
|
| Back to top |
|
 |
f1org
New User
Joined: 14 Sep 2015 Posts: 6 Location: greece
|
|
|
|
Hi Bill
we are out of support because of re migration process out of mainframe
ICE000I 1 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R5 - 16:54 ON THU SE
OPTION COPY
ICE201I E RECORD TYPE IS F - DATA STARTS IN POSITION 1
ICE751I 0 C5-K26318 C6-K90007 C7-K90000 C8-K23476 E9-K90007 C9-BASE E5-K31980
ICE193I 0 ICEAM1 ENVIRONMENT IN EFFECT - ICEAM1 INSTALLATION MODULE SELECTED
ICE088I 0 FRAGOS1 .S1 . , INPUT LRECL = 80, BLKSIZE = 80, TYPE = F
ICE093I 0 MAIN STORAGE = (MAX,6291456,6278238)
ICE156I 0 MAIN STORAGE ABOVE 16MB = (6200798,6200798)
ICE127I 0 OPTIONS: OVFLO=RC0 ,PAD=RC0 ,TRUNC=RC0 ,SPANINC=RC16,VLSCMP=N,SZERO=Y
ICE128I 0 OPTIONS: SIZE=6291456,MAXLIM=1048576,MINLIM=450560,EQUALS=N,LIST=Y,ER
ICE129I 0 OPTIONS: VIO=N,RESDNT=ALL ,SMF=NO ,WRKSEC=Y,OUTSEC=Y,VERIFY=N,CHALT
ICE130I 0 OPTIONS: RESALL=4096,RESINV=0,SVC=109 ,CHECK=Y,WRKREL=Y,OUTREL=Y,CKPT
ICE131I 0 OPTIONS: TMAXLIM=6291456,ARESALL=0,ARESINV=0,OVERRGN=65536,CINV=Y,CFW
ICE132I 0 OPTIONS: VLSHRT=N,ZDPRINT=Y,IEXIT=N,TEXIT=N,LISTX=N,EFS=NONE ,EXIT
ICE133I 0 OPTIONS: HIPRMAX=OPTIMAL,DSPSIZE=MAX ,ODMAXBF=0,SOLRF=Y,VLLONG=N,VSAM
ICE235I 0 OPTIONS: NULLOUT=RC0 |
|
| Back to top |
|
 |
Bill Woodger
Moderator Emeritus
Joined: 09 Mar 2011 Posts: 7309 Location: Inside the Matrix
|
|
|
|
Well, if you are a small site and not using the Mainframe at capacity, you should be OK.
You don't have WHEN=GROUP, you don't have JOINKEYS.
That leaves ICETOOL's SPLICE operator.
It would be simpler for you to write a small E35 Exit program in COBOL. There are some examples here (search this part of the forum for DIVISION or something like that).
There, do the same thing as the GROUP I suggested. When non-blank, store the three-character value and the key. When blank and key equal to saved key, copy the stored three characters to the record. |
|
| Back to top |
|
 |
Akatsukami
Global Moderator

Joined: 03 Oct 2009 Posts: 1787 Location: Bloomington, IL
|
|
|
|
| Has not DFSORT V1R5 been out of support since 2007? Is it taking so long to migrate to another platform (and if so, what does that say about the decision to migrate)? |
|
| Back to top |
|
 |
f1org
New User
Joined: 14 Sep 2015 Posts: 6 Location: greece
|
|
|
|
Bill thanks for your advise
I make a cobol program for this
Best Regards |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|