Posted: Wed Jun 06, 2007 2:01 pm Post subject: Writing 1 Output based on 2 conditions in Input file.
I have a fixed length Input file. This is current sort card:
Code:
INCLUDE COND=(64,1,CH,EQ,C'1',AND,
261,1,CH,NE,C' ')
OUTREC FIELDS=(1:9X,[b]10:261[/b],18,28:18X,46:82,15,
71:97,12,96:199X,295:64,1,296:3X)
I want to modify this for following conditions.
1) If (64,1,CH,EQ,C'1',AND,261,1,CH,NE,C' ') , write O/P as per Outrec.
2) If (64,1,CH,EQ,C'1',AND,261,1,CH,EQ,C' '), write O/P as
=(1:9X,10:41,18,28:18X,46:82,15, 71:97,12,96:199X,295:64,1,296:3X).
I need only one Output file.
Can we do this using Sort/Icetool in one step.
I tried searching similar posts, but I was not able to conclude.
Thanks for your help.
Thank you Kolusu. Unfortunately, this is not working in our shop. I think this one needs DFSORT.
We have SYNCSORT and ICETOOL. Can we do this using either of them?
I want to do this using ICETOOL. I am getting following messages:
Code:
SYT000I SYNCTOOL RELEASE 1.4D - COPYRIGHT 2003 SYNCSORT INC.
SYT001I INITIAL PROCESSING MODE IS "STOP"
SYT002I "TOOLIN" INTERFACE BEING USED
**** COPY MEMBER REFERENCE FILE TO T4
COPY FROM(XREF) TO(T4)
SYT020I SYNCSORT CALLED WITH IDENTIFIER "0001"
SYT030I OPERATION COMPLETED WITH RETURN CODE 0
**** COPY FINAL NCI FILE TO T4
COPY FROM(MEMIN) TO(T4) USING(CTL1)
SYT020I SYNCSORT CALLED WITH IDENTIFIER "0002"
======================================
OUTREC IFTHEN = (WHEN=(261,1,CH,NE,C' '),
*
BUILD=(1:9X,10:261,18,28:18X,46:82,15,
*
71:97,12,96:199X,295:64,1,296:3X)),
*
======================================
WER428I CALLER-PROVIDED IDENTIFIER IS "0002"
WER268A OUTREC STATEMENT : SYNTAX ERROR
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
Posted: Thu Jun 07, 2007 2:04 pm Post subject:
Quote:
I want to do this using ICETOOL. I am getting following messages:
nimb,
You need to get your facts right. Your shop has syncsort and You doNOT have ICETOOL. Icetool is a part of DFSORT. Check these links which will explain the difference
1 SYNCSORT FOR Z/OS 1.1DRI TPF3A U.S. PATENTS: 4210961, 5117495 (C) 2002 SYNCSORT INC. DATE=2007/158 TIME=14.08.53
PRODUCT LICENSED FOR CPU SERIAL NUMBER 13F4C, MODEL 2086 460 LICENSE/PRODUCT EXPIRATION DATE: 18 JUN 2007
PARMLIST :
OPTION RESINV=0,ARESINV=0,MSGDDN=DFSMSG,SORTIN=XREF,SORTOUT=T4,COPY
WER428I CALLER-PROVIDED IDENTIFIER IS "0001"
WER108I XREF : RECFM=FB ; LRECL= 298; BLKSIZE= 27714
WER110I T4 : RECFM=FB ; LRECL= 298; BLKSIZE= 27714
WER054I RCD IN 0, OUT 0
WER169I RELEASE 1.1D BATCH 0426 TPF LEVEL 3A
WER052I END SYNCSORT - UID,STEP0510,,DIAG=8200,510C,AAB5,E0F7,CB4A,6C83,AAA8,CE60
1 SYNCSORT FOR Z/OS 1.1DRI TPF3A U.S. PATENTS: 4210961, 5117495 (C) 2002 SYNCSORT INC. DATE=2007/158 TIME=14.08.53
PRODUCT LICENSED FOR CPU SERIAL NUMBER 13F4C, MODEL 2086 460 LICENSE/PRODUCT EXPIRATION DATE: 18 JUN 2007
CTL1CNTL :
INCLUDE COND=(64,1,CH,EQ,C'1')
OUTREC IFTHEN = (WHEN=(261,1,CH,NE,C' '),
*
BUILD=(1:9X,10:261,18,28:18X,46:82,15,
*
71:97,12,96:199X,295:64,1,296:3X)),
*
IFTHEN = (WHEN=(261,1,CH,EQ,C' '),
*
BUILD=(1:9X,10:41,18,28:18X,46:82,15,
*
71:97,12,96:199X,295:64,1,296:3X))
*
WER428I CALLER-PROVIDED IDENTIFIER IS "0002"
WER268A OUTREC STATEMENT : SYNTAX ERROR
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
WER275A NO KEYWORDS FOUND ON CONTROL STATEMENT
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
Posted: Thu Jun 07, 2007 2:46 pm Post subject: Re: Writing 1 Output based on 2 conditions in Input file.
nimb wrote:
I want to modify this for following conditions.
1) If (64,1,CH,EQ,C'1',AND,261,1,CH,NE,C' ') , write O/P as per Outrec.
2) If (64,1,CH,EQ,C'1',AND,261,1,CH,EQ,C' '), write O/P as
=(1:9X,10:41,18,28:18X,46:82,15, 71:97,12,96:199X,295:64,1,296:3X).
Just wondering, what would you want to do with records that 64,1 is not a C'1'?
Quote:
I need only one Output file.
Can we do this using Sort/Icetool in one step.
I can't think of any one step to do this (other than a program), what's wrong with two steps?
You know, the manual dosn't explicitly say that the fileids on multiple outfils must be unique....Maybe that would work, want to give it a try?
IFTHEN and BUILD were introduced in SyncSort for z/OS 1.2.2. If you have a SyncSort Online Support Account, then you can download the new release for free. If you do not already have an online account, but would like to request one, please contact SyncSort Product Services at 201-930-8260 or email zos_tech@syncsort.com.
Joined: 26 Nov 2002 Posts: 12376 Topics: 75 Location: San Jose
Posted: Thu Jun 07, 2007 2:51 pm Post subject:
Quote:
Just wondering, what would you want to do with records that 64,1 is not a C'1'?
1. I am guessing that he is interested in only picking the records with '1' in 64th position
Quote:
I can't think of any one step to do this (other than a program), what's wrong with two steps?
It is actually quite simple. All he do want to do is
1. pick all the records with '1' at pos 64
2. For the picked records from condition 1 he wants to populate one of the output field from 2 fields.
If the contents at 261 for 1 byte is a space he wants the contents from pos 41 for 18 bytes from the input file to the output file at pos 10
If the contents at 261 for 1 byte is NOT a space he wants the contents from pos 261 for 18 bytes as is from the input file to the output file at pos 10
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