|
View previous topic :: View next topic
|
| Author |
Message |
ITHAKOTA Murali
New User
Joined: 31 Mar 2007 Posts: 6 Location: Florida
|
|
|
|
Hi,
Could you please help me out on the below.
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.
Thanks,
Murali. |
|
| Back to top |
|
 |
William Thompson
Global Moderator
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
| Code: |
OUTREC IFTHEN=(WHEN=(218,1,CH,EQ,C?0?),OVERLAY=(218:C?X?)),
IFTHEN=(WHEN=(218,1,CH,EQ,C?2?),OVERLAY=(218:C?X?)),
IFTHEN=(WHEN=(218,1,CH,EQ,C?1?),OVERLAY=(218:C?Y?)) |
|
|
| Back to top |
|
 |
Frank Yaeger
DFSORT Developer

Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Murali,
Here's a DFSORT job that will do what you asked for:
| Code: |
//S1 EXEC PGM=ICEMAN
//SYSOUT DD SYSOUT=*
//SORTIN DD DSN=... input file
//SORTOUT DD DSN=... output file
//SYSIN DD *
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'))
/*
|
|
|
| Back to top |
|
 |
ITHAKOTA Murali
New User
Joined: 31 Mar 2007 Posts: 6 Location: Florida
|
|
|
|
Hi,
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. |
|
| Back to top |
|
 |
William Thompson
Global Moderator
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. |
|
| Back to top |
|
 |
ITHAKOTA Murali
New User
Joined: 31 Mar 2007 Posts: 6 Location: Florida
|
|
|
|
I'm posting the SYSOUT of the abended job.
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=*
*
Thank you for such a quick response. |
|
| Back to top |
|
 |
ITHAKOTA Murali
New User
Joined: 31 Mar 2007 Posts: 6 Location: Florida
|
|
|
|
The sort card is coded as
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')) |
|
| Back to top |
|
 |
ITHAKOTA Murali
New User
Joined: 31 Mar 2007 Posts: 6 Location: Florida
|
|
|
|
Details of the abend .....
J E S 2 J O B L O G -- S Y S T E M N C S H -- N O D E H 2 6 1 N J E
---- MONDAY, 02 APR 2007 ----
IRR010I USERID SDUDDU IS ASSIGNED TO THIS JOB.
ICH70001I SDUDDU LAST ACCESS AT 05:23:09 ON MONDAY, APRIL 2, 2007
$HASP373 U1AR2340 STARTED - INIT CV - CLASS B - SYS NCSH
SURF920I STEP START: JOB=U1AR2340 STEP=STEP145 PGM=ICEMAN STEP#=001
IEF403I U1AR2340 - STARTED - TIME=06.09.01
X370500I U1AR2340,IAR234,OUTREC,IDT0.SATYA.C1.ISAR.FXB.IAR234.ISB020.SORT.SS IN
IEF450I U1AR2340 STEP145 IAR234 - ABEND=S000 U0016 REASON=00000000 173
TIME=06.09.01
SURF931I STEP ENDED: JOB=U1AR2340 STEP=STEP145 CC=U0016
- --TIMINGS (MINS.)-- ----PA
-JOBNAME STEPNAME PROCSTEP RC EXCP CPU SRB CLOCK SERV PG PAGE
-U1AR2340 IAR234 STEP145 U0016 64 .00 .00 .00 611 0 0
SURF920I STEP START: JOB=U1AR2340 STEP=STEP150 PGM=SORT STEP#=002
SURF931I STEP ENDED: JOB=U1AR2340 STEP=STEP150 CC=BBBBB
-U1AR2340 IAR234 STEP150 FLUSH 0 .00 .00 .00 0 0 0
SURF920I STEP START: JOB=U1AR2340 STEP=STEP160 PGM=ISBAR020 STEP#=003
SURF931I STEP ENDED: JOB=U1AR2340 STEP=STEP160 CC=BBBBB
-U1AR2340 IAR234 STEP160 FLUSH 0 .00 .00 .00 0 0 0
IEF404I U1AR2340 - ENDED - TIME=06.09.01
SURF934I JOB ENDED: JOB=U1AR2340 HIGHEST CC=U0016
-U1AR2340 ENDED. NAME-CMS - POSTING TOTAL CPU TIME= .00 TOTAL ELAPSE
$HASP395 U1AR2340 ENDED
ATISTICS ------
EXECUTION DATE
S READ
UT PRINT RECORDS
UT PUNCH RECORDS
UT SPOOL KBYTES
TES EXECUTION TIME |
|
| Back to top |
|
 |
expat
Global Moderator

Joined: 14 Mar 2007 Posts: 8798 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,
The below is the JCL |
|
| Back to top |
|
 |
ITHAKOTA Murali
New User
Joined: 31 Mar 2007 Posts: 6 Location: Florida
|
|
|
|
| I got it. The error is in the DD name. I have changed it & the job went fine. Verified the file, its as required. Thank you so much. |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|