View previous topic :: View next topic
|
Author |
Message |
mahesh reddy
New User
Joined: 26 Dec 2010 Posts: 4 Location: HYDERBAD
|
|
|
|
Using the sort Can I do the below.
Code: |
USING THE SORT CAN I DO THE BELOW.
STORE BEGIN AAAAA
ITEM-NUMBER ITEM-DESC
11111 XXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXX
22222 YYYYYYYYYYYYYYYYYYYYYY
YYYYYYYYYYYYYYYYYYYYYY
33333 ZZZZZZZZZZZZZZZZZZZZZZ
END OF STORE AAAAA
STORE BEGIN BBBBB
ITEM-NUMBER ITEM-DESC
11111 XXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXX
22222 YYYYYYYYYYYYYYYYYYYYYY
YYYYYYYYYYYYYYYYYYYYYY
33333 ZZZZZZZZZZZZZZZZZZZZZZ
END OF STORE BBBBB
.
.
I WANT THE O/P TO BE: EACH ITEM TO BE IN ONE LINE ALONG WITH THE STORE N
STORE-NUMBER ITEM-NUMBER ITEM-DESC
AAAAA 11111 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
AAAAA 22222 YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
AAAAA 33333 ZZZZZZZZZZZZZZZZZZZZZZ
BBBBB 11111 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
BBBBB 22222 YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
BBBBB 33333 ZZZZZZZZZZZZZZZZZZZZZZ
.
.
|
|
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
What is the RECFM and LRECL of the input file?
Please run this job and show the //SYSOUT messages you receive, so I can see what level you're at:
Code: |
//S1 EXEC PGM=SORT
//SYSOUT DD SYSOUT=*
//SORTIN DD *
RECORD
//SORTOUT DD DUMMY
//SYSIN DD *
OPTION COPY
/*
|
|
|
Back to top |
|
|
mahesh reddy
New User
Joined: 26 Dec 2010 Posts: 4 Location: HYDERBAD
|
|
|
|
The i/p file RECFM is FB and the record length is 80 bytes.
All I need is, there should be only one record for each item along with the store number and the whole description. So the o/p record length can be variable based on the length of the description i.e dpends on the how many lines the item has description. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
If you can't/won't supply the information I ask for, I can't help you.
Please show me the //SYSOUT messages from the job I posted.
Quote: |
All I need is, there should be only one record for each item along with the store number and the whole description. So the o/p record length can be variable based on the length of the description i.e dpends on the how many lines the item has description. |
This is very vague. How am I supposed to know the maximum number of descriptions an item number can have? How am I supposed to know the maximum length of the output records? When you say "variable length", I don't know if you mean RECFM=VB, or RECFM=FB with blank padding.
You need to do a better job of describing what you need before I can help you. |
|
Back to top |
|
|
V S Amarendra Reddy
Active User
Joined: 13 Sep 2006 Posts: 216 Location: USA
|
|
|
|
Hi Mahesh,
Frank is asking for the below points to help you out.
1. Run the test job he mentioned in the first post so that he will be able to know which DFSORT version and release is used at your shop.
2.Mention your outputfile attributes clearly. Like let's say for your requirement, the output file should be variable, but again a variable file should have the maximum length. So please mention what is your LRECL used for the output file in your JCL step. So LRECL,RECFM are the must attributes to be provided along with the post while you are seeking for help.
3.Mention the maximum number of item descriptions that you can have in the input file.
4. I think it would be better if you can mention the LRECL and RECFM if the input file as well.
you can always find the latest functionalities used in DFSORT in Frank's signature.
Regards
Amar |
|
Back to top |
|
|
|