|
View previous topic :: View next topic
|
| Author |
Message |
zawx
New User
Joined: 28 Feb 2008 Posts: 21 Location: china
|
|
|
|
INPUT(VARIABLE FILE, MAX LENGTH IS 11):
AAABBB01X
AAABBB02XX
AAABBB03XXX
OUTPUT EXCEPT:
BBBAAA01X
BBBAAA02XX
BBBAAA03XXX
JCL:
SORT FIELDS=COPY
RECORD TYPE=V
OUTREC FIELDS=(5,8,3,8,4,3,11,11,5)
ERROR:
ICE126A 0 INCONSISTENT *OUTREC IFTHEN 0 REFORMATTING FIELD FOUND |
|
| Back to top |
|
 |
smijoss
Active User
Joined: 30 Aug 2007 Posts: 114 Location: pune
|
|
|
|
you are missing the length
fir VB file outrec should start as
outrec fields=(1,4,<rest as u want>)[/quote] |
|
| Back to top |
|
 |
zawx
New User
Joined: 28 Feb 2008 Posts: 21 Location: china
|
|
|
|
But the first record length little than max length,
out error:
x BYTE VARIABLE RECORD IS SHORTER THAN y BYTE MINIMUM FOR |
|
| Back to top |
|
 |
CICS Guy
Senior Member

Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
| Back to top |
|
 |
sqlcode1
Active Member
Joined: 08 Apr 2010 Posts: 577 Location: USA
|
|
|
|
CICS Guy,
Just curious if you had tested your job and verified output!!!
Thanks, |
|
| Back to top |
|
 |
CICS Guy
Senior Member

Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
| Back to top |
|
 |
sqlcode1
Active Member
Joined: 08 Apr 2010 Posts: 577 Location: USA
|
|
|
|
CICS Guy,
I apologize if my comments sounded offensive. No, I don't think you would have MF terminal at your coffee table.  
I am not trying to correct you but rather just pointing to the fact that you are overlaying 5th through 7th bytes with values from 8th through 10th bytes and later overlaying 8th through 10th bytes with values from 5th through 7th bytes(which had been overlaid previously). So it should be repeatation of the field(BBB). Please correct me if I am wrong.
Regarding post "move one columns value...", OP wanted to overlay FIELD10 position with SPACES and hence no question about preserving values stored in FIELD10. Here OP needs to shuffle fields and hence needs to preserve both the values.
Unfortunately, I am having connectivity issues and can't test yours as well as my untested version but I promise to test my solution and post it later.
Thanks, |
|
| Back to top |
|
 |
CICS Guy
Senior Member

Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
| sqlcode1 wrote: |
but rather just pointing to the fact that you are overlaying 5th through 7th bytes with values from 8th through 10th bytes and later overlaying 8th through 10th bytes with values from 5th through 7th bytes(which had been overlaid previously). So it should be repeatation of the field(BBB). Please correct me if I am wrong.
Regarding post "move one columns value...", OP wanted to overlay FIELD10 position with SPACES and hence no question about preserving values stored in FIELD10. Here OP needs to shuffle fields and hence needs to preserve both the values. |
No problem...
Just going on my underlying belief that the simpler explanation is probably the answer, I am assuming the the sort does not modify in place, i.e., the source data is not overlaid and the destination data is not contaminated by a prior move (something we programmers have to be aware of when we code... ).
Overlapping moves are either a disaster or a very 'artful' technique, depending on if you intend to do it......grin....
I'm sure Frank or Skolusu will either confirm or 'cut me a new one' come next week.....  |
|
| Back to top |
|
 |
zawx
New User
Joined: 28 Feb 2008 Posts: 21 Location: china
|
|
|
|
As sqlcode1 say, the result error.
 |
|
| Back to top |
|
 |
sqlcode1
Active Member
Joined: 08 Apr 2010 Posts: 577 Location: USA
|
|
|
|
zawx,
try this untested.
| Code: |
OPTION COPY
INREC BUILD=(1,4,5:8,3,8:5,3,11,4)
|
Thanks, |
|
| Back to top |
|
 |
zawx
New User
Joined: 28 Feb 2008 Posts: 21 Location: china
|
|
|
|
| sqlcode1 wrote: |
zawx,
try this untested.
| Code: |
OPTION COPY
INREC BUILD=(1,4,5:8,3,8:5,3,11,[color=red]4[/color])
|
Thanks, |
output error:
x BYTE VARIABLE RECORD IS SHORTER THAN y BYTE MINIMUM FOR
because not every record have max length. |
|
| Back to top |
|
 |
CICS Guy
Senior Member

Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
| zawx wrote: |
output error:
x BYTE VARIABLE RECORD IS SHORTER THAN y BYTE MINIMUM FOR
|
Please display the FULL error including the error message number!
And, while you are at it, the entire sysout....  |
|
| Back to top |
|
 |
zawx
New User
Joined: 28 Feb 2008 Posts: 21 Location: china
|
|
|
|
ICE218A n BYTE VARIABLE RECORD IS SHORTER THAN m BYTE MINIMUM FOR [ddname] FIELDS
sysin is:
SORT FIELDS=COPY
RECORD TYPE=V
INREC BUILD=(1,4,5:5,3,8:5,3,11,4) |
|
| Back to top |
|
 |
zawx
New User
Joined: 28 Feb 2008 Posts: 21 Location: china
|
|
|
|
input file
RBA Len <===5===10====5===20====5===30==>.5...40....5...50....
0 268 000000000000000000000000000000000
0 136 241000299800000138828920190501001..................N0.
0 136 241000299800999999346420190501001..................N0.
0 136 241000299800999999346620190501001..................N0.
0 136 242000299800000138828920190501001..................N0.
0 136 242000299800000138830520190501001..................N0.
0 136 242000299800000138831320190501001..................N0.
0 136 242000299800000138833920190501001..................N0.
0 136 242000299800000138847920190501001..................N0.
0 136 242000299800000138853720190501001..................N0.
0 136 242000299800000138908920190501001..................Y0.
expected output:
0002998000001388289241
1,3 exchange 4,19
use the sysin
SORT FIELDS=COPY
RECORD TYPE=V
OUTREC BUILD=(1,4,5:8,19,24:5,3,2) VLSCMP
output:
0000000000000000000000 000000000000000000000000000000000
0002998000001388289241 241000299800000138828920190501001 N0
0002998009999993464241 241000299800999999346420190501001 N0
0002998009999993466241 241000299800999999346620190501001 N0
0002998000001388289242 242000299800000138828920190501001 N0
0002998000001388305242 242000299800000138830520190501001 N0
0002998000001388313242 242000299800000138831320190501001 N0
0002998000001388339242 242000299800000138833920190501001 N0
0002998000001388479242 242000299800000138847920190501001 N0
0002998000001388537242 242000299800000138853720190501001 N0
0002998000001389089242 242000299800000138908920190501001 Y0
0002998000001389097242i 242000299800000138909720190501001 N0
0002998000001389105242i 242000299800000138910520190501001 N0
0002998000001389113242i 242000299800000138911320190501001 N0
0002998000001389121242i 242000299800000138912120190501001 N0
0002998000001389261242i 242000299800000138926120190501001 N0
0002998000001389279242i 242000299800000138927920190501001 N0
0002998000001389345242i 242000299800000138934520190501001 N0 |
|
| Back to top |
|
 |
CICS Guy
Senior Member

Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
| zawx wrote: |
ERROR:
ICE126A 0 INCONSISTENT *OUTREC IFTHEN 0 REFORMATTING FIELD FOUND |
| zawx wrote: |
ICE218A n BYTE VARIABLE RECORD IS SHORTER THAN m BYTE MINIMUM FOR [ddname] FIELDS
|
Please quit providing what you think we need, provide the entire sysins and sysouts of your original problem!
BTW, what is anybody going to make of this:
| zawx wrote: |
input file
RBA Len <===5===10====5===20====5===30==>.5...40....5...50....
0 268 000000000000000000000000000000000
0 136 241000299800000138828920190501001..................N0.
0 136 241000299800999999346420190501001..................N0.
0 136 241000299800999999346620190501001..................N0.
0 136 242000299800000138828920190501001..................N0.
0 136 242000299800000138830520190501001..................N0.
0 136 242000299800000138831320190501001..................N0.
0 136 242000299800000138833920190501001..................N0.
0 136 242000299800000138847920190501001..................N0.
0 136 242000299800000138853720190501001..................N0.
0 136 242000299800000138908920190501001..................Y0. |
Vs this:
| Quote: |
input file
| Code: |
RBA Len <===5===10====5===20====5===30==>.5...40....5...50....
0 268 000000000000000000000000000000000
0 136 241000299800000138828920190501001..................N0.
0 136 241000299800999999346420190501001..................N0.
0 136 241000299800999999346620190501001..................N0.
0 136 242000299800000138828920190501001..................N0.
0 136 242000299800000138830520190501001..................N0.
0 136 242000299800000138831320190501001..................N0.
0 136 242000299800000138833920190501001..................N0.
0 136 242000299800000138847920190501001..................N0.
0 136 242000299800000138853720190501001..................N0.
0 136 242000299800000138908920190501001..................Y0.
|
|
|
|
| Back to top |
|
 |
zawx
New User
Joined: 28 Feb 2008 Posts: 21 Location: china
|
|
|
|
hi, CICS Guy,
in batch process , created record contains key one and key two.
but online process, I want to read all key two records using startbr cics statement.
so, batch file contains key one and key two ,online file contains key two and key one.
but failed exchange key one and key two.
My english is poor, do you understand? |
|
| Back to top |
|
 |
zawx
New User
Joined: 28 Feb 2008 Posts: 21 Location: china
|
|
|
|
OK,
The source file and target file is variable ,min length 124,max length 268
source:
key1 key2 data
key1 3BYTE
key2 19BYTE
target:
key2 key1 data
how to code the sysin ?
I have tried as :
SORT FIELDS=COPY
RECORD TYPE=V
INREC BUILD=(1,4,5:8,19,24:5,3,27) |
|
| Back to top |
|
 |
CICS Guy
Senior Member

Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
| zawx wrote: |
in batch process , created record contains key one and key two.
but online process, I want to read all key two records using startbr cics statement.
so, batch file contains key one and key two ,online file contains key two and key one.
but failed exchange key one and key two.
My english is poor, do you understand? |
NO, I do not understand....
| CICS Guy wrote: |
| Please quit providing what you think we need, provide the entire sysins and sysouts of your original problem! |
Please provide the information needed to solve your problem!
| Quote: |
| how to code the sysin ? |
Cut&paste the sysouts! |
|
| Back to top |
|
 |
zawx
New User
Joined: 28 Feb 2008 Posts: 21 Location: china
|
|
|
|
| Code: |
ICE143I 0 BLOCKSET COPY TECHNIQUE SELECTED
ICE250I 0 VISIT http://www.ibm.com/storage/dfsort FOR DFSORT PAPERS, EXAMPLES AND MORE
ICE000I 1 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R5 - 10:55 ON SUN JUL 25, 2010 -
SORT FIELDS=COPY
RECORD TYPE=V
INREC BUILD=(1,4,5:8,19,24:5,3,27:27)
ICE201I F RECORD TYPE IS V - DATA STARTS IN POSITION 5
ICE751I 0 C5-K90013 C6-K90013 C7-K90000 C8-K42135 EE-BASE E9-K90013 C9-BASE E5-K44563 E7-K44563
ICE193I 0 ICEAM1 ENVIRONMENT IN EFFECT - ICEAM1 INSTALLATION MODULE SELECTED
ICE088I 0 PARD0XXS.STP0700 . , INPUT LRECL = 272, BLKSIZE = 8192, TYPE = V
ICE093I 0 MAIN STORAGE = (MAX,6291456,6291456)
ICE156I 0 MAIN STORAGE ABOVE 16MB = (6234096,6234096)
ICE127I 0 OPTIONS: OVFLO=RC0 ,PAD=RC0 ,TRUNC=RC0 ,SPANINC=RC16,VLSCMP=N,SZERO=Y,RESET=Y,VSAMEMT=Y,DYNSPC=256
ICE128I 0 OPTIONS: SIZE=6291456,MAXLIM=1048576,MINLIM=450560,EQUALS=N,LIST=Y,ERET=RC16 ,MSGDDN=SYSOUT
ICE129I 0 OPTIONS: VIO=N,RESDNT=ALL ,SMF=NO ,WRKSEC=Y,OUTSEC=Y,VERIFY=N,CHALT=N,DYNALOC=N ,ABCODE=MSG
ICE130I 0 OPTIONS: RESALL=4096,RESINV=0,SVC=109 ,CHECK=Y,WRKREL=Y,OUTREL=Y,CKPT=N,STIMER=Y,COBEXIT=COB2
ICE131I 0 OPTIONS: TMAXLIM=6291456,ARESALL=0,ARESINV=0,OVERRGN=65536,CINV=Y,CFW=Y,DSA=0
ICE132I 0 OPTIONS: VLSHRT=N,ZDPRINT=Y,IEXIT=N,TEXIT=N,LISTX=N,EFS=NONE ,EXITCK=S,PARMDDN=DFSPARM ,FSZEST=N
ICE133I 0 OPTIONS: HIPRMAX=OPTIMAL,DSPSIZE=MAX ,ODMAXBF=0,SOLRF=Y,VLLONG=N,VSAMIO=N,MOSIZE=MAX
ICE235I 0 OPTIONS: NULLOUT=RC0
ICE084I 1 VSAM ACCESS METHOD USED FOR SORTOUT
ICE084I 1 VSAM ACCESS METHOD USED FOR SORTIN
ICE077A 0 VSAM OUTPUT ERROR L(12) SORTOUT
ICE751I 1 EF-K10929 F0-K30362 E8-K44563
ICE052I 0 END OF DFSORT
|
|
|
| Back to top |
|
 |
sqlcode1
Active Member
Joined: 08 Apr 2010 Posts: 577 Location: USA
|
|
|
|
Since, your shuffled fields are part of your VSAM key, I think you need to rebuild your VSAM file and/or key after conversion.
Looking at ICE218A message, you need either of the method from below.
| Code: |
INREC BUILD=(1,4,5:8,3,8:5,3,11:11)
SORT FIELDS=(5,3,CH,A, --> your key2 from original file
8,3,CH,A) --> your key1 from original file
|
this tells dfsort to copy the bytes from 11th position to the end of record.
You may also try below solution. Again untested..(making me scarred and nervous at the same time)…
| Code: |
INREC IFTHEN=(WHEN=INIT,OVERLAY=(16:5,3)),
IFTHEN=(WHEN=INIT,OVERLAY=(5:8,3,8:16,3,11:11,5))
SORT FIELDS=(5,3,CH,A, --> your key2 from original file
8,3,CH,A) --> your key1 from original file
OUTREC BUILD=(1,15)
|
CICS Guy,
I think he means to say, he has 2 process (Batch and Online) reading the same input file and these 2 processes expects data by 2 different keys.
1) For CICS he is creating VSAM file by KEY1,KEY2 order.
2) For Batch process, he is creating VSAM file by KEY2,KEY1 order.
Meanwhile, I am not currently working on CICS but I think you really don't have to create one more version of file to meet your requirement.
Thanks, |
|
| Back to top |
|
 |
zawx
New User
Joined: 28 Feb 2008 Posts: 21 Location: china
|
|
|
|
thank you very much, sqlcode1,
you are right,
I miss sort key.
two methods all submit successfully. |
|
| Back to top |
|
 |
zawx
New User
Joined: 28 Feb 2008 Posts: 21 Location: china
|
|
|
|
| Code: |
INREC IFTHEN=(WHEN=INIT,OVERLAY=(16:5,3)),
IFTHEN=(WHEN=INIT,OVERLAY=(5:8,3,8:16,3,11:11,5))
SORT FIELDS=(5,3,CH,A, --> your key2 from original file
8,3,CH,A) --> your key1 from original file
OUTREC BUILD=(1,15)
|
the sysin run error, target records change to fix length(max length). |
|
| Back to top |
|
 |
zawx
New User
Joined: 28 Feb 2008 Posts: 21 Location: china
|
|
|
|
| thanks for your helps! |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|