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
 

 

I/P file in which the record is flowing in multiple lines

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

New User


Joined: 06 May 2010
Posts: 17
Location: INDIA

PostPosted: Thu May 06, 2010 10:43 am    Post subject: I/P file in which the record is flowing in multiple lines
Reply with quote

Hi,

I m having a I/P file in which the record is flowing in multiple lines.

1ST RECORD LAYOUT:[/u]
1st ROW(1:2) = 10
2nd ROW (1:2) = 11 which is continued in the next line having 1st 2digit as 11(SEE THE 3RD LINE). The end of the 2nd ROW can be identified at the end of 3rd ROW(END* - Denotes the end).

1ST RECORD:
100000000000111111.AAAA.SE
110017NAME BISWARANJAN NAYAK0012
11CARD @@@@@@END*

2ND RECORD:
100000000000222222.BBBB.SE
110007NAME PRIYA V0012
11CARD @#####END*

Now I want to create a O/P file with:
111111.AAAA.SE BISWARANJAN NAYAK @@@@@@
222222.BBBB.SE PRIYA V @#####

Please let me know whether it's possible in DFSORT/ICETOOL?

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

Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Thu May 06, 2010 1:05 pm    Post subject:
Reply with quote

To understand all of what you want, being psychic is not enough...
Quote:
1st ROW(1:2) = 10
2nd ROW (1:2) = 11

This is flat file. In file there are not rows but records.
I assume by above you mean

1st rec in rec group will start with '10'
2st rec in rec group will start with '11'
3rd rec in rec group will have 'END' from pos 14

Now looking at your sample records
Data required in output is
from 1 rec of group from 13 len 14
from 2 rec of group from 12 len (couldn’t guess)
from 3 rec of group from 8 len 6

Can you please confirm what I assumed is correct and provide how to identify name which I couldn't guess...

Also will there be always three records in the group as you shown?
What is LRECL\RECFM of the file?
Back to top
View user's profile Send private message
biswaranjan

New User


Joined: 06 May 2010
Posts: 17
Location: INDIA

PostPosted: Mon May 10, 2010 9:05 am    Post subject:
Reply with quote

Hi,

Thanks for the response.

Please find the deatils. The issue is in how to handle level'11' record.

Level = '10' -- 1ST two bytes of vaue '10'
Level = '11' -- 1st 2 bytes of value '11'

----------------------------------------------------------------------------------

1. 1st rec in rec group will start with '10' - Yes
2. 2st rec in rec group will start with '11' - Yes

The 2nd record in ideal condition should have:
110017NAME BISWARANJAN NAYAK0012CARD @@@@@@END*
But in this case it is overflowing to the next line and to identify this is a part of 2nd record the starting two bytes of the 3rd line is '11'.
110017NAME BISWARANJAN NAYAK0012
11CARD @@@@@@END*

3. Also will there be always three records in the group as you shown?
No. The '11' level record will have values in multiple lines(Min. 1 to max 10), But END* will always mark the end of leval'11' record.

4. 3rd rec in rec group will have 'END' from pos 14?
As mentioned above the END* just marks the end of '11' level record. It can be at any position of the record( FB - 240).

5. How to identify name which I couldn't guess... ?

Record level = '11', Tags will be : NAME, TEL, CARD, BID

0017 - LENTH, NAME - TAG, After that actual value of name of 17byte starting with a space always. Similarly for tags TEL, CARD, BID.
0017 is the length, but if it's of 10bytes data will always contain the actual value of 10, rest 7 bytes will not be space filled. The next character after the value will always contain a digit, i.e 1st byte of the actual length of 2nd tag(Ex: '0' as apart of next tag 0010TEL).

0017NAME BISWARANJAN NAYAK
0010TEL 0661247490012
0012CARD @@@@@@@@@@@0009BID 000000123END*

Actual record Layoutof level 11:
110017NAME BISWARANJAN NAYAK0010TEL06612474900120012--> 0 is the next byte just after the end of NAME tag actual value.
11CARD @@@@@@@@@@@0009
11BID 000000123END*


The LRECL of the mentioned file is = 240.

Regards,
Biswa
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: Tue May 11, 2010 2:49 am    Post subject:
Reply with quote

There might be a way to do what you want with DFSORT's PARSE function, but your explanation isn't clear enough for me to say.

Also, I can't determine where there are spaces in your records. It would really help if you would use ubb code tags so you could make the input and output records look the way they actually look.

Quote:
0017 is the length, but if it's of 10bytes data will always contain
the actual value of 10, rest 7 bytes will not be space filled. The
next character after the value will always contain a digit, i.e 1st
byte of the actual length of 2nd tag(Ex: '0' as apart of next tag
0010TEL).


I'm not sure what you mean by this but if you need to use the length in the second line to determine the bytes to extract in the third line and so on, DFSORT can't do that, so I suggest you write your own program or exit with the needed logic.
Back to top
View user's profile Send private message
biswaranjan

New User


Joined: 06 May 2010
Posts: 17
Location: INDIA

PostPosted: Mon May 31, 2010 7:34 pm    Post subject:
Reply with quote

Hi Frank,

I/P file is:
1020100510AN196703038247.FSPA.SE110017NAME BISWA11CARD123456
1020100510AN196703038290.FSPA.SE110017NAME PAM11CARD12345

O/P :

Code:

196703038247.FSPA.SE BISWA 123456
196703038290.FSPA.SE PAM     12345



In the record Name is varying.

Is this possible in SORT? This is a VB file.
Back to top
View user's profile Send private message
biswaranjan

New User


Joined: 06 May 2010
Posts: 17
Location: INDIA

PostPosted: Mon May 31, 2010 7:52 pm    Post subject: SORT - Lateral Join of records of a I/P file
Reply with quote

Hi,

I want to join Line 1,2 Line 3,4 Line 5,6 and so on.
Let me know if it pissible in SORT.



Code:

1020100510AN196703038247.FSPA.SE
110012NMN TEST TESTSON0000TLF 0012EPS test
1020100510AN196703038247.FSPA.SE
110012NMN TEST TESTSON0000TLF 0012EPS test99
1020100510AN196703038247.FSPA.SE
110012NMN TEST TESTSON0000TLF 0012EPS test10000
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: Mon May 31, 2010 7:56 pm    Post subject:
Reply with quote

biswaranjan wrote:
Code:

196703038247.FSPA.SE BISWA 123456
196703038290.FSPA.SE PAM     12345
Did you intend the above or this:
Code:

196703038247.FSPA.SE BISWA 123456
196703038290.FSPA.SE PAM   12345
Back to top
View user's profile Send private message
biswaranjan

New User


Joined: 06 May 2010
Posts: 17
Location: INDIA

PostPosted: Mon May 31, 2010 8:00 pm    Post subject:
Reply with quote

The one newly added.
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: Wed Jun 02, 2010 1:05 am    Post subject:
Reply with quote

Quote:
The one newly added.


If you mean this:

Quote:
I want to join Line 1,2 Line 3,4 Line 5,6 and so on.
Let me know if it pissible in SORT.


Code:

1020100510AN196703038247.FSPA.SE
110012NMN TEST TESTSON0000TLF 0012EPS test
1020100510AN196703038247.FSPA.SE
110012NMN TEST TESTSON0000TLF 0012EPS test99
1020100510AN196703038247.FSPA.SE
110012NMN TEST TESTSON0000TLF 0012EPS test10000


It seems to be different than the input, output and rules you were originally talking about, so I still have no idea what you want to do. "Join" how?

Please show the expected output records, and explain the "rules" for getting from input to output. Give the RECFM and LRECL of the input and output files. Give the starting position, length and format of each relevant field.
Back to top
View user's profile Send private message
biswaranjan

New User


Joined: 06 May 2010
Posts: 17
Location: INDIA

PostPosted: Wed Jun 02, 2010 10:49 am    Post subject:
Reply with quote

Hi Frank,

I/P --> RECFM VB, LRECL=120
O/P --> RECFM VB, LRECL=240

Attachment deleted - content below. . .
Back to top
View user's profile Send private message
Escapa

Senior Member


Joined: 16 Feb 2007
Posts: 1399
Location: IL, USA

PostPosted: Wed Jun 02, 2010 10:51 am    Post subject:
Reply with quote

Code:

I/P file:
1020100510AN196703038247.FSPA.SE
110012NMN TEST TESTSON0000TLF 0012EPS test
1020100510AN196703038247.FSPA.SE
110012NMN TEST TESTSON0000TLF 0012EPS test99
1020100510AN196703038247.FSPA.SE
110012NMN TEST TESTSON0000TLF 0012EPS test10000
O/P File:
1020100510AN196703038247.FSPA.SE 110012NMN TEST TESTSON0000TLF 0012EPS test
1020100510AN196703038247.FSPA.SE 110012NMN TEST TESTSON0000TLF 0012EPS test99
1020100510AN196703038247.FSPA.SE 110012NMN TEST TESTSON0000TLF 0012EPS test10000

Moderators, Kindly delete above attachment... This is the content...

Done
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: Wed Jun 02, 2010 11:19 pm    Post subject:
Reply with quote

Biswa,

Since the input and output are VB files, we have to take the record lengths into account. It isn't clear in what way you want to do that.
I don't know if you want each record padded out to 120 bytes before it is joined to the other record, or if you want the trailing blanks squeezed out, or what. You need to show an example with the length of each input record and the length of the joined output record, and explain exactly what you want.
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
No new posts syncsort: copy lines after the keyword shreya19 SYNCSORT 1 Fri Dec 02, 2016 9:47 am
No new posts Add PD field from 2nd file to PD in 1st Sushant Garje DFSORT/ICETOOL 6 Thu Dec 01, 2016 4:32 pm
No new posts File Aid to File Manager conversion murali3955 IBM Tools 4 Thu Nov 24, 2016 3:41 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts CICS Roll back partially - Need to re... dwijadas CICS 4 Wed Nov 16, 2016 4:30 pm


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