Thursday, July 29, 2010

Tip 6: Sort LTOU

LTOU is a convenient option in Sort Cards to convert all Lower case alphabets to Upper case. Its most useful as only lower case alphabets are converted to upper case. Numbers, symbols and special characters are unaffected.

Sort card will be as below:

Suppose the file is of length 100 and we want to convert the full file:
SORT FIELDS=COPY
OUTREC FIELDS=(1,100,TRAN=LTOU)

And if we want to convert only the first 10 bytes:
SORT FIELDS=COPY
OUTREC FIELDS=(1:1,10,TRAN=LTOU,11:11,90)

We can also sort on any fields if needed.

Tip 5: Sort ALTSEQ code

ALTSEQ code is very useful to change a particular value to another value in a file using a sort card. This is most frequently used to convert low-values to spaces.

For example, if you just want to convert low-values to spaces without sorting on any field, sort card to be given is as below:

SORT FIELDS=COPY
ALTSEQ CODE=(0040)
OUTREC FIELDS=(1,100,TRAN=ALTSEQ)

Here all X'00' values in the file are replaced by X'40' hence ALTSEQ CODE=(0040)
and the file length is can be 100 or we want to OUTREC only the first 100 fields.

In case we need to convert nulls to spaces only for a particular field, suppose the first ten bytes and the file is of length 100 then we can use the below:

SORT FIELDS=COPY
ALTSEQ CODE=(0040)
OUTREC FIELDS=(1:1,10,TRAN=ALTSEQ,11:11,90)

We can also sort on any fields if needed.

Tip 4: File Aid Display

This is again one of the features i like in File Aid and got to know about this from my colleague :) thanks to her

When we have to verify a file which has numerous fields and we want to check just 2 or 3 fields isn't it a very boring idea to keep scrolling and many of us prefer the VFMT format compared to FMT.

Solution:
Suppose we want to check only 1st, 2nd and 10th fields in the file, we can issue the command:

DISPLAY 1,2,10 ONLY

And only these fields will be displayed

Wednesday, July 28, 2010

Tip 2:File Aid - Edit/Browse

Sometimes we open a file in browse mode when we want to be in edit mode and vice versa. Isn't it very irritating to go back and then again enter in edit/browse mode?

Better option:
If you are in browse mode and want to go to edit mode:
COMMAND => GO EDIT

If you are in edit mode and want to go to browse mode:
COMMAND => GO BROWSE

Isn't that nice :)

Tip 1: CUT and PASTE

If we want to cut first few lines and last few lines from a file and paste into another file, we usually use the CUT command which will paste only the last few lines into the other file.Usual way we follow is to use CUT command twice.

Better option:
To get all the lines at once give a CUT APPEND command each time u select the lines and then give a paste command in the new file to get all the lines.

P.S -These are not my own tips, just got them when i browsed net :)


Tuesday, June 22, 2010

Learning and blogging :-)

As and when im learning about mainframes, I just thought i should start blogging about the same to help beginners like me.

As a fresher I have experienced lot of trouble in learning about anything which might be as simple as a sort card or an ezetrieve to anything complex. So trying to put what I have learnt here. I am not an expert but just a beginner :-)

Hope this blog helps!!

Cheers :-)