IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Formatting the records


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
mahesh reddy

New User


Joined: 26 Dec 2010
Posts: 4
Location: HYDERBAD

PostPosted: Thu Dec 30, 2010 12:24 pm
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Fri Dec 31, 2010 12:14 am
Reply with quote

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
View user's profile Send private message
mahesh reddy

New User


Joined: 26 Dec 2010
Posts: 4
Location: HYDERBAD

PostPosted: Sun Jan 02, 2011 9:56 pm
Reply with quote

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
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Sun Jan 02, 2011 11:31 pm
Reply with quote

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
View user's profile Send private message
V S Amarendra Reddy

Active User


Joined: 13 Sep 2006
Posts: 216
Location: USA

PostPosted: Mon Jan 03, 2011 9:25 am
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Join multiple records using splice DFSORT/ICETOOL 5
No new posts EZT program to build a flat file with... All Other Mainframe Topics 9
No new posts Need help on formatting a report DFSORT/ICETOOL 14
Search our Forums:

Back to Top