Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Input rec with multiple occurs, ea. occurrence to own rec

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
John Del

New User


Joined: 27 Apr 2012
Posts: 20
Location: NY

PostPosted: Thu May 23, 2013 9:24 pm    Post subject: Input rec with multiple occurs, ea. occurrence to own rec
Reply with quote

Hi - Long time lurker that is usually able to find the solution thru search, the manuals or trial and error... or a combination of each.

I want to create a single output record for each unique positional occurrence in an input record which has multiple unique positional occurrences. Not all occurrences may contain data.

My working solution using ICETOOL is to read the input file, and for each positional occurrence, write a record with that unique occurrence to a temp dsn, then pass back thru that temp data to drop out any that are swap spaces. I get four

My question is if this is possible to accomplish using just a single pass of the data instead of two passes? Obviously if that is more efficient, I'd rather explore that solution. I've tried a couple different methods to use one pass but failed miserably...

Input data example:

Code:
//*SAMPLE INPUT  (ORIG LRECL=3250,FB, BUT FOR THIS SAY 80)
*XXX,NOTE-OLN TICKET-1    DATA TICKET-2    DATA TICKET-3    DATA TICKET-4
DATA PA111111 A1234567890 DATA
DATA PA222222 A2222222220 DATA B2222222221 DATA C2222222222 DATA D3333333333 DAT
DATA PA222222 E3232323230 DATA F2323232321 DATA G3223223222 DATA
DATA PA333333 M4444444440 DATA T4444444444 DATA
DATA PA999999 W5555555555 DATA X5353535353 DATA A5656565656 DATA N5234456673 DAT
//**
//** NOTE-OLN MAY SPAN ACROSS MULTIPLE RECORDS (IE. RECORDS 2 & 3 above), LEN=8
//** TICKET-# FIELDS ARE UNIQUE, ORIGINAL RECORD HAS UP TO 10 OCCURENCES, LEN=11
//**          BUT FOR THE SAMPLE INPUT I DECIDED TO LIMIT TO 4 SINCE THAT
//**          SHOULD STILL GET THE IDEA OF THE INPUT ACROSS...



My working solution:

Code:
//*--------------------------------------------------------------------
//STEP1 EXEC PGM=ICETOOL
//SYMNAMES DD DISP=SHR,DSN=SYMBOLS.USERLIB(SYMCONST)
//         DD DISP=SHR,DSN=SYMBOLS.USERLIB(SYMNOTE)
//         DD *
OUT-RECORD,1,20,CH
 OUT-TICKET,=,11,CH
 SKIP,1
 OUT-OLN,*,08,CH
//SYMNOUT  DD SYSOUT=*
//SORTXSUM DD DUMMY
//TOOLMSG  DD SYSOUT=*
//DFSMSG   DD SYSOUT=*
//IN       DD DISP=SHR,DSN=INPUT.WITH.OCCURS(0)
//TEMPD    DD SYSOUT=*
//TEMP     DD DSN=&&T,DISP=(,PASS),UNIT=SYSDA,SPACE=(TRK,(10,1),RLSE)
//OUTD     DD SYSOUT=*
//OUT      DD SYSOUT=*
//TOOLIN   DD *
  COPY FROM(IN)   USING(CTL1)
  COPY FROM(TEMP) USING(CTL2)
//CTL1CNTL DD *
  OPTION COPY

  OUTFIL  FNAMES=(TEMP,TEMPD),
    BUILD=(TICKET-1,X,NOTE-OLN,/,
           TICKET-2,X,NOTE-OLN,/,
           TICKET-3,X,NOTE-OLN,/,
           TICKET-4,X,NOTE-OLN)

/*
//CTL2CNTL DD *
  OPTION COPY
  INCLUDE COND=(OUT-TICKET,NE,SPACE)
  OUTFIL  FNAMES=(OUT,OUTD)
/*



Output of sample input using the above parameters:

Code:
//**OUTPUT RECORD
OUT-TICKET OUT-OLN
A1234567890 PA111111
A2222222220 PA222222
B2222222221 PA222222
C2222222222 PA222222
D3333333333 PA222222
E3232323230 PA222222
F2323232321 PA222222
G3223223222 PA222222
M4444444440 PA333333
T4444444444 PA333333
W5555555555 PA999999
X5353535353 PA999999
A5656565656 PA999999
N5234456673 PA999999




I've tried using IFTHEN to build the unique records to get the output as shown above but I am only getting one record per input record and the output is just the first occurrence. Perhaps my understanding of the IFTHEN function is lacking.... Also, I've tried using the ',/,' in the builds of the IFTHEN but sort gets upset with that. I consider myself pretty capable at sort, but IFTHEN throws me for a loop when I try to use t for other than overlay or findrep functions. Maybe what I want it to do is something that IFTHEN isn't designed to do and I can't get it thru my thick skull. Or there is a different parameter that will accomplish this and I'm barking up the wrong tree...

IFTHEN attempts:

Code:

//CTL1CNTL DD *
 OPTION COPY
  OUTFIL IFOUTLEN=80,
    IFTHEN=(WHEN=(TICKET-1,GT,SPACE),
       BUILD=(TICKET-1,NOTE-OLN),HIT=NEXT),
    IFTHEN=(WHEN=(TICKET-2,GT,SPACE),
       BUILD=(TICKET-2,NOTE-OLN),HIT=NEXT),
    IFTHEN=(WHEN=(TICKET-3,GT,SPACE),
       BUILD=(TICKET-3,NOTE-OLN),HIT=NEXT),
    IFTHEN=(WHEN=(TICKET-4,GT,SPACE),
       BUILD=(TICKET-4,NOTE-OLN))
/*
  INREC
    IFTHEN=(WHEN=INIT,
       BUILD=(TICKET,NOTE-OLN),HIT=NEXT),
    IFTHEN=(WHEN=(TICKET-2,GT,SPACE),
       BUILD=(TICKET-2,NOTE-OLN),HIT=NEXT),
    IFTHEN=(WHEN=(TICKET-3,GT,SPACE),
       BUILD=(TICKET-3,NOTE-OLN),HIT=NEXT),
    IFTHEN=(WHEN=(TICKET-4,GT,SPACE),
       BUILD=(TICKET-4,NOTE-OLN))
  OPTION COPY
/*



Our shop is currently on DFSORT level "F"

Code:
ICE201I G RECORD TYPE IS F - DATA STARTS IN POSITION 1


However, we do have the most current DFSORT level on our other MVS LPAR's that systems use for upgrades/updates testing (we're z/OS 1.9 on our production MVS system while the other test LPARS are at 1.11, supposedly going to roll out to our current prod system later this year). Can't rush into these things icon_smile.gif

I did search for previous posts for clues to a similar question/solution, but every key word I tried returned pages and pages of posts that didn't seem to apply, so apologies if this has been discussed before and I missed the post(s)....

Thanks - /*
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7236

PostPosted: Thu May 23, 2013 9:50 pm    Post subject: Reply to: Input rec with multiple occurs, ea. occurrence to
Reply with quote

I guess there are two things.

Firstly, to get the output you want, how about considering RESIZE?

RESIZE to 20 bytes with a USING

In the USING, use INREC to arrange your four occurrences with BUILD as the only data on the record.
Use OUTFIL OMIT=( to get rid of the ones you don't want.

Secondly, the problems with what you have attempted. The Slash Operator (/) is only available on OUTFIL (in BUILD or its old cousin, who should be left creaking on the porch).

No matter how many IFTHENs you have, it is the resultant value of whatever BUILD was last done with the original sources being the input data. With the HIT=NEXT, you are BUILDing using data from the previous build and BUILDing "over" it.

Code:
Input
- BUILD
Build1 record to be treated as output, based on positions from Input.
- BUILD
Build2 record to be treated as output, based on positions from Build1, Build1 is then "gone".
- BUILD
Build3 record to be treated as output, based on positions from Build2, Build2 is then "gone".
- BUILD
Build4 record to be treated as output, based on positions from Build3, Build3 is then "gone".

All IFTHEN's finished. Build4 is output, which has data from Input, via Build1, via Build2, via Build3, so you get the "first occurrence".
Back to top
View user's profile Send private message
Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1529
Location: Andromeda Galaxy

PostPosted: Thu May 23, 2013 9:57 pm    Post subject:
Reply with quote

Did you try to combine CTL1 & 2?

What did you get in your output

Relatively Fnames should be removes and modified
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7236

PostPosted: Thu May 23, 2013 10:36 pm    Post subject: Reply to: Input rec with multiple occurs, ea. occurrence to
Reply with quote

It would be good to see the SYMNOUT from the step.

Thinking further, I'm not sure how you are getting what you are from the IFTHENs because the fields you are sourcing the BUILD from are not within the "range" of what is by then the current record...
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Thu May 23, 2013 10:45 pm    Post subject: Re: Input rec with multiple occurs, ea. occurrence to own re
Reply with quote

John Del wrote:

My question is if this is possible to accomplish using just a single pass of the data instead of two passes? Obviously if that is more efficient, I'd rather explore that solution. I've tried a couple different methods to use one pass but failed miserably...


John,

RESIZE could be used here and eliminate an additional pass but you are running an unsupported release of DFSORT.

When you say unique occurrence, can it span across multiple records ?? for ex: take this sample record

Code:

|-------------------------------------- 
|KEY  |ARRAY-1|ARRAY-2|ARRAY-3|ARRAY-4| 
|-------------------------------------- 
|AAAA | DATA-1|DATA-2 |DATA-3 |DATA-4 | 
|AAAA | DATA-5|DATA-6 |DATA-1 |DATA-2 | 
|-------------------------------------- 


If you see DATA-1 and DATA-2 are duplicate occurrences but are spread across 2 records. If you have such data Do you need the output as

Code:

AAAA  DATA-1 
AAAA  DATA-2 
AAAA  DATA-3 
AAAA  DATA-5 
AAAA  DATA-6 




or do you need the 8 records with duplicates?

If you have data like this
Code:

|--------------------------------------   
|KEY  |ARRAY-1|ARRAY-2|ARRAY-3|ARRAY-4|   
|--------------------------------------   
|AAAA | DATA-1|DATA-2 |DATA-1 |DATA-2 |   
|--------------------------------------   


The duplicate occurrences are on the same record . do you need the output as
Code:

AAAA  DATA-1 
AAAA  DATA-2 


Depending on how your input is it can be done in a single pass.
Back to top
View user's profile Send private message
John Del

New User


Joined: 27 Apr 2012
Posts: 20
Location: NY

PostPosted: Thu May 23, 2013 11:37 pm    Post subject:
Reply with quote

Hi Bill, Pandora-Box & Skolusu -

Bill - Thank you, unfortunately, RESIZE isn't available to me (at least not yet in production). I read up on it and tested it on both my prod and test lpars and that would have been the solution I was looking for.
I modified my original code to remove incriminating file field names before posting but I have attached the SYMNAMES & SYMNOUT for my examples.


PB - Thank you, I have tried various inrec and outfil combinations. If I combine the include in the outfil, it would still give me records with blank occurrences.


Skolusu - Thank you. The ARRAY occurrences would be unique to each record (TICKET-1, -2, -3, -4) and would not span across multiple records. The only chance of duplicates are if there is no data there, where the ARRAY occurrence is spaces and I do not need those occurrences in the output.

The key (NOTE-OLN), would be unique to the record but could span across multiple records.

Of course, though I have never seen it happen (knock on wood), if there are dupe ARRAY elements, I would still like to pick them up.



Thanks - /*


My SYMNAMES & SYMNOUT for the example sort step:

Code:
//STEP1 EXEC PGM=ICETOOL
//SYMNAMES DD DISP=SHR,DSN=symbols.USERLIB(SYMCONST)
//         DD *                 
NOTE-RECORD,1,80,CH           
 DATAX,=,5,CH                 
 NOTE-OLN,*,9,CH   
 TICKET-1,*,11,CH   
 DATA1,*,6,CH       
 TICKET-2,*,11,CH   
 DATA2,*,6,CH       
 TICKET-3,*,11,CH   
 DATA3,*,6,CH       
 TICKET-4,*,11,CH   
 DATA4,*,6,CH       
OUT-RECORD,1,20,CH   
 OUT-TICKET,=,11,CH   
 SKIP,1               
 OUT-OLN,*,08,CH       
//SYMNOUT  DD SYSOUT=*       

------- ORIGINAL STATEMENTS FROM SYMNAMES -------
NOTE-RECORD,1,80,CH
DATAX,1,5,CH
NOTE-OLN,6,9,CH
TICKET-1,15,11,CH
DATA1,26,6,CH
TICKET-2,32,11,CH
DATA2,43,6,CH
TICKET-3,49,11,CH
DATA3,60,6,CH
TICKET-4,66,11,CH
DATA4,77,6,CH
OUT-RECORD,1,20,CH
OUT-TICKET,1,11,CH
OUT-OLN,13,8,CH


Inlined and edited attachment
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Fri May 24, 2013 3:09 am    Post subject:
Reply with quote

John del,

Here is sample job of getting the desired results in a single pass.

I assumed that OLN key of 8 bytes is at position 1
The occurrences start from position 10 for a length of 11 bytes each.

The idea is to create the input record with the key and all the 10 occurrences. So your inrec is reduced to the fields we need.

Now using FINDREP we remove the occurrences with spaces. Once we eliminated the occurrences with spaces, it is just a matter of checking for the number of space records and adding a counter at the end.

We will use that counter to split the records on OUTFIL.

Code:

//STEP0100 EXEC PGM=SORT                         
//SYSOUT   DD SYSOUT=*                           
//SYMNAMES DD *                                   
IN-OLN,1,08,CH                                   
SKIP,1                                           
IN-TK01,*,11,CH                                   
IN-TK02,*,11,CH                                   
IN-TK03,*,11,CH                                   
IN-TK04,*,11,CH                                   
IN-TK05,*,11,CH                                   
IN-TK06,*,11,CH                                   
IN-TK07,*,11,CH                                   
IN-TK08,*,11,CH                                   
IN-TK09,*,11,CH                                   
IN-TK10,*,11,CH                                   
//SORTIN   DD DISP=SHR,DSN=&&IN                   
//SORTOUT  DD SYSOUT=*                           
//SYSIN    DD *                                   
  OPTION COPY                                                         
  INREC IFTHEN=(WHEN=INIT,                                             
  BUILD=(IN-OLN,X,                                                     
         IN-TK01,IN-TK02,IN-TK03,IN-TK04,IN-TK05,                     
         IN-TK06,IN-TK07,IN-TK08,IN-TK09,IN-TK10)),                   
  IFTHEN=(WHEN=INIT,FINDREP=(STARTPOS=10,INOUT=(C'           ',C''))),
  IFTHEN=(WHEN=INIT,OVERLAY=(120:C'10')),                             
  IFTHEN=(WHEN=(010,110,CH,EQ,C' '),OVERLAY=(120:C'00')),             
  IFTHEN=(WHEN=(021,099,CH,EQ,C' '),OVERLAY=(120:C'01')),             
  IFTHEN=(WHEN=(032,088,CH,EQ,C' '),OVERLAY=(120:C'02')),             
  IFTHEN=(WHEN=(043,077,CH,EQ,C' '),OVERLAY=(120:C'03')),             
  IFTHEN=(WHEN=(054,066,CH,EQ,C' '),OVERLAY=(120:C'04')),             
  IFTHEN=(WHEN=(065,055,CH,EQ,C' '),OVERLAY=(120:C'05')),             
  IFTHEN=(WHEN=(076,044,CH,EQ,C' '),OVERLAY=(120:C'06')),             
  IFTHEN=(WHEN=(087,033,CH,EQ,C' '),OVERLAY=(120:C'07')),             
  IFTHEN=(WHEN=(098,022,CH,EQ,C' '),OVERLAY=(120:C'08')),             
  IFTHEN=(WHEN=(109,011,CH,EQ,C' '),OVERLAY=(120:C'09'))               
                                                                       
  OUTFIL INCLUDE=(120,2,ZD,GT,0),IFOUTLEN=20,               
  IFTHEN=(WHEN=(120,2,ZD,EQ,01),                             
  BUILD=(010,11,X,01,8)),                                   
  IFTHEN=(WHEN=(120,2,ZD,EQ,02),                             
  BUILD=(010,11,X,01,8,/,021,11,X,01,8)),                   
  IFTHEN=(WHEN=(120,2,ZD,EQ,03),                             
  BUILD=(010,11,X,01,8,/,021,11,X,01,8,/,032,11,X,01,8)),   
  IFTHEN=(WHEN=(120,2,ZD,EQ,04),                             
  BUILD=(010,11,X,01,8,/,021,11,X,01,8,/,032,11,X,01,8,/,   
         043,11,X,01,8)),                                   
  IFTHEN=(WHEN=(120,2,ZD,EQ,05),                             
  BUILD=(010,11,X,01,8,/,021,11,X,01,8,/,032,11,X,01,8,/,   
         043,11,X,01,8,/,054,11,X,01,8)),                   
  IFTHEN=(WHEN=(120,2,ZD,EQ,06),                             
  BUILD=(010,11,X,01,8,/,021,11,X,01,8,/,032,11,X,01,8,/,   
         043,11,X,01,8,/,054,11,X,01,8,/,065,11,X,01,8)),   
  IFTHEN=(WHEN=(120,2,ZD,EQ,07),                             
  BUILD=(010,11,X,01,8,/,021,11,X,01,8,/,032,11,X,01,8,/,   
         043,11,X,01,8,/,054,11,X,01,8,/,065,11,X,01,8,/,   
         076,11,X,01,8)),                                   
  IFTHEN=(WHEN=(120,2,ZD,EQ,08),                             
  BUILD=(010,11,X,01,8,/,021,11,X,01,8,/,032,11,X,01,8,/,   
         043,11,X,01,8,/,054,11,X,01,8,/,065,11,X,01,8,/,   
         076,11,X,01,8,/,087,11,X,01,8)),                   
  IFTHEN=(WHEN=(120,2,ZD,EQ,09),                             
  BUILD=(010,11,X,01,8,/,021,11,X,01,8,/,032,11,X,01,8,/,   
         043,11,X,01,8,/,054,11,X,01,8,/,065,11,X,01,8,/,   
         076,11,X,01,8,/,087,11,X,01,8,/,098,11,X,01,8)),   
  IFTHEN=(WHEN=(120,2,ZD,EQ,10),                             
  BUILD=(010,11,X,01,8,/,021,11,X,01,8,/,032,11,X,01,8,/,   
         043,11,X,01,8,/,054,11,X,01,8,/,065,11,X,01,8,/,   
         076,11,X,01,8,/,087,11,X,01,8,/,098,11,X,01,8,/,   
         109,11,X,01,8))                                     
//*


PS: I did not see your attachment until I logged in, so had to go with imaginary data. I am sure you can adjust it to your actual data positions.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7236

PostPosted: Fri May 24, 2013 4:32 am    Post subject: Reply to: Input rec with multiple occurs, ea. occurrence to
Reply with quote

John,

I've cut the symbols down in your post, to keep the information relevant to the particular problem.

However, they are an impressive example of uses of symbols, so I'm putting them here to inspire others.

Thanks, I always like to see a user of symbols :-)


Code:
//SYMNAMES DD DISP=SHR,DSN=symbols.USERLIB(SYMCONST)
//         DD *                 
NOTE-RECORD,1,80,CH           
 DATAX,=,5,CH                 
 NOTE-OLN,*,9,CH   
 TICKET-1,*,11,CH   
 DATA1,*,6,CH       
 TICKET-2,*,11,CH   
 DATA2,*,6,CH       
 TICKET-3,*,11,CH   
 DATA3,*,6,CH       
 TICKET-4,*,11,CH   
 DATA4,*,6,CH       
OUT-RECORD,1,20,CH   
 OUT-TICKET,=,11,CH   
 SKIP,1               
 OUT-OLN,*,08,CH       
//SYMNOUT  DD SYSOUT=*       

------- ORIGINAL STATEMENTS FROM SYMNAMES -------
*Symbolic constant translations for use in SORT applications
* FTP, DATE & SYSTEM CONSTANTS
MMDDCCYY,S'&MON.&DAY.&YR4'
mmddccyy,S'&MON.&DAY.&YR4'
CCYYMMDD,S'&YR4.&MON.&DAY'
ccyymmdd,S'&YR4.&MON.&DAY'
YYDDD,S'&YR2.&JDAY'
yyddd,S'&YR2.&JDAY'
CCYYDDD,S'&YR4.&JDAY'
ccyyddd,S'&YR4.&JDAY'
MYJOB,S'&JOBNAME'
MVSNAME,S'&SYSNAME'
HHMMSS,S'&HHMMSS'
hhmmss,S'&HHMMSS'
HOURS,S'&HR'
MINUTES,S'&MIN'
SECONDS,S'&SEC'
WEEKDAY,S'&WDAY'        <DAY OF WEEK
GMTDATE,S'&YYMMDD'      <GMT DATE (&YR2.&MON.&DAY)
LOCDATE,S'&LYYMMDD'     <LOCAL DATE (&YR2.&MON.&DAY)
Q,X'7D'                 <for adding embedded quote to strings           00033000
Quote,X'7D'             <for adding embedded quotes to strings          00033000
* ACCOUNT TABLE CONSTANTS
TICKET,'1'
COLLATERAL,'2'
AUCTION,'4'
WEB-COLL,'5'
PBP,'6'
IVR,'6'
PBW,'7'
* PAYMENT TYPE TABLE CONSTANTS
PAYMENT-PAY-TYPE,'1'
PAY-PAY-TYPE,'1'
ERROR-CORR-PAY-TYPE,'2'
EC-PAY-TYPE,'2'
BOUNCED-CHECK-PAY-TYPE,'3'
BC-PAY-TYPE,'3'
REFUND-PAY-TYPE,'4'
DEBIT-PAY-TYPE,'5'
DEBIT,'5'
CREDIT-PAY-TYPE,'6'
CREDIT,'6'
DENY-CREDIT-PAY-TYPE,'7'
BNC-NO-FEE-PAY-TYPE,'8'
CHARGE-BACK-PAY-TYPE,'9'
CHARGE-BCK-PAY-TYPE,'9'
* PAYMENT METHOD TABLE CONSTANTS
CASH,'1'
CHECK,'2'
MONEY-ORDER,'3'
CREDIT-CARD,'4'
DEBIT-CARD,'5'
CA-BOND,'6'
CK-BOND,'7'
MO-BOND,'8'
CC-BOND,'9'
*GENERAL CONSTANTS BELOW
AM,'AM'                                                                 
PM,'PM'                                                                 
ACTIVE,'A'
CANCELED,'C'
COMPLETE,'C'
COMMA,','
DEFAULT,'D'
DUMMIES,'DDP97'
FILED,'F'
FULFILLED,'F'
GUILTY,'G'
HOLD_CONFIRM,'2'
HOLD_REJECT,'3'
HOLD_REQUEST,'1'
ISSUED,'I'
NOTGUILTY,'N'
NOTHING,' '
OFF,'0'
ON,'1'
ONE,1
ONE-P,+100
ONEHUNDRED,100
ONEHUNDRED-P,+10000
ONETHOUSAND,1000
ONETHOUSAND-P,+100000
PIPE,'|'
RLSE_CONFIRM,'6'
RLSE_REJECT,'7'
RLSE_REQUEST,'5'
SKELETON,'I'
SPACE,' '
MLT-TO-STD-TIME1,+120000
MLT-TO-STD-TIME2,+1200
TWELVE-0000,+120000
TWELVE-00,+1200
TRUE,'Y'
XEROX,'XRX'
XRX,'XRX'
YES,'Y'
ZERO,0
ZERO-P,+0
* When searching multiple strings, you should use SS in card (substring)
INVALID-CODES,X'00000C404040'
VIOL-CODES,X'00136C00137C00221C00222C00310C'
VIOL-CODES2,X'00048C00049C00177C00705C00706C00707C00712C00713C00911C'
VIOL-CODESF,X'0000136F0000137F0000221F0000222F0000310F'
VIOL-CODESF2,X'00048F00049F00177F00705F00706F00707F00712F00713F00911F'
LCD-CODES,C'003,034,021,022,023,024,025,026,027,028,029,045'
NIXED,C'1,3,5,7,9'
NOT-NIXED,C' ,2,4,6,8,0'
NOTE-RECORD,1,80,CH
 DATAX,=,5,CH
 NOTE-OLN,*,9,CH
 TICKET-1,*,11,CH
 DATA1,*,6,CH
 TICKET-2,*,11,CH
 DATA2,*,6,CH
TICKET-3,*,11,CH
 DATA3,*,6,CH
 TICKET-4,*,11,CH
 DATA4,*,6,CH
OUT-RECORD,1,20,CH
 OUT-TICKET,=,11,CH
 SKIP,1
 OUT-OLN,*,08,CH

------------------ SYMBOL TABLE -----------------
MMDDCCYY,C'05232013'
mmddccyy,C'05232013'
CCYYMMDD,C'20130523'
ccyymmdd,C'20130523'
YYDDD,C'13143'
yyddd,C'13143'
CCYYDDD,C'2013143'
ccyyddd,C'2013143'
MYJOB,C'E06JMDJD'
MVSNAME,C'MVS1'
HHMMSS,C'135507'
hhmmss,C'135507'
HOURS,C'13'
MINUTES,C'55'
SECONDS,C'07'
WEEKDAY,C'THU'
GMTDATE,C'130523'
LOCDATE,C'130523'
Q,X'7D'
Quote,X'7D'
TICKET,C'1'
COLLATERAL,C'2'
AUCTION,C'4'
WEB-COLL,C'5'
PBP,C'6'
IVR,C'6'
PBW,C'7'
PAYMENT-PAY-TYPE,C'1'
PAY-PAY-TYPE,C'1'
ERROR-CORR-PAY-TYPE,C'2'
EC-PAY-TYPE,C'2'
BOUNCED-CHECK-PAY-TYPE,C'3'
BC-PAY-TYPE,C'3'
REFUND-PAY-TYPE,C'4'
DEBIT-PAY-TYPE,C'5'
DEBIT,C'5'
CREDIT-PAY-TYPE,C'6'
CREDIT,C'6'
DENY-CREDIT-PAY-TYPE,C'7'
BNC-NO-FEE-PAY-TYPE,C'8'
CHARGE-BACK-PAY-TYPE,C'9'
CHARGE-BCK-PAY-TYPE,C'9'
CASH,C'1'
CHECK,C'2'
MONEY-ORDER,C'3'
CREDIT-CARD,C'4'
DEBIT-CARD,C'5'
CA-BOND,C'6'
CK-BOND,C'7'
MO-BOND,C'8'
CC-BOND,C'9'
AM,C'AM'
PM,C'PM'
ACTIVE,C'A'
CANCELED,C'C'
COMPLETE,C'C'
COMMA,C','
DEFAULT,C'D'
DUMMIES,C'DDP97'
FILED,C'F'
FULFILLED,C'F'
GUILTY,C'G'
HOLD_CONFIRM,C'2'
HOLD_REJECT,C'3'
HOLD_REQUEST,C'1'
ISSUED,C'I'
NOTGUILTY,C'N'
NOTHING,C' '
OFF,C'0'
ON,C'1'
ONE,1
ONE-P,+100
ONEHUNDRED,100
ONEHUNDRED-P,+10000
ONETHOUSAND,1000
ONETHOUSAND-P,+100000
PIPE,C'|'
RLSE_CONFIRM,C'6'
RLSE_REJECT,C'7'
RLSE_REQUEST,C'5'
SKELETON,C'I'
SPACE,C' '
MLT-TO-STD-TIME1,+120000
MLT-TO-STD-TIME2,+1200
TWELVE-0000,+120000
TWELVE-00,+1200
TRUE,C'Y'
XEROX,C'XRX'
XRX,C'XRX'
YES,C'Y'
ZERO,0
ZERO-P,+0
INVALID-CODES,X'00000C404040'
VIOL-CODES,X'00136C00137C00221C00222C00310C'
VIOL-CODES2,X'00048C00049C00177C00705C00706C00707C00712C00713C00911C'
VIOL-CODESF,X'0000136F0000137F0000221F0000222F0000310F'
VIOL-CODESF2,X'00048F00049F00177F00705F00706F00707F00712F00713F00911F'
LCD-CODES,C'003,034,021,022,023,024,025,026,027,028,029,045'
NIXED,C'1,3,5,7,9'
NOT-NIXED,C' ,2,4,6,8,0'
NOTE-RECORD,1,80,CH
DATAX,1,5,CH
NOTE-OLN,6,9,CH
TICKET-1,15,11,CH
DATA1,26,6,CH
TICKET-2,32,11,CH
DATA2,43,6,CH
TICKET-3,49,11,CH
DATA3,60,6,CH
TICKET-4,66,11,CH
DATA4,77,6,CH
OUT-RECORD,1,20,CH
OUT-TICKET,1,11,CH
OUT-OLN,13,8,CH
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7236

PostPosted: Fri May 24, 2013 4:41 am    Post subject: Reply to: Input rec with multiple occurs, ea. occurrence to
Reply with quote

Anyone in the future making use of Kolusu's solution, ensure that you cannot have "partial" fields with both leading and trailing blanks, such that the C' ' could be satisfied if spanning two occurences (this is not possible in the TS's example). If this is the case, use the FINDREP for each individual occurrence, using STARTPOS and ENDPOS.
Back to top
View user's profile Send private message
John Del

New User


Joined: 27 Apr 2012
Posts: 20
Location: NY

PostPosted: Fri May 24, 2013 5:14 am    Post subject:
Reply with quote

Hi Bill -

Yes, I like symbolics. I'm spreading the word where I can, thank you icon_smile.gif



Hi Kolusu -

Thank you. I followed what you have presented and understand the concept of using the counter to indicate how many occurrences have inrec data, and then querying that counter to create a new record for each on the outfil. I had not thought of overlay in that sense even with the earlier nudge from Bill in that direction.

I signed back on and created input testdata to match your/our symbolic names. I can attach a file of it if anyone wants. However, I'm failing on syntax on this line:

Code:
IFTHEN=(WHEN=INIT,FINDREP=(STARTPOS=10,INOUT=(C'           ',C''))),



I know its that line because when I comment it out, the sort finishes fine and my output looks good. I've retyped the line, re-pasted the line, checked for funky hex characters after the text and consulted the manual but I am failing to see why I'm getting this error. When I isolate just that IFTHEN in the code above, I get ICE003 continuation line error.

I believe that this line is checking where there is a contiguous 11 bytes of space and replacing with "nil", so the rest of the IFTHENS have the condition to look for(?).

I'll try this out tomorrow with my test production data (lrecl=3250) and tweak as needed. Thanks again.

And in case anyone wants to review the Sysout from the failed sort and someone sees what it is that I'm not picking up on....

Code:
 ICE270I 0 PROCESSING SYMNAMES STATEMENTS
ICE280I 1 ORIGINAL STATEMENTS FROM SYSIN    FOLLOW
            OPTION COPY
            INREC IFTHEN=(WHEN=INIT,
            BUILD=(IN-OLN,X,
                   IN-TK01,IN-TK02,IN-TK03,IN-TK04,IN-TK05,
                   IN-TK06,IN-TK07,IN-TK08,IN-TK09,IN-TK10)),
            IFTHEN=(WHEN=INIT,
                    FINDREP=(STARTPOS=10,INOUT=(C'           ',C''))),
            IFTHEN=(WHEN=INIT,OVERLAY=(120:C'10')),
            IFTHEN=(WHEN=(010,110,CH,EQ,C' '),OVERLAY=(120:C'00')),
            IFTHEN=(WHEN=(021,099,CH,EQ,C' '),OVERLAY=(120:C'01')),
            IFTHEN=(WHEN=(032,088,CH,EQ,C' '),OVERLAY=(120:C'02')),
            IFTHEN=(WHEN=(043,077,CH,EQ,C' '),OVERLAY=(120:C'03')),
            IFTHEN=(WHEN=(054,066,CH,EQ,C' '),OVERLAY=(120:C'04')),
            IFTHEN=(WHEN=(065,055,CH,EQ,C' '),OVERLAY=(120:C'05')),
            IFTHEN=(WHEN=(076,044,CH,EQ,C' '),OVERLAY=(120:C'06')),
            IFTHEN=(WHEN=(087,033,CH,EQ,C' '),OVERLAY=(120:C'07')),
            IFTHEN=(WHEN=(098,022,CH,EQ,C' '),OVERLAY=(120:C'08')),
            IFTHEN=(WHEN=(109,011,CH,EQ,C' '),OVERLAY=(120:C'09'))

            OUTFIL INCLUDE=(120,2,ZD,GT,0),IFOUTLEN=20,
            IFTHEN=(WHEN=(120,2,ZD,EQ,01),
            BUILD=(010,11,X,01,8)),
            IFTHEN=(WHEN=(120,2,ZD,EQ,02),
            BUILD=(010,11,X,01,8,/,021,11,X,01,8)),
            IFTHEN=(WHEN=(120,2,ZD,EQ,03),
            BUILD=(010,11,X,01,8,/,021,11,X,01,8,/,032,11,X,01,8)),
            IFTHEN=(WHEN=(120,2,ZD,EQ,04),
            BUILD=(010,11,X,01,8,/,021,11,X,01,8,/,032,11,X,01,8,/,
                   043,11,X,01,8)),
            IFTHEN=(WHEN=(120,2,ZD,EQ,05),
            BUILD=(010,11,X,01,8,/,021,11,X,01,8,/,032,11,X,01,8,/,
                   043,11,X,01,8,/,054,11,X,01,8)),
            IFTHEN=(WHEN=(120,2,ZD,EQ,06),
            BUILD=(010,11,X,01,8,/,021,11,X,01,8,/,032,11,X,01,8,/,
                   043,11,X,01,8,/,054,11,X,01,8,/,065,11,X,01,8)),
           IFTHEN=(WHEN=(120,2,ZD,EQ,07),
            BUILD=(010,11,X,01,8,/,021,11,X,01,8,/,032,11,X,01,8,/,
                   043,11,X,01,8,/,054,11,X,01,8,/,065,11,X,01,8,/,
                   076,11,X,01,8)),
            IFTHEN=(WHEN=(120,2,ZD,EQ,08),
            BUILD=(010,11,X,01,8,/,021,11,X,01,8,/,032,11,X,01,8,/,
                   043,11,X,01,8,/,054,11,X,01,8,/,065,11,X,01,8,/,
                   076,11,X,01,8,/,087,11,X,01,8)),
            IFTHEN=(WHEN=(120,2,ZD,EQ,09),
            BUILD=(010,11,X,01,8,/,021,11,X,01,8,/,032,11,X,01,8,/,
                   043,11,X,01,8,/,054,11,X,01,8,/,065,11,X,01,8,/,
                   076,11,X,01,8,/,087,11,X,01,8,/,098,11,X,01,8)),
            IFTHEN=(WHEN=(120,2,ZD,EQ,10),
            BUILD=(010,11,X,01,8,/,021,11,X,01,8,/,032,11,X,01,8,/,
                   043,11,X,01,8,/,054,11,X,01,8,/,065,11,X,01,8,/,
                   076,11,X,01,8,/,087,11,X,01,8,/,098,11,X,01,8,/,
                   109,11,X,01,8))
ICE282I 0 PERFORMING SYMBOL SUBSTITUTION AS NEEDED
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 - 18:07 ON THU MAY 23, 2013 -
            OPTION COPY
           INREC IFTHEN=(WHEN=INIT,BUILD=(1,8,X,10,11,21,11,32,11,43,11,54,11,65,*
                         11,76,11,87,11,98,11,109,11)),IFTHEN=(WHEN=INIT,FINDREP=*
                         (STARTPOS=10,INOUT=(C'           ',C''))),IFTHEN=(WHEN=I*
                         NIT,OVERLAY=(120:C'10')),IFTHEN=(WHEN=(010,110,CH,EQ,C' *
                         $
ICE007A F SYNTAX ERROR
                         '),OVERLAY=(120:C'00')),IFTHEN=(WHEN=(021,099,CH,EQ,C' '*
                         ),OVERLAY=(120:C'01')),IFTHEN=(WHEN=(032,088,CH,EQ,C' ')*
                         ,OVERLAY=(120:C'02')),IFTHEN=(WHEN=(043,077,CH,EQ,C' '),*
                         OVERLAY=(120:C'03')),IFTHEN=(WHEN=(054,066,CH,EQ,C' '),O*
                         VERLAY=(120:C'04')),IFTHEN=(WHEN=(065,055,CH,EQ,C' '),OV*
                         ERLAY=(120:C'05')),IFTHEN=(WHEN=(076,044,CH,EQ,C' '),OVE*
                         RLAY=(120:C'06')),IFTHEN=(WHEN=(087,033,CH,EQ,C' '),OVER*
                         LAY=(120:C'07')),IFTHEN=(WHEN=(098,022,CH,EQ,C' '),OVERL*
                         AY=(120:C'08')),IFTHEN=(WHEN=(109,011,CH,EQ,C' '),OVERLA*
                         Y=(120:C'09'))
           OUTFIL INCLUDE=(120,2,ZD,GT,0),IFOUTLEN=20,IFTHEN=(WHEN=(120,2,ZD,EQ,0*
                         1),BUILD=(010,11,X,01,8)),IFTHEN=(WHEN=(120,2,ZD,EQ,02),*
                         BUILD=(010,11,X,01,8,/,021,11,X,01,8)),IFTHEN=(WHEN=(120*
                         ,2,ZD,EQ,03),BUILD=(010,11,X,01,8,/,021,11,X,01,8,/,032,*
                         11,X,01,8)),IFTHEN=(WHEN=(120,2,ZD,EQ,04),BUILD=(010,11,*
                         X,01,8,/,021,11,X,01,8,/,032,11,X,01,8,/,043,11,X,01,8))*
                         ,IFTHEN=(WHEN=(120,2,ZD,EQ,05),BUILD=(010,11,X,01,8,/,02*
                         1,11,X,01,8,/,032,11,X,01,8,/,043,11,X,01,8,/,054,11,X,0*
                         1,8)),IFTHEN=(WHEN=(120,2,ZD,EQ,06),BUILD=(010,11,X,01,8*
                         ,/,021,11,X,01,8,/,032,11,X,01,8,/,043,11,X,01,8,/,054,1*
                         1,X,01,8,/,065,11,X,01,8)),IFTHEN=(WHEN=(120,2,ZD,EQ,07)*
                         ,BUILD=(010,11,X,01,8,/,021,11,X,01,8,/,032,11,X,01,8,/,*
                         043,11,X,01,8,/,054,11,X,01,8,/,065,11,X,01,8,/,076,11,X*
                         ,01,8)),IFTHEN=(WHEN=(120,2,ZD,EQ,08),BUILD=(010,11,X,01*
                         ,8,/,021,11,X,01,8,/,032,11,X,01,8,/,043,11,X,01,8,/,054*
                         ,11,X,01,8,/,065,11,X,01,8,/,076,11,X,01,8,/,087,11,X,01*
                         ,8)),IFTHEN=(WHEN=(120,2,ZD,EQ,09),BUILD=(010,11,X,01,8,*
                         /,021,11,X,01,8,/,032,11,X,01,8,/,043,11,X,01,8,/,054,11*
                         ,X,01,8,/,065,11,X,01,8,/,076,11,X,01,8,/,087,11,X,01,8,*
                         /,098,11,X,01,8)),IFTHEN=(WHEN=(120,2,ZD,EQ,10),BUILD=(0*
                         10,11,X,01,8,/,021,11,X,01,8,/,032,11,X,01,8,/,043,11,X,*
                         01,8,/,054,11,X,01,8,/,065,11,X,01,8,/,076,11,X,01,8,/,0*
                         87,11,X,01,8,/,098,11,X,01,8,/,109,11,X,01,8))
ICE751I 0 C5-K51706 C6-K51706 C7-K54602 C8-K51706 E7-K51706
ICE052I 3 END OF DFSORT


Thanks - /*
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7236

PostPosted: Fri May 24, 2013 5:53 am    Post subject: Reply to: Input rec with multiple occurs, ea. occurrence to
Reply with quote

I thought it looked a bit close to column 72, but it isn't (or it is, but not close enough).

Perhaps this?

Quote:
ICE000I 1 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R5


I have no idea if you get that message if you have later PTFs applied, but V1R5 itself is too old for FINDREP.
Back to top
View user's profile Send private message
John Del

New User


Joined: 27 Apr 2012
Posts: 20
Location: NY

PostPosted: Fri May 24, 2013 7:15 pm    Post subject: Re: Reply to: Input rec with multiple occurs, ea. occurrence
Reply with quote

Bill Woodger wrote:
I thought it looked a bit close to column 72, but it isn't (or it is, but not close enough).

Perhaps this?

Quote:
ICE000I 1 - CONTROL STATEMENTS FOR 5694-A01, Z/OS DFSORT V1R5


I have no idea if you get that message if you have later PTFs applied, but V1R5 itself is too old for FINDREP.



Hi Bill - I've used FINDREP for other things but, this might explain why I'm having a difficult time nailing down how to properly use it.

To confirm that it is my old version causing the error and not one of my many typo's or something else that I've missed in the cards, I copied my test data to the LPAR running z/OS 1.11 with DFSORT V1R10 and the sort job ended successfully using the control cards provided by Skolusu.


Here is my SYSOUT of the production V1R5 level. Even though ICE201I shows 'G', is there a way to tell if there is a PTS missing that can be applied, or is the DFSORT release too old so that we can't do much more in that regard?

Code:
 ICE270I 0 PROCESSING SYMNAMES STATEMENTS
ICE280I 1 ORIGINAL STATEMENTS FROM SYSIN    FOLLOW
            SORT FIELDS=(IN-TICKET,A)                                             00039100
            OUTFIL FNAMES=MYOUT                                                   00039100
ICE282I 0 PERFORMING SYMBOL SUBSTITUTION AS NEEDED
ICE143I 0 BLOCKSET     SORT  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 - 09:11 ON FRI MAY 24, 2013 -

           SORT FIELDS=(1,11,CH,A)
           OUTFIL FNAMES=MYOUT
ICE201I G RECORD TYPE IS F - DATA STARTS IN POSITION 1
ICE751I 0 C5-K51706 C6-K51706 C7-K54602 C8-K51706 E4-K51706 C9-BASE   E5-K51706 E6-K51706 E7-K51706
ICE193I 0 ICEAM1 ENVIRONMENT IN EFFECT - ICEAM1 INSTALLATION MODULE SELECTED
ICE088I 5 E06JMDNR.STEP012 .        , INPUT LRECL = 26, BLKSIZE = 32760, TYPE = FB
ICE093I 0 MAIN STORAGE = (MAX,6291456,6275072)
ICE156I 0 MAIN STORAGE ABOVE 16MB = (6200902,6200902)
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=Y,LIST=Y,ERET=RC16 ,MSGDDN=SYSOUT
ICE129I 0 OPTIONS: VIO=N,RESDNT=ALL ,SMF=NO   ,WRKSEC=Y,OUTSEC=Y,VERIFY=N,CHALT=N,DYNALOC=(SYSDA   ,004),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=2097152,SOLRF=Y,VLLONG=N,VSAMIO=N,MOSIZE=MAX
ICE235I 0 OPTIONS: NULLOUT=RC0
ICE084I 0 BSAM ACCESS METHOD USED FOR SORTIN
ICE750I 0 DC 0 TC 0 CS DSVVV KSZ 15 VSZ 15
ICE752I 0 FSZ=1 RC  IGN=0 E  AVG=32 0  WSP=1 C  DYN=0 0
ICE231I 0 STORAGE USED FOR OUTFIL : BELOW 16M = 27648, ABOVE 16M = 2084864
ICE210I 0 MYOUT    : BSAM USED, LRECL = 26, BLKSIZE = 32760, TYPE = FB   (SDB)
ICE751I 1 BA-K22788 BB-K44382 BC-K24705 CB-K90013 E8-K51706
ICE080I 0 IN MAIN STORAGE SORT
ICE055I 0 INSERT 0, DELETE 0
ICE054I 0 RECORDS - IN: 0, OUT: 0
ICE227I 0 MYOUT    : DELETED = 0, REPORT = 0, DATA = 0
ICE228I 0 MYOUT    : TOTAL IN = 0, TOTAL OUT = 0
ICE174I 0 NO DATA RECORDS FOR AN OUTFIL DATA SET - RC=0
ICE134I 0 NUMBER OF BYTES SORTED: 0
ICE165I 0 TOTAL WORK DATA SET TRACKS ALLOCATED: 0 , TRACKS USED: 0
ICE199I 0 MEMORY OBJECT STORAGE USED = 1M BYTES
ICE180I 0 HIPERSPACE STORAGE USED = 0K BYTES
ICE188I 0 DATA SPACE STORAGE USED = 0K BYTES
ICE052I 0 END OF DFSORT


I assumed that since ICE201I showed the level as 'G', that we were up to date with the available PTF's and were just lacking the 'H' features and enhancements. Ugh.

Thanks - John

Edit to add - in retrospect, all of our other MVS systems are running z/OS 1.11 so I don't think I'd be able to convince the systems people to install anything new to the production system even if there was an available PTF.
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri May 24, 2013 8:03 pm    Post subject:
Reply with quote

Hello,

The acronym is PTF rather than PTS. As it is in the post twice, thought i'd mention it icon_smile.gif

Probably not the best place to mention this, but when i'm involved with a software upgrade, i push Very hard to have a "sandbox" made available to check the new offering. "Everything" in production gets tested in the sandbox and when everything works as it should, i have the upgrade done in Production FIRST - then the development/qa/whatever environments.

This way the Production target will be able to support anything promoted. Several times i've seen systems they got "wrapped around the axle" because the developers were using some new feature (without realizing it was a new feature and unavailable in production) that when promoted failed. Then there were unhappy users and IT management.
Back to top
View user's profile Send private message
Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7236

PostPosted: Fri May 24, 2013 8:09 pm    Post subject: Reply to: Input rec with multiple occurs, ea. occurrence to
Reply with quote

Hello Dick,

Meanwhile, as you were typing, I was editing :-)
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Fri May 24, 2013 9:01 pm    Post subject: Reply to: Input rec with multiple occurs, ea. occurrence to
Reply with quote

John Del,

The error you see is due to a base code bug in symbol processing and it was fixed in the next SPE/release. You are running an unsupported release. You can still run the job without symbols and you would be fine. In the sample job, I showed change the first IFTHEN=(WHEN=INIT to the following

Code:

INREC IFTHEN=(WHEN=INIT,                               
BUILD=(1,8,X,10,11,21,11,32,11,43,11,54,11,65,11,76,11,
       87,11,98,11,109,11)),                           
Back to top
View user's profile Send private message
John Del

New User


Joined: 27 Apr 2012
Posts: 20
Location: NY

PostPosted: Fri May 24, 2013 10:34 pm    Post subject:
Reply with quote

Hi Skolusu -

That did it! Thank you very much!


I tweaked the cards for my production LRECL=3250 file layout and field sizes and ran my little sample prod file and it went smoothly. Sysout below for any others that might want it for their review...

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 - 12:44 ON FRI MAY 24, 2013 -

            OPTION COPY

          * REFORMAT THE INPUT TO THE ELEMENTS WE NEED
            INREC IFTHEN=(WHEN=INIT,
             BUILD=(141,23,X,254,11,546,11,838,11,1130,11,1422,11,
                    1714,11,2006,11,2298,11,2590,11,2882,11)),

          * SCAN NEWLY FORMATTED RECORDS FOR CONTIGUOUS SPACES TO "BLANKS/NIL"
          *   CONVERTING THE MATCHING CHARS/SPACES TO "BLANKS/NIL"
          *   THIS INPUT DATA ELEMENT SHOULD NOT HAVE CONTIGUOUS BYTES OF SPACE
          *   THAT MEETS THE REPLACE CRITERIA, OTHERWISE WE'D NEED TO SPECIFY
          *   EACH OCCURS HERE W/FINDREP IN ORDER TO NOT ERRONEOUSLY ELIMINATE
          *   A VALID ELEMENT/VALUE FROM THE INPUT
            IFTHEN=(WHEN=INIT,FINDREP=(STARTPOS=25,INOUT=(C'           ',C''))),

          * DEFAULT THE COUNTER TO 10 - ASSUME ALL OCCURRENCES ARE POPULATED
            IFTHEN=(WHEN=INIT,OVERLAY=(135:C'10')),

          * CHECK REFORMATTED OCCURRENCE POSTIONS EQ SPACE, SET CNT FIELD TO
          *   REFLECT OCCURRENCE (IF 1ST FIELD IS SPACE, WE HAVE 0 OCCURS)
            IFTHEN=(WHEN=(0025,110,CH,EQ,C' '),OVERLAY=(135:C'00')),
            IFTHEN=(WHEN=(0036,099,CH,EQ,C' '),OVERLAY=(135:C'01')),
            IFTHEN=(WHEN=(0047,088,CH,EQ,C' '),OVERLAY=(135:C'02')),
            IFTHEN=(WHEN=(0058,077,CH,EQ,C' '),OVERLAY=(135:C'03')),
            IFTHEN=(WHEN=(0069,066,CH,EQ,C' '),OVERLAY=(135:C'04')),
            IFTHEN=(WHEN=(0080,055,CH,EQ,C' '),OVERLAY=(135:C'05')),
            IFTHEN=(WHEN=(0091,044,CH,EQ,C' '),OVERLAY=(135:C'06')),
            IFTHEN=(WHEN=(0102,033,CH,EQ,C' '),OVERLAY=(135:C'07')),
            IFTHEN=(WHEN=(0113,022,CH,EQ,C' '),OVERLAY=(135:C'08')),
            IFTHEN=(WHEN=(0124,011,CH,EQ,C' '),OVERLAY=(135:C'09'))

          *BUILD THE OUTPUT QUERYING THE COUNTER & WRITING A RECORD
          *    FOR EACH OF THE POSITIONAL OCCURS REFLECTED BY THE COUNTER
            OUTFIL INCLUDE=(135,2,ZD,GT,0),IFOUTLEN=35,
            IFTHEN=(WHEN=(135,2,ZD,EQ,01),
             BUILD=(025,11,X,01,23)),
            IFTHEN=(WHEN=(135,2,ZD,EQ,02),
             BUILD=(025,11,X,01,23,/,036,11,X,01,23)),
            IFTHEN=(WHEN=(135,2,ZD,EQ,03),
             BUILD=(025,11,X,01,23,/,036,11,X,01,23,/,047,11,X,01,23)),
            IFTHEN=(WHEN=(135,2,ZD,EQ,04),
             BUILD=(025,11,X,01,23,/,036,11,X,01,23,/,047,11,X,01,23,/,
                    058,11,X,01,23)),
            IFTHEN=(WHEN=(135,2,ZD,EQ,05),
             BUILD=(025,11,X,01,23,/,036,11,X,01,23,/,047,11,X,01,23,/,
                    058,11,X,01,23,/,069,11,X,01,23)),
            IFTHEN=(WHEN=(135,2,ZD,EQ,06),
             BUILD=(025,11,X,01,23,/,036,11,X,01,23,/,047,11,X,01,23,/,
                    058,11,X,01,23,/,069,11,X,01,23,/,080,11,X,01,23)),
            IFTHEN=(WHEN=(135,2,ZD,EQ,07),
             BUILD=(025,11,X,01,23,/,036,11,X,01,23,/,047,11,X,01,23,/,
                    058,11,X,01,23,/,069,11,X,01,23,/,080,11,X,01,23,/,
                    091,11,X,01,23)),
            IFTHEN=(WHEN=(135,2,ZD,EQ,08),
             BUILD=(025,11,X,01,23,/,036,11,X,01,23,/,047,11,X,01,23,/,
                    058,11,X,01,23,/,069,11,X,01,23,/,080,11,X,01,23,/,
                    091,11,X,01,23,/,102,11,X,01,23)),
            IFTHEN=(WHEN=(135,2,ZD,EQ,09),
             BUILD=(025,11,X,01,23,/,036,11,X,01,23,/,047,11,X,01,23,/,
                    058,11,X,01,23,/,069,11,X,01,23,/,080,11,X,01,23,/,
                    091,11,X,01,23,/,102,11,X,01,23,/,113,11,X,01,23)),
            IFTHEN=(WHEN=(135,2,ZD,EQ,10),
             BUILD=(025,11,X,01,23,/,036,11,X,01,23,/,047,11,X,01,23,/,
                    058,11,X,01,23,/,069,11,X,01,23,/,080,11,X,01,23,/,
                    091,11,X,01,23,/,102,11,X,01,23,/,113,11,X,01,23,/,
                    124,11,X,01,23))
ICE201I G RECORD TYPE IS F - DATA STARTS IN POSITION 1
ICE751I 0 C5-K51706 C6-K51706 C7-K54602 C8-K51706 E9-K51706 C9-BASE   E5-K51706 E7-K51706
ICE193I 0 ICEAM1 ENVIRONMENT IN EFFECT - ICEAM1 INSTALLATION MODULE SELECTED
ICE088I 0 E06JMDNS.STEP0100.        , INPUT LRECL = 3250, BLKSIZE = 32500, TYPE = FB
ICE093I 0 MAIN STORAGE = (MAX,6291456,6270976)
ICE156I 0 MAIN STORAGE ABOVE 16MB = (6205820,6205820)
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=2097152,SOLRF=Y,VLLONG=N,VSAMIO=N,MOSIZE=MAX
ICE235I 0 OPTIONS: NULLOUT=RC0
ICE084I 0 BSAM ACCESS METHOD USED FOR SORTIN
ICE231I 0 STORAGE USED FOR OUTFIL : BELOW 16M = 47104, ABOVE 16M = 91136
ICE210I 0 SORTOUT  : BSAM USED, LRECL = 35, BLKSIZE = 35, TYPE = FB
ICE751I 1 EF-K49534 CB-K90013 F0-K49037 E8-K51706
ICE055I 0 INSERT 0, DELETE 0
ICE054I 0 RECORDS - IN: 403, OUT: 403
ICE227I 0 SORTOUT  : DELETED = 0, REPORT = 0, DATA = 1192
ICE228I 0 SORTOUT  : TOTAL IN = 403, TOTAL OUT = 1192
ICE052I 0 END OF DFSORT



Thanks again and as an added benefit to myself, now that I know that my DFSORT version is even more behind than I had thought, I won't pull as much hair out when I have trouble with IFTHEN & FINDREP.

- John
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Sat May 25, 2013 1:04 am    Post subject:
Reply with quote

Hello,

Suggest you / your manager explain to Tech or higher management the developer cost because the current release has not been made available. . .
Back to top
View user's profile Send private message
John Del

New User


Joined: 27 Apr 2012
Posts: 20
Location: NY

PostPosted: Sat May 25, 2013 1:20 am    Post subject:
Reply with quote

dick scherrer wrote:
Hello,

Suggest you / your manager explain to Tech or higher management the developer cost because the current release has not been made available. . .


Hi Dick -

You have a point there, especially when I tell them that they have to start cutting checks for the fine people on this board who have helped me out icon_smile.gif


Seriously, though, you are right and it is a real concern. I've been inquiring nearly every month since last October about when we can get the os upgrade onto production, which means our DFSORT version would be much more current.

- John
Back to top
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Sat May 25, 2013 1:23 am    Post subject:
Reply with quote

Yup, that can be frustrating . . .

Keep at'em and Good Luck<g>

Do something fun for Memorial Day!
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Sat May 25, 2013 1:36 am    Post subject:
Reply with quote

John Del wrote:
Hi Skolusu -

That did it! Thank you very much!


I tweaked the cards for my production LRECL=3250 file layout and field sizes and ran my little sample prod file and it went smoothly. Sysout below for any others that might want it for their review...

Thanks again and as an added benefit to myself, now that I know that my DFSORT version is even more behind than I had thought, I won't pull as much hair out when I have trouble with IFTHEN & FINDREP.

- John


John Del,

Awesome Job. I really liked the comments and how they explain about the functionality of the Job.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Performing arithmetic on input field zh_lad DFSORT/ICETOOL 24 Tue Dec 06, 2016 8:04 pm
No new posts High CPU consumption Job using IAM fi... aswinir JCL & VSAM 8 Thu Dec 01, 2016 8:28 pm
This topic is locked: you cannot edit posts or make replies. How to use 2 input files in control c... Gunapala CN DFSORT/ICETOOL 23 Thu Oct 13, 2016 3:42 pm
No new posts Converting multiple VB files to FB fi... Viswanath Reddy JCL & VSAM 6 Mon Aug 08, 2016 11:49 pm
No new posts Execute multiple DB2 Load commands in... faizm DB2 4 Wed Aug 03, 2016 12:53 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us