Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
chinnu123
Creator
Creator

Need qlik function from SAS function.

Hi Team,

PIN_RT = PUT(INPUT(PIN,BEST11.),Z11.);

I need to convert above SAS function in qlik.

Can any one explain me how the above function works and how to write in qlik.

Thanks,

Chinnu.

1 Solution

Accepted Solutions
techvarun
Specialist II
Specialist II

Repeat('0', 11 - Len(PIN)) & PIN AS PIN

View solution in original post

4 Replies
techvarun
Specialist II
Specialist II

Repeat('0', 11 - Len(PIN)) & PIN AS PIN

chinnu123
Creator
Creator
Author

Hi Varun,

Thanks for your quick reply, Can you please tell me How the above expression works.

Thanks,

Chinnu.

techvarun
Specialist II
Specialist II

Hi,

I am taking 11 as my base number (Z11) the function first check for the number of available digits

Len(Pin) then it will repeat 0 for 11 - Len(PIN) times

For example.

9911223344 is the input then it will add

11- 10 =1 zero to the input.

try below script

Test:

LOAD * INLINE [

Field

   9916344747

   122222

   1222212

];

LOAD

Repeat('0', 11 - Len(Field)) & Field AS Field1 Resident Test

chinnu123
Creator
Creator
Author

Thanks for your Explanation Varun.

Thanks,

Chinnu.