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
 

 

Need help on SORT card?

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

New User


Joined: 30 Apr 2009
Posts: 19
Location: chennai

PostPosted: Sat Oct 02, 2010 12:59 pm    Post subject: Need help on SORT card?
Reply with quote

Hi,
I have a file with LRECL 300 and FB. it is a flat file. Presently in the 90th position sign (i.e. '-') is there for some records and some records are strated which don't have sign in 90th position. I need to insert space or '+' in 90th position for all the records which don't have '-' and the column shold strat in 91st position. same like this I need to do in 114 th position, 150th position in same file. Could some one please let me know is it possible using sort?
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: Sat Oct 02, 2010 8:03 pm    Post subject:
Reply with quote

Hello,

Post some sample input and the output you want from the sample input. These do not need to be full-length records, just enough to show your requirement. Post the rules needed to get from the nput to the output.

Mention the dsorg and lrecl of the files.
Back to top
View user's profile Send private message
vinuk2009

New User


Joined: 30 Apr 2009
Posts: 19
Location: chennai

PostPosted: Sun Oct 03, 2010 12:08 pm    Post subject: Reply to: Need help on SORT card?
Reply with quote

Hi Dick,

here is the example


Input file


Code:
90 91 92 ..........114 115 116 ....................150 151 153........... cols

1  0  0  .............-      1   0    ....................2      0    0   ...........
-   2  0  ............2      0   0    ....................-       1    0   ..........
3  0  0  .............-      2   0    ....................-       2    0  ...........

Ouptut file

Code:
90 91 92 93 .......114 115 116 117...............150 151 152 153..........

+   1  0  0    .......-       1   0         ...............+       2    0     0  ..........
-    2  0       ........+      2   0   0   ................-        1    0        ..........
+   3  0  0   ........-        2   0        ................-       2    0        ..........


DSORG = PS and LRECL =300 and RECFM = FB
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10256
Location: italy

PostPosted: Sun Oct 03, 2010 12:48 pm    Post subject: Reply to: Need help on SORT card?
Reply with quote

please learn to use the tags ( code tag in this case )
they will keep the data You enter aligned and make things easier for people willing to help
and using the preview button before the submit one will let You see what Your post will look like

I edited Your post to let You see what it looks like,
please repost just the file part properly aligned and I will cleanup everything after that
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10256
Location: italy

PostPosted: Sun Oct 03, 2010 1:37 pm    Post subject: Reply to: Need help on SORT card?
Reply with quote

follow on
I reformatted in a more ( IMHO ) readable fashion

Input file
Code:

0 0 0 0 ... 1 1 1 1 ... 1 1 1 1 .......... cols
9 9 9 9 ... 1 1 1 1 ... 5 5 5 5 .......... cols
0 1 2 3 ... 4 5 6 7 ... 0 1 3 4 .......... cols


1 0 0 . ... - 1 0 . ... 2 0 0 . .......... data
- 2 0 . ... 2 0 0 . ... - 1 0 . .......... data
3 0 0 . ... - 2 0 . ... - 2 0 . .......... data

Ouptut file

Code:

0 0 0 0 ... 1 1 1 1 ... 1 1 1 1 .......... cols
9 9 9 9 ... 1 1 1 1 ... 5 5 5 5 .......... cols
0 1 2 3 ... 4 5 6 7 ... 0 1 3 4 .......... cols


+ 1 0 0 ... - 1 0 B ... + 2 0 0 .......... data
- 2 0 B ... + 2 0 0 ... - 1 0 B .......... data
+ 3 0 0 ... - 2 0 B ... - 2 0 0 .......... data

do You realize that You will lose the previous content of columns 93,117,154 ?

unless You shift everiyhing and change the column accordingly
Back to top
View user's profile Send private message
vinuk2009

New User


Joined: 30 Apr 2009
Posts: 19
Location: chennai

PostPosted: Sun Oct 03, 2010 6:34 pm    Post subject:
Reply with quote

Hi Enrico,

Thank you for reformating my data. I tried to reformat before post. But I didn't get success. Going forward I will follow your suggestion.
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10256
Location: italy

PostPosted: Sun Oct 03, 2010 7:12 pm    Post subject: Reply to: Need help on SORT card?
Reply with quote

the best way to format correctly is to edit/build the post in an editor with a fixed font ( without using tabs )
and after that cut and paste into the forum reply box

I hope I reformatted correctly,

but You still have to answer the question about shifting or overlaying
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 How to change 'K' or 'M' use Sort vice_versa DFSORT/ICETOOL 5 Thu May 18, 2017 7:11 am
No new posts Adding big TEXT lines to each record ... bshkris SYNCSORT 4 Sat May 06, 2017 1:40 am
This topic is locked: you cannot edit posts or make replies. SORT trick needed bshkris SYNCSORT 6 Tue May 02, 2017 4:35 am
No new posts SORT JSON type of data maxsubrat DFSORT/ICETOOL 8 Wed Apr 19, 2017 6:01 pm
No new posts Sort Large record length cmsmoon DFSORT/ICETOOL 14 Tue Apr 11, 2017 5:49 pm


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