Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Sort cord for removing dots from file

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
Binaya

New User


Joined: 03 Jul 2007
Posts: 77
Location: Hyderabad

PostPosted: Thu Feb 28, 2008 8:25 pm    Post subject: Loading external file
Reply with quote

Hi,

I want to load an external file:

The Input is:

Code:

UQSE   SEC   UQSE
LEQU   SECD  LEQU
UQSE   *     UQSE



The output in mainframe file Required is:
Code:

---4---8---12
UQSESEC UQSE
UQSESECDABCD
UQSE*   ABCD



I Tried as below:
I opened it in text file then tried loading into mainframe.
The output is


Code:
UQSE.SEC.UQSE
UQSE.SECD.ABCD
UQSE.*.ABCD


I could have written a sort cord with sort fields=copy,outrec=() for this output file to get my required output but the second field varies from 1-4.

Please help.

Regards,
Back to top
View user's profile Send private message

dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Thu Feb 28, 2008 10:28 pm    Post subject:
Reply with quote

Hello,

Quote:
I opened it in text file then tried loading into mainframe.
Where/how did you open this as a text file? How did you "load into mainframe"?
Back to top
View user's profile Send private message
CICS Guy

Senior Member


Joined: 18 Jul 2007
Posts: 2150
Location: At my coffee table

PostPosted: Thu Feb 28, 2008 10:42 pm    Post subject: Re: Loading external file
Reply with quote

Binaya wrote:
The Input is:
Code:

UQSE   SEC   UQSE
LEQU   SECD  LEQU
UQSE   *     UQSE
Quote:
I could have written a sort cord with sort fields=copy,outrec=() for this output file to get my required output but the second field varies from 1-4.
So what if the second field is 1-4, your output doesn't seem to care.....
What are the little dots in your actual output, do a hex display and see if they are 'tabs' or what....
While you are at it, post the hex display for your input......
Back to top
View user's profile Send private message
Binaya

New User


Joined: 03 Jul 2007
Posts: 77
Location: Hyderabad

PostPosted: Fri Feb 29, 2008 10:01 am    Post subject:
Reply with quote

Quote:
Where/how did you open this as a text file? How did you "load into mainframe"?


I saved the excel file in a notepad. Then I tried loadind it into mainframe by ISPF option 6 / Action / send file to host.

Quote:
So what if the second field is 1-4, your output doesn't seem to care.....
What are the little dots in your actual output, do a hex display and see if they are 'tabs' or what....
While you are at it, post the hex display for your input......


Yes the dots are HEX for tabs.
HEX
.
0
5

The third field in the output has to start from 8'th position.
But as the second field in the input is * (3'rd row) i.e 1 character, the output starts from 5'th position.

It can be done by sorting

UQSE.SEC.UQSE
LEQU.SECD.LEQU
LEQU.*.LEQU

to

Code:
UQSESEC UQSE
LEQUSECDLEQU
LEQU*   LEQU
Back to top
View user's profile Send private message
Binaya

New User


Joined: 03 Jul 2007
Posts: 77
Location: Hyderabad

PostPosted: Fri Feb 29, 2008 10:17 am    Post subject: Sort cord for removing dots from file
Reply with quote

Hi,

Please help me for sort cord.

Input

Code:
UQSE.SEC.UQSE
UQSE.SECD.ABCD
UQSE.*.ABCD


Output

Code:
---4---8---12
UQSESEC UQSE
UQSESECDABCD
UQSE*   ABCD


The . in the input file has to be removed and the third field has to start from 9'th position.

Regards,
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


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

PostPosted: Fri Feb 29, 2008 9:44 pm    Post subject:
Reply with quote

Binaya,

Based on what you've said, you can use a DFSORT job like the following to do what you asked for:

Code:

//S1    EXEC  PGM=ICEMAN
//SYSOUT    DD  SYSOUT=*
//SORTIN DD *
UQSE.SEC.UQSE
UQSE.SECD.ABCD
UQSE.*.ABCD
/*
//SORTOUT DD DSN=...  output file
//SYSIN    DD    *
  OPTION COPY
  INREC PARSE=(%01=(ABSPOS=6,ENDBEFR=X'05',FIXLEN=4),
               %02=(FIXLEN=4)),
        BUILD=(1,4,%01,%02)
/*
Back to top
View user's profile Send private message
Binaya

New User


Joined: 03 Jul 2007
Posts: 77
Location: Hyderabad

PostPosted: Mon Mar 03, 2008 12:46 pm    Post subject:
Reply with quote

Thanks so much Frank..You are the Best...

Regards,
Back to top
View user's profile Send private message
aneeta

New User


Joined: 08 Dec 2005
Posts: 48
Location: Chennai

PostPosted: Mon Mar 03, 2008 11:27 pm    Post subject: Reply to: Sort cord for removing dots from file
Reply with quote

Hi Frank,
I am curious to know wat does %,ABSPOS and ENDBEFR mean.Can you pls explain.

Thanks
Aneeta
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Moderator


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

PostPosted: Mon Mar 03, 2008 11:32 pm    Post subject:
Reply with quote

Aneeta,

For complete details on DFSORT's PARSE function and all of its parameter, see:

www.ibm.com/servers/storage/support/software/sort/mvs/peug/
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Write out NODUPS but just from one file Jay Villaverde DFSORT/ICETOOL 8 Fri Jul 14, 2017 12:44 am
No new posts SORT to unpack a feild shr_amar DFSORT/ICETOOL 7 Fri Jul 07, 2017 4:32 am
No new posts How to add header with Date(YYMMDD) i... Rajan Moorthy DFSORT/ICETOOL 2 Thu Jul 06, 2017 11:44 pm
No new posts How to write Specific Fields from Mul... Padhu SYNCSORT 6 Thu Jul 06, 2017 10:26 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us