View previous topic :: View next topic
|
Author |
Message |
harsh singh
New User
Joined: 11 Dec 2007 Posts: 26 Location: INDIA
|
|
|
|
My file has a record layout of 100 bytes, now I want to increase the LRECL to 120 bytes, the 20 bytes are defined as packed-decimal. Now I want to use this field in SORT:
//SYSIN DD*
OPTION COPY
INREC FEILDS=( ????)
Let the variable in SORTIN file is placed at position 10 and in SORTOUT at position 20. |
|
Back to top |
|
|
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
harshsingh,
You can the following DFSORT control cards to initialize the packed decimal field
Code: |
//SYSIN DD *
SORT FIELDS=COPY
OUTREC OVERLAY=(101:+0,TO=PD,LENGTH=20)
//*
|
|
|
Back to top |
|
|
harsh singh
New User
Joined: 11 Dec 2007 Posts: 26 Location: INDIA
|
|
|
|
hi Skolusu,
Thanks for the help but above code is not working .following message is displayed
E1 - DSS10065E - PARAMETER 'TO' IS UNIDENTIFIED.
E2 - DSS10065E - PARAMETER 'LENGTH' IS UNIDENTIFIED.
Can u look in to this? |
|
Back to top |
|
|
harsh singh
New User
Joined: 11 Dec 2007 Posts: 26 Location: INDIA
|
|
|
|
hi,
i tried with the below code and it worked
//SYSIN DD *
//SORT FEILDS =COPY
//INREC FEILDS(101:+0,LENGTH=0)
CAN U LOOK ON SAME PROBLEM WITH NUMERIC FEILD ????
I am not getting the correct order in o/p file, i used ZD in this case , anybody have some sujjestions??? u r welcome |
|
Back to top |
|
|
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
harsh singh wrote: |
hi Skolusu,
Thanks for the help but above code is not working .following message is displayed
E1 - DSS10065E - PARAMETER 'TO' IS UNIDENTIFIED.
E2 - DSS10065E - PARAMETER 'LENGTH' IS UNIDENTIFIED.
Can u look in to this? |
Harsh singh,
The error messages you show are NOT standard DFSORT error messages. DFSORT messages start with ICExxxx. I guess they are error messages from JCL check software. Try running the job as shown by me and post the sysout, if you dont get the desired results. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Kolusu,
I think the above SORT card will add PD values from 101-120 while TS says
Quote: |
Let the variable in SORTIN file is placed at position 10 and in SORTOUT at position 20. |
Perhaps he wants to add PD fields in start of SORTOUT.
I tried your solution at my shop, JOB ran successfully, no error message but the output contains only the initialized PD fields.. |
|
Back to top |
|
|
Skolusu
Senior Member
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
|
|
|
|
[quote="Anuj D."]Kolusu,
I think the above SORT card will add PD values from 101-120 while TS says
Quote: |
Let the variable in SORTIN file is placed at position 10 and in SORTOUT at position 20. Perhaps he wants to add PD fields in start of SORTOUT. |
I am not sure what the actual requirement is
Quote: |
I tried your solution at my shop, JOB ran successfully, no error message but the output contains only the initialized PD fields.. |
The job shown by me copies the contents the input file and also adds the initialized PD fields at the end. So the first 100 bytes is copied as is from the input file.
Did you remove the Position(101) field in my Job? |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
harsh,
Nobody can figure out what you're doing.
You posted this question in the DFSORT Forum so we assume you're using DFSORT. You posted these control statements which we assumed are DFSORT control statements (we assumed you meant FIELDS, not FEILDS):
Code: |
//SYSIN DD*
OPTION COPY
INREC FEILDS=( ????)
|
You said
Quote: |
Let the variable in SORTIN file is placed at position 10 and in SORTOUT at position 20. |
It's not clear what this means.
You showed:
E1 - DSS10065E - PARAMETER 'TO' IS UNIDENTIFIED.
E2 - DSS10065E - PARAMETER 'LENGTH' IS UNIDENTIFIED.
These are NOT DFSORT messages.
You said
Quote: |
i tried with the below code and it worked
//SYSIN DD *
//SORT FEILDS =COPY
//INREC FEILDS(101:+0,LENGTH=0)
CAN U LOOK ON SAME PROBLEM WITH NUMERIC FEILD ????
|
DFSORT control statements cannot start with // and FEILDS is not a valid operand.
You said
Quote: |
I am not getting the correct order in o/p file, i used ZD in this case |
It's not clear what this means or what it has to do with the original requirement.
YOU need to state clearly what you are trying to do before anyone can help you. Show your complete JCL and control statements. Show an example of the records in the input file (relevant fields only) and what you expect for output. Give the starting position, length and format of each relevant field. Give the RECFM and LRECL of the input file. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Quote: |
Did you remove the Position(101) field in my Job? |
No I didn't do that.
My input was of LRECL 80 & I use '101+' for SORTOUT with LRECL 120..so total 40 bytes were added..& I overlooked the data..as I pressed F11 (perhaps) & saw only the dots (...), when browsed the file, as intialized place holder for PD values, due to this worte the query to you right away.. ..sorry to bother you.
But I got one query here now, in above scenario, i.e.if I use
Code: |
//SYSIN DD *
SORT FIELDS=COPY
OUTREC OVERLAY=(101:+0,TO=PD,LENGTH=20)
//* |
But SORTIN is of LRECL 80 then what type of data-type will be there in 80-100 field position? |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Quote: |
what type of data-type will be there in 80-100 field position? |
Blanks. (You could have tried it yourself.) |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Thank Frank. Yeah I tried it, but was bit skeptical about it. |
|
Back to top |
|
|
harsh singh
New User
Joined: 11 Dec 2007 Posts: 26 Location: INDIA
|
|
|
|
i am sorry dor the typing mistakes i did [like FIELDS& OTHER] MY APOLOGY FOR IT.
Definitely i am using DFS Sort in my pgm.File 1 has RL:
01 FILE1-RECORD.
05 ADDRESSLINE-1 PIC X(10).
05 ADDRESSLINE-2 PIC X(10).
05 NAME PIC X(10).
05 WORK-PHONE PIC 9(10).
05 HOME-PHONE PIC 9(10).
05 OCCUPATION PIC X(15).
05 STATE PIC X(5).
05 COUNTRY-CODE PIC X(10).
05 FILLER PIC X(20).
FILE1 is 100 byte file .
now i want to increase RL to 120 bytes by adding below two comp feilds
01 FILE1-RECORD.
05 ADDRESSLINE-1 PIC X(10).
05 ADDRESSLINE-2 PIC X(10).
05 SIR-NAME PIC S9(10) COMP-3.
05 NAME PIC X(10).
05 LAST-NAME PIC S9(10) COMP-3.
05 WORK-PHONE PIC 9(10).
05 HOME-PHONE PIC 9(10).
05 OCCUPATION PIC X(15).
05 STATE PIC X(5).
05 COUNTRY-CODE PIC X(10).
05 FILLER PIC X(20).
Below is the controle card which i am supplying to my job .
INREC FIELDS=(1:1,10, ADDRESSLINE-1
11:10,10, ADDRESSLINE-2
21:+0,TO=PD,LENGTH=10,
31:20,10, NAME
41:+0,TO=PD,LENGTH=10,
51:30,10, WORK-PHONE
61:40,10, HOME-PHONE
71:50,15, OCCUPATION
86:65,5, STATE
91:70,10, COUNTRY-CODE
101:80,20) FILLER
He i do !JACK i get MAXCC=8 with the following message
AE1 - DES10065E - PARAMETER 'TO' IS UNIDENTIFIED.
E2 - DSS10065AE - PARAMETER 'LENGTH' IS UNIDENTIFIED.
.Please look over this issue |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
As was previously posted, the DES/DSS messages do not come from DFSORT. If you post all of the sysout data from this step it will probably help us understand.
Why are SIR-NAME and LAST-NAME defined as comp-3? This looks invalid. . . Names are typically not numeric. . . |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
You cannot use these types of declared variables (e.g. ADDRESSLINE-1) directly in a DFSORT INREC statement. You must be using another program that interprets these statements. It's not clear what that other program does, but it obviously doesn't support all of DFSORT's syntax (like the TO= function).
If you used DFSORT directly rather than through this program, you could use all of the DFSORT syntax. You could also use DFSORT Symbols mapped to the declares. |
|
Back to top |
|
|
|