View previous topic :: View next topic
|
Author |
Message |
Digvijay Singh
Active User
Joined: 20 Apr 2022 Posts: 148 Location: India
|
|
|
|
Hi All,
I have input file having one record ,please see below.
****** *******************
000001 RITM0203049
****** *******************
Using sort i want to create a output file that i will use in other step for diffrent purpose. requirement is my output file content should look like below .
'PUT ''QSYS.SORT.RC.CODE'' /tmp/ndvr/RITM0203049.txt;'
exactly the content i want in my output file where if you notice RITM0203049 is the data from input file.
i am getting below error while doing it from outrec.
SYNCSORT FOR Z/OS 3.1.4.0R U.S. PATENTS: 4210961, 5117495 (C) 2018 SYNCSO
z/OS 2.4.0
Code: |
SYNCSORT LICENSED FOR CPU SERIAL NUMBER 13CD7, MODEL 8561 605 LICEN
SYSIN :
SORT FIELDS=COPY
OUTREC FIELDS=(01:C''PUT ''QSYS.SORT.RC.CODE'' /tmp/ndvr/',37:01,12,80:X)
*
WER813I INSTALLATION OPTIONS IN MFX LOAD LIBRARY WILL BE USED
WER268A OUTREC STATEMENT : SYNTAX ERROR
WER211B SYNCSMF CALLED BY SYNCSORT; RC=0000
WER449I SYNCSORT GLOBAL DSM SUBSYSTEM ACTIVE
******************************** END OF DATA ********************************** |
I tried multiple time and still couldn't find the error , can anyone give litlle hint here or check my sort card.
my sort card:
Code: |
SYSIN DD *
SORT FIELDS=COPY
OUTREC FIELDS=(01:C''PUT ''QSYS.SORT.RC.CODE'' /tmp/ndvr/',37:01,12,80:X) |
Thanks. |
|
Back to top |
|
|
dneufarth
Active User
Joined: 27 Apr 2005 Posts: 420 Location: Inside the SPEW (Southwest Ohio, USA)
|
|
|
|
Review your use of apostrophe |
|
Back to top |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1338 Location: Bamberg, Germany
|
|
|
|
At first, the input data is of length 11 not 12. Next point would be to read the Error Messages and try to find your mistake. As this is a very simple task, I give some help.
Code: |
OPTION COPY
INREC BUILD=(C'''PUT ''''QSYS.SORT.RC.CODE''''',X,
C'/tmp/ndvr/',1,11,C'.txt;''',80:X)
END |
Output:
Code: |
****** **************************** Datenanfang **************
000001 'PUT ''QSYS.SORT.RC.CODE'' /tmp/ndvr/RITM0203049.txt;'
****** **************************** Datenende **************** |
|
|
Back to top |
|
|
Digvijay Singh
Active User
Joined: 20 Apr 2022 Posts: 148 Location: India
|
|
|
|
Thanks a lot for reply ,
actually my output should be like below :not one which i gave previously by mistake i kept them in quotes.
PUT 'QSYS.SORT.RC.FAIL.CODE1' /tmp/ndvr/RITM0203050.txt
, i dont want you to give me sort card I know this is silly asking everything just tell me how every string is shown here .i.e every string should be closed with apostrophe..what is the syntax actually genral syntax for appending the string here.
i am getting syntax errors , if you have any doc to refer i will refer.
again just asking the syntax here ,
thanks a lot again |
|
Back to top |
|
|
Joerg.Findeisen
Senior Member
Joined: 15 Aug 2015 Posts: 1338 Location: Bamberg, Germany
|
|
|
|
Please check the differences in specifying apostrophes.
Code: |
OPTION COPY
INREC BUILD=(C'PUT ''QSYS.SORT.RC.CODE''',X,
C'/tmp/ndvr/',1,11,C'.txt',80:X)
END |
From the DFSORT manual:
If you want to include a single apostrophe in the character string, you must specify it as two single apostrophes. Thus: Required: O'NEILL Specify: C'O''NEILL' |
|
Back to top |
|
|
Rohit Umarjikar
Global Moderator
Joined: 21 Sep 2010 Posts: 3076 Location: NYC,USA
|
|
|
|
Moved to Students Section. |
|
Back to top |
|
|
|