I have file.If i get 2 or 0 in 218 Posotion of my input file then i need to replace with X and if get 1 inthat place then i need to replace it with "Y".
Is this is possible with a sort card, if so could you please help me with its Syntac.
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
ITHAKOTA Murali wrote:
I have file.If i get 2 or 0 in 218 Posotion of my input file then i need to replace with X and if get 1 inthat place then i need to replace it with "Y".
I probably have it wrong, but this seem to be what you aare looking for
Firstly I would like to thank you for your help. I have tried both the sort cards, but both abended. I could understand the sort card with INREC, but I'm afraid the OUTREC one is incorrect. I would like to once again put my problem before you, so that we can be sure my query is understood properly.
I have a file in which in the one byte field located at the 218th position I will be getting values of 2 or 1 or 0. When I get 2 or 0 I need to replace it with X and write it to the output. When I get value of 1 in that field I need to replace it with Y and write it to the output. This I want to do using a Sort Card, is this feasible. That is I'm gonna change a numeric filed value into a Character value.
I hope I'm clear this time. Could you please let me know why I'm getting an abend. Is it because I'm trying to change a numeric data to character or is it because of something else.
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
You are right, duped the line and didn't finish the updating correctly.
The problem is understood, what errors or abends occured when you used Frank's sample? Please post your jcl and control cards. Please post your outputs showing the error/abend.
I could not paste the screen shot here ...... hence providing the details as below ...
SYNCSORT FOR Z/OS 1.2.2.2R U.S. PATENTS: 4210961, 5117495 (C) 2005 SYNCSO
z/OS 1.7.1
PRODUCT LICENSED FOR CPU SERIAL NUMBER 5C01E, MODEL 2084 305 LICEN
SYSIN :
OPTION COPY
INREC IFTHEN=(WHEN=(218,1,SS,EQ,C'0,2'),OVERLAY=(218:C'X')),
IFTHEN=(WHEN=(218,1,CH,EQ,C'1'),OVERLAY=(218:C'Y'))
WER276B SYSDIAG= 36496, 878979, 878979, 1286391
WER164B 8,412K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,
WER164B 0 BYTES RESERVE REQUESTED, 2,520K BYTES USED
WER146B 32K BYTES OF EMERGENCY SPACE ALLOCATED
WER224A SORTIN NOT DEFINED
WER410B 5,856K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16MEG LINE,
The below is the JCL
STEP145 EXEC PGM=ICEMAN
********************************************************************
* STEP145 IN THE GEM PLUS FILE CHANGE THE CARDS PER CARRIER *
* FIELD VALUES (2 AND 0 AS X AND 1 AS Y) *
* RESTART PROCEDURE: RESTART=IAR234.STEP145 *
* *
********************************************************************
*
INREC DD DSN=IDT0.SATYA.C1.ISAR.FXB.ISTGE.G22V00.S1,
DISP=SHR
*
OUTREC DD DSN=IDT0.SATYA.C1.ISAR.FXB.IAR234.ISB020.SORT.SS,
DISP=(NEW,CATLG,DELETE),
UNIT=&DISK,
SPACE=(&CYL,(5,5),RLSE),
DCB=(RECFM=FB,LRECL=1104,BUFNO=16)
*
SORTWK01 DD UNIT=&DISK,SPACE=(&CYL,(5,5),,CONTIG)
SORTWK02 DD UNIT=&DISK,SPACE=(&CYL,(5,5),,CONTIG)
SORTWK03 DD UNIT=&DISK,SPACE=(&CYL,(5,5),,CONTIG)
SORTWK04 DD UNIT=&DISK,SPACE=(&CYL,(5,5),,CONTIG)
SORTWK05 DD UNIT=&DISK,SPACE=(&CYL,(5,5),,CONTIG)
SYSIN DD DSN=IDT0.SATYA.ACMOBIUS(SORTSS),DISP=SHR
*
SYSOUT DD SYSOUT=*
SYSPRINT DD SYSOUT=*
SYSDBOUT DD SYSOUT=*
SYSUDUMP DD SYSOUT=*
*
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
From your previous post
INREC IFTHEN=(WHEN=(218,1,SS,EQ,C'0,2'),OVERLAY=(218:C'X')),
IFTHEN=(WHEN=(218,1,CH,EQ,C'1'),OVERLAY=(218:C'Y'))
WER276B SYSDIAG= 36496, 878979, 878979, 1286391
WER164B 8,412K BYTES OF VIRTUAL STORAGE AVAILABLE, MAX REQUESTED,
WER164B 0 BYTES RESERVE REQUESTED, 2,520K BYTES USED
WER146B 32K BYTES OF EMERGENCY SPACE ALLOCATED
WER224A SORTIN NOT DEFINED
WER410B 5,856K BYTES OF VIRTUAL STORAGE AVAILABLE ABOVE THE 16MEG LINE,