View previous topic :: View next topic
|
Author |
Message |
Binaya
New User
Joined: 03 Jul 2007 Posts: 77 Location: Hyderabad
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
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 |
|
|
Binaya
New User
Joined: 03 Jul 2007 Posts: 77 Location: Hyderabad
|
|
|
|
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 |
|
|
Binaya
New User
Joined: 03 Jul 2007 Posts: 77 Location: Hyderabad
|
|
|
|
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 |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
Binaya
New User
Joined: 03 Jul 2007 Posts: 77 Location: Hyderabad
|
|
|
|
Thanks so much Frank..You are the Best...
Regards, |
|
Back to top |
|
|
aneeta
New User
Joined: 08 Dec 2005 Posts: 48 Location: Chennai
|
|
|
|
Hi Frank,
I am curious to know wat does %,ABSPOS and ENDBEFR mean.Can you pls explain.
Thanks
Aneeta |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
Back to top |
|
|
|